Data Formats

Our API supports multiple data formats for both request payloads and response bodies. Here are the primary formats:

1. JSON (Default)

  • Request: Ensure your request payload is in valid JSON format.

  • Response: All responses are in JSON format by default.

Example Request:

{
  "key1": "value1",
  "key2": "value2"
}

2. Form-Data

For certain endpoints, you may need to send data using the application/x-www-form-urlencoded format.

Example Request:

httpCopy codePOST /endpoint
Content-Type: application/x-www-form-urlencoded

key1=value1&key2=value2

3. File Uploads

If your application requires file uploads, use the multipart/form-data format.

Example Request:

httpCopy codePOST /upload
Content-Type: multipart/form-data

file=@/path/to/file.txt

Make sure to check the documentation for each endpoint to determine the required data format.

4. Pagination

For resource-intensive endpoints that return large sets of data, our API supports pagination. This allows you to retrieve a subset of data in each request.

Query Parameters

  • page: Specifies the page number (e.g., page=1, page=2).

  • per_page: Specifies the number of items per page (e.g., per_page=10).

Example Request

GET /large-data-endpoint?page=2&per_page=20

Example Response

jsonCopy code{
  "data": [
    // ...items for page 2
  ],
  "meta": {
    "page": 2,
    "per_page": 20,
    "total_items": 100
  }
}

Last updated