Skip to content
Last updated

Errors in Xpansiv Data API

The Xpansiv Data API uses the following error codes:

Error CodeMeaning
400Bad Request -- The request you sent is incorrect.
401Unauthorized -- Your API key is wrong.
403Forbidden -- The requested resource is hidden and may be accessed by the administrators only.
404Not Found -- The specified resource could not be found.
405Method Not Allowed -- You tried to access a resource with an invalid method.
406Not Acceptable -- You requested a format that isn't json.
410Gone -- The resource requested has been removed from our servers.
418I'm a teapot.
429Too Many Requests -- You're requesting too many times! Slow down!
500Internal Server Error -- We had a problem with our server. Try again later.
503Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Common User Errors

While the above codes represent API-level errors, users may also encounter issues caused by incorrect usage. These are not API errors but can prevent successful requests.

Examples of Common User Errors:

  • Incorrect curl formatting: Placing multiple curl commands on the same line without proper separation can lead to terminal errors.
  • Missing headers: Forgetting to include required headers such as Authorization: Bearer <token>.
  • Improper JSON body formatting: Using single quotes or missing commas in JSON payloads.
  • Not URL-encoding query parameters: For example, spaces in groupName must be encoded as %20.

Tips to Avoid User Errors:

  • Always validate JSON payloads before sending.
  • Use single-line curl commands for clarity.
  • Double-check required headers and authentication tokens.
  • Encode special characters in query parameters.