400 Bad Request
A 400 Bad Request error indicates that the server cannot process the request due to client-side issues such as malformed syntax, invalid request parameters, or validation failures.
Error Types
Missing SiteId
Type: https://partner.utopi.io/docs/help/error-codes/400#missing-siteId
Description
The required SiteId header is missing or contains an invalid GUID format.
Common Causes
- Missing
SiteIdheader in the request SiteIdheader present but emptySiteIdvalue is not a valid GUID format
Example
{
"type": "https://partner.utopi.io/docs/help/error-codes/400#missing-siteId",
"status": 400,
"title": "SiteId is missing or invalid",
"detail": "Missing or invalid header: SiteId (must be a GUID)",
"errors": []
}
Resolution
-
Add SiteId Header - Ensure every API request includes the SiteId header
-
Check GUID Format - Verify your SiteId is a valid GUID format:
- Format:
12345678-1234-1234-1234-123456789012 - Example:
a1b2c3d4-e5f6-7890-abcd-ef1234567890
- Format:
-
Verify Site UUID - Confirm you're using the correct Site UUID provided during onboarding
-
Check Header Name - Ensure the header is named exactly
SiteId
Bad Request
Type: https://partner.utopi.io/docs/help/error-codes/400#bad-request
Description
General bad request error when the request contains invalid or missing required parameters.
Common Causes
- Missing required parameters
- Invalid parameter values
- Malformed request body
- Incorrect data types
Example
{
"type": "https://partner.utopi.io/docs/help/error-codes/400#bad-request",
"status": 400,
"title": "Bad Request",
"detail": "The request was invalid.",
"errors": []
}
Resolution
- Check that all required parameters are included
- Verify parameter values match expected formats
- Ensure request body is properly formatted JSON
- Review the API documentation for the specific endpoint
Validation Error
Type: https://partner.utopi.io/docs/help/error-codes/400#validation-error
Description
Validation error when one or more request parameters fail validation rules.
Common Causes
- Invalid GUID formats for UUIDs
- Date/time values not in ISO 8601 format
- String values exceeding maximum length
- Numeric values outside allowed ranges
- Missing required fields
Example
{
"type": "https://partner.utopi.io/docs/help/error-codes/400#validation-error",
"status": 400,
"title": "One or more validation errors occurred.",
"detail": "See the errors array for details.",
"errors": [
{
"property": "deviceUuid",
"message": "Device UUID must be a valid GUID format"
},
{
"property": "fromDateTime",
"message": "fromDateTime is required and must be in ISO 8601 format"
}
]
}
Resolution
- Review each error in the
errorsarray - Check the specific property mentioned in each error
- Ensure values match the expected format:
- UUIDs:
12345678-1234-1234-1234-123456789012 - Dates: ISO 8601 format (
2024-01-15T10:30:00Z) - Required fields are not null or empty
- UUIDs:
- Validate data types match API specification
Getting Help
If you continue to experience 400 errors after following the resolution steps:
- Double-check the API documentation for the specific endpoint
- Contact your technical contact or support@utopi.co.uk with the full error response and steps to reproduce.