HTTP Status Codes

The HTTP protocol has a rich set of status codes, and it is these codes that are conventionally used in reporting problems to the calling application. However, it is tedious for developers to have to write code to support a large number of esoteric error codes.

To help alleviate this, the jSign API supports only the following HTTP status codes:

Code Status Description
200 OK

Request completed normally. The meaning of the success depends on the HTTP methods, but the resource has been fetched and is transmitted in the message body. Used primarily for successful GET requests.

201 Created The request has succeeded and a new resource has been created as a result. Used only for POST requests.
400 Bad Request Used to report data validation errors (FILE_INVALID) or other any other error where the requests could not be satisfied due to problems with the input. A client side error.
401 Unauthorized Used to report authorization errors. A client side error.
404 Not Found Returned if the requested resource is not a valid part of this API. A client side error.
500 Internal Server Error Used to report any unexpected error in processing on the server side.

In the event of an error — anything other than a 200 or 201 code — the API returns the most appropriate HTTP return code from the list above, along with a data payload with a verbose description of the problem.

Common Error Format

For each non-2xx code, the following format is used to return the data payload for the error.

{
       "errors": [ 
            { 
                   "error_code": "UNAUTHORIZED",
                  "developer_message": "Client credentials are required" 
           }
      ]
 }

Fields

The following fields are present in each returned error code.

Field Description
errors.error_code The distinct error code. Refer to the Detailed Error Codes section for more information.
errors.developer_message Technical description of the error in U.S. English, meant for the producers of the API rather than the clients.

Return to the top of this page.