Table of Contents
This section lists the data formats supported by this API for request and response bodies. The applicable MIME type is also listed for your convenience.
JSON is currently the only data format supported by this API.
Supported Data Formats
|Data Format||MIME type|
Specifying the Data Format for Response Data
Accept header specifies the MIME type for the format in which you would like the API to return data to you. You may specify the
Accept header using any valid syntax, including a combination of multiple MIME types with wildcards and quality values. The following examples are all considered to be valid and accepted by this API.
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
If you do not specify the
Accept header then API will assume
application/json as the value.
The response will always contain a
Content-Type header specifying the data type of the resource being returned.
If you specify an
Accept header that does not allow one of the Supported Data Formats as one of the specified MIME types, the API will respond with an HTTP Status of
406: Not Acceptable. In this case, the API must assume that the caller will not understand any supported data formats. So, the error response will have no content.
|HTTP Status||Error Code||Description|
|No supported data type was allowed in the |
Example: Proper Use of the Accept Header
This example sets the
Accept header in its simplest form to allow all data formats as a response from the API.
Content-Type header in the response indicates that the API has provided JSON data.
Example: Content-Type Does Not Allow Any Supported Data Formats
This example shows a request for XML data from the API. Since the API does not support XML, and since the Content-Type header does not provide any other alternatives, the API responds with an error.
Also, since the API must assume that the caller only wants XML in the response, the standard JSON formatted error message is not returned.
Lists the data formats supported by the API and explains how to specify a data format in your requests