Skip to main content

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 SiteId header in the request
  • SiteId header present but empty
  • SiteId value 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

  1. Add SiteId Header - Ensure every API request includes the SiteId header

  2. Check GUID Format - Verify your SiteId is a valid GUID format:

    • Format: 12345678-1234-1234-1234-123456789012
    • Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  3. Verify Site UUID - Confirm you're using the correct Site UUID provided during onboarding

  4. 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

  1. Check that all required parameters are included
  2. Verify parameter values match expected formats
  3. Ensure request body is properly formatted JSON
  4. 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

  1. Review each error in the errors array
  2. Check the specific property mentioned in each error
  3. 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
  4. Validate data types match API specification

Getting Help

If you continue to experience 400 errors after following the resolution steps:

  1. Double-check the API documentation for the specific endpoint
  2. Contact your technical contact or support@utopi.co.uk with the full error response and steps to reproduce.