PureSpectrum applies the technical standards of the REST principles.Generally: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx range indicate an error with PureSpectrum’s servers (these are rare).Do not rely on individual status codes for determining overall success / failure of a request. The success status code may change depending on the content of the response or the action taken by the server.It's good practice to accept any success code as a successful response. You may still implement response handlers for individual status codes but only after a success/failure check has been performed.
So, developers can always receive, read, decode, or understand the errors in responses based on the following form:| Response | Status | Meaning |
|---|
200 | Success | The request has succeeded. |
201 | Created | API call has been accepted for processing. The sent resource has been successfully inserted/updated at our database. |
PureSpectrum Buy APIs may return the following error codes in response to any request encountering an error.:| Response | Status | Meaning |
|---|
400 | Bad Request | Invalid parameters, fields or filters. |
401 | Unauthorized | Authorization error (invalid basic auth data or API key). |
403 | Forbidden | Unauthorized errors. |
404 | Record Not Found | Surveys or other data is not found. |
500 | Server Errors | Something went wrong on PureSpectrum’s end. (these are rare) |