Responses

API success and error responses

API Standard Responses

Our success and error responses have a consistent structure so that integrations to endpoints only have a binary path. The response is either successful, or there was an error.

Success

Our success responses will always be in the following format (unless explicitly documented differently on certain calls).

Handling a response example

Our recommended implementation of a response is shown in the following example (done in basic syntax for simplicity):

if (response.status == "success"){
 // Do something with the data
 let data = response.data;
}
else{
 // Something went wrong.
 console.log(response.message);
}

Error

Our error responses will always contain a "message" and "status". Header errors follow standard set at https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Last updated