PAPER.ID uses standard and conventional HTTP Status Code for each API Response given in a single API Request. In a brief, HTTP Status code '2xx'
indicates that the request is accepted and successfully processed by Paper, '4xx'
indicates that failure is caused by the information provided. (E.g. missing some required parameters, credentials is not valid). '5xx'
indicates that the error is on the Paper side.
HTTP Status
Summary of HTTP Status used in Paper
HTTP Status | Description |
---|---|
200 OK | The request was successful |
201 Created | The request was successful and a resource was created |
204 No Content | The request was successful, but there is no representation to return (response) |
400 Bad Request | The request could not be understood or was missing required parameters |
401 Unauthorized | Authentication failed or user doesn't have permissions for requested operation |
403 Forbidden | Access Denied |
404 Not Found | Resource was not found |
405 Method Not Allowed | Requested method is not supported for the resource |
500 Internal Server Error | The server encountered and unexpected condition that prevented it from fulfilling the request |
Response Format
V1 Response Format
The API Call response have common form, both for success and error response
{
"status_code": 400,
"message": "error message",
"data": {
// response data
}
}
V2 Response Format
The successful API Call response will have a general format payload consisting of message and data parameters. The data will contain object resources or a dictionary of the object resources.
{
"message": "success",
"data": {
// resource object
}
}