This section provides detailed information about the different response formats supported by our API.

Supported Formats

Our API supports various response formats to cater to different client needs. Here are the most commonly used formats:

  • JSON: The default and most widely used format. It is lightweight and easy to parse.
  • XML: A format that is more verbose but can be useful for certain applications.
  • CSV: Ideal for data analysis and spreadsheet applications.

How to Specify the Response Format

To specify the desired response format, you can use the Accept header in your request. For example:

GET /api/resource?query=value HTTP/1.1
Host: example.com
Accept: application/json

Example Response

Here is an example of a JSON response:

{
  "data": [
    {
      "id": 1,
      "name": "Example Item",
      "description": "This is an example item."
    },
    {
      "id": 2,
      "name": "Another Item",
      "description": "This is another example item."
    }
  ]
}

For more information on how to work with our API, please visit our API Reference.

API Reference