Responses from the Data API

When you send a request, you will get a response containing:

  • an HTTP status code - for more detail about different HTTP response codes check out the W3Schools documentation on the topic.
  • a Content-Type header of text/xml
  • an XML response body containing the data you requested (or an error)

Success

A success response returns a http status of 200 OK, along with an XML document. The exact XML document will depend on the action you executed and on what resource.

Error

If there’s an error, the API will respond with an appropriate http response error code and an XML document containing the error(s). This will be of the format:

<rsp stat="fail" version="3.0">
   <error>
    <code>501</code>
    <msg>Attempted to use invalid API interface: MyInterface</msg>
  </error>
</rsp>

If there is more than one error they will be detailed in the XML body.

Different http response error codes used by the system include:

Code Name Additional Detail
400 Bad Request This error code is used when there is more than error returned, or if a general error occured. Refer the the XML document for additional information
401 Unauthorized An invalid, expired or non-existent API key is being used
403 Forbidden Attempted to access a forbidden API method
404 Not Found Attempted to access a non-existent resource
406 Not Acceptable Invalid fields were passed to a search or update
501 Not Implemented Returned if you attempt to use a resource that does not exist