Responses and Errors

Sendstack's API is RESTful and as such, uses conventional HTTP response codes to indicate the success or failure of requests.

NOTE: Fields marked with an asterisk (*) in the request parameter are required.

HTTP Status Code

Description

200

Request was successful and intended action was carried out.

201

A resource has successfully been created.

400

A validation or client side error occurred and the request was not fulfilled.

401

The request was not authorized. This can be triggered by passing an app_id or app_secret in the request headers or the lack of one.

404

Request could not be fulfilled as the request resource does not exist.

5xx

Request could not be fulfilled due to an error on Sendstack's end. This shouldn't happen so please report as soon as you encounter any instance of this.

Sample success response

// Successful Reponse - 200 OK
{
    "status": true,
    "message": "Partners fetched successfully",
    "data": {
        "partners": [
            {
                "type": "deliveryCompany"
            }
        ],
        "page": 1,
        "totalPages": 1,
        "totalCount": 1
    }
}

Sample Error Response

// Error Reponse - 401 unauthorized
{
    "status": false,
    "message": "Invalid app_id or app_secret"
}

Last updated