Skip to content

API Status Codes

200 OK

The request has succeeded. Returned by GET /schedules, GET /schedules/:schedule_id, and DELETE /schedules/:schedule_id

{
    "status": "success",
    "results": [
        {
            "frequency": "daily",
            "endpoint": "https://reviewindexapi.datashake.com/profiles",
            "schedule_id": 2,
            "schedule_name": "Conrad Bengaluru Schedule",
            "service": "riapi",
            "last_successful_run": "2023-08-25T10:40:00",
            "payload": {
                "body": {},
                "headers": {},
                "query_params": {
                    "name": "Conrad Bengaluru",
                    "city": "Bangalore",
                    "zip_code": "560008",
                    "callback": "https://www.example.com/callback"
                }
            },
            "disabled": false,
            "last_request_id": null,
            "last_successful_request_id": null
        }
    ]
}
201 CREATED

Schedule was successfully created.

{
    "status": "success",
    "results": [
        {
            "schedule_id": 2,
            "frequency": "daily",
            "service": "riapi",
            "endpoint": "https://reviewindexapi.datashake.com/profiles",
            "schedule_name": "Conrad Bengaluru Schedule",
            "last_successful_run": null,
            "payload": {
                "query_params": {
                    "name": "Conrad Bengaluru",
                    "city": "Bangalore",
                    "zip_code": "560008",
                    "callback": "https://www.example.com/callback",
                },
                "body": {},
                "headers": {}
            },
            "disabled": false,
            "last_request_id": null,
            "last_successful_request_id": null
        }
    ]
}
400 BAD REQUEST

Request was invalid.

{
    "status": "failed",
    "message": "Invalid request",
    "details": "Missing required field: frequency"
}
401 UNAUTHORIZED

Missing or invalid API key.

{
    "status": "failed",
    "message": "Invalid API key",
    "details": null
}
403 FORBIDDEN

Access not allowed.

{
    "status": "failed",
    "message": "Forbidden",
    "details": null
}
500 INTERNAL SERVER ERROR

Internal error.

{
    "status": "failed",
    "message": "Unknown error occured",
    "details": null
}