Just like a request, the response data is always returned as JSON.

Each response follows the same JSON schema. The first parameter that you should always check is success, which will tell you if the call was successful or not. If the request is successful, the response will be inside the data parameter. Otherwise, the error parameter will contain an array of errors describing the issue.


Success Response

All success response follows the same schema

{
    "data": null, // response object otherwsie
    "extension_data": null, //additional metadata
    "context": null,
    "success": true, // boolean, indicates if request is successful
    "errors": [],
    "warnings": [], // warnings may contain non critical issues
    "information": [] // Information about the execution of the request
}

Error Response

All error response follows the same schema

{
    "data": null, 
    "extension_data": null,
    "context": null,
    "success": false,
    "errors": [
        {
            "extension_data": null,
            "stack_trace": "", // error stack trace 
            "description": "", // error description
            "error_code": "" // error code
        }
    ],
    "warnings": [],
    "information": []
}