# Response Format

All API responses will return either an object or an array, ensuring a consistent and predictable structure that is easy to parse.

### **Successful Responses**

For successful requests, the API will return an array or object containing the relevant data.

For example, calling **`GET /api/v1/master-record/{masterName}`** to retrieve all master records will return a response in the following format:<br>

```json
{
    "rows": [
        {
            "_id": "67bfcbd6117e4e25e1d31dd3",
            "customFields": {
                "connumber": 1,
                "radiobutton": "A",
                "only_one_checkbox": true,
                "date1": "2025-10-01",
                "name1": "qa",
                "nomber1": 1,
                "number2": 2,
                "checkbox": [
                    "A"
                ],
                "select_from_list": "A"
            },
            "parentID": null,
            "slug": "iWlOE8K",
            "refId": "iWlOE8K",
            "tenantID": "cwWdTZK",
            "createdBy": "nivedita@exto360.com",
            "createdAt": "2025-02-27T02:20:06.958Z",
            "isDeleted": false,
            "projectID": "Vx6-j2Z",
            "id": "67bfcbd6117e4e25e1d31dd3"
        },
        {
            "_id": "67bfcbd6117e4e25e1d31dd5",
            "customFields": {
                "connumber": 3,
                "radiobutton": "A",
                "only_one_checkbox": true,
                "date1": "2024-10-01",
                "name1": "qa",
                "nomber1": 1,
                "number2": 2,
                "checkbox": [
                    "A"
                ],
                "select_from_list": "A"
            },
            "parentID": null,
            "slug": "LHoUC50",
            "refId": "LHoUC50",
            "tenantID": "cwWdTZK",
            "createdBy": "nivedita@exto360.com",
            "createdAt": "2025-02-27T02:20:06.958Z",
            "isDeleted": false,
            "projectID": "Vx6-j2Z",
            "id": "67bfcbd6117e4e25e1d31dd5"
        }
        
    ],
    "total": 1069,
    "page": 1,
    "pageSize": 10,
    "totalPages": 107
}
```

**Response Fields:**

* **`rows`** → Contains the list of retrieved records.
* **`total`** → Total number of records available.
* **`page`** → Current page number.
* **`pageSize`** → Number of records per page.
* **`totalPages`** → Total pages available based on pagination.

### Error Response&#x20;

If a request fails, the API will return an error object with details.

For example, if `ITEM_MASTER` does not exist, calling **`GET /api/v1/master-record/ITEM_MASTER`** will return the following error response:

```json
{
    "code": 500,
    "timestamp": "2025-02-27T02:22:42.856Z",
    "path": "/api/v1/master-record/MASTER_31",
    "error": {
        "summary": "Service Exception",
        "detail": [
            "ITEM_MASTER not Found."
        ]
    }
}
```

**Error Response Fields:**

* **`code`** → HTTP status code (e.g., 500 for internal server error).
* **`timestamp`** → Time when the error occurred.
* **`path`** → API endpoint that was called.
* **`error.summary`** → General error description.
* **`error.detail`** → Specific error details or message.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.exto360.com/integration/response-format.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.
