# 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:

```json
{
  "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:

```http
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:

```http
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

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

### Example Response

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.providusbank.com/reference/api-reference/data-formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
