Handling API responses
Responses are usually JSON or XML-formatted objects. In some cases, such as when requesting a document, the response is data.
Response status
Successful API responses are in the 200 range. The body of the response has the result.
Error results have a response body that describes the error:
Response headers
In addition to the standard response headers, API responses include the following headers.
Response body
API responses use the following conventions:
- All response fields are in camelCase:
userName,envelopeId. - All values that represent constants or enumerations, except for errors, are given in lowercase:
status: 'created'. - Error constants are in uppercase.
- Fields with
uriin their name are relative to the base URL. - Fields with
urlin their name are fully qualified URLs. - All times are in UTC.
By default, responses are formatted as JSON. Otherwise, results are rendered according to the Content-Type header in the request. For example, if you request a document from an envelope, the response body contains the data of a PDF file, and the content type is application/pdf.