# Export Customer

Used to retrieve a list of customers based on specified conditions

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Method</td><td><a data-footnote-ref href="#user-content-fn-1"><mark style="color:green;"><strong>POST</strong></mark></a></td></tr><tr><td>Link</td><td><mark style="color:orange;">{{host}}/Customer/Export</mark></td></tr></tbody></table>

{% tabs %}
{% tab title="Request" %}

## Authorization

<table data-header-hidden><thead><tr><th width="183"></th><th></th></tr></thead><tbody><tr><td>Type</td><td><mark style="color:blue;">Bearer Token</mark></td></tr><tr><td>Token</td><td><mark style="color:orange;">{{access_token}}</mark></td></tr></tbody></table>

## Body

```json
{
    "memvars": {
        "ma_kh": "API-KH0001",
        "modifyDateFrom": null,
        "pageIndex": 1
    }
}
```

## Parameter description

<table><thead><tr><th width="180">Tên</th><th width="40" data-type="checkbox">(*)</th><th width="78">Kiểu</th><th>Description</th></tr></thead><tbody><tr><td>ma_kh</td><td>false</td><td>string</td><td>Customer's code</td></tr><tr><td>modifyDateFrom</td><td>false</td><td>string</td><td>Customer creation date</td></tr><tr><td>pageIndex</td><td>true</td><td>string</td><td>When the API returns data, it will provide paginated results, with 'pageIndex' specifying the page to retrieve</td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```json
{
    "code": 200,
    "msg": "Success",
    "value": null,
    "data": {
        "data": [
            {
                "maKH": "API-KH0001",
                "tenKH": "Công ty TNHH ABC",
                "diaChi": "123 Hùng Vương, Q5. Hồ Chí Minh",
                "nh_kh1": "KHVIP",
                "datetime2": "2023-12-11T15:05:17.72"
            }
        ],
        "pageInfo": [
            {
                "pagecount": 50,
                "page": 1,
                "t_record": 1,
                "t_page": 1,
                "group": ""
            }
        ]
    }
}
```

## Descripsion result

<table><thead><tr><th width="242">Name</th><th>Descripsion</th></tr></thead><tbody><tr><td>code</td><td>When successfully executed, the status code is 200. For other codes, such as 401, 452, it indicates a failed operation, accompanied by a descriptive message explaining the result</td></tr><tr><td>msg</td><td>Description of API execution results</td></tr><tr><td>data.data</td><td>JSON array containing customers found based on the conditions specified in the request</td></tr><tr><td>data.pageInfo.pagecount</td><td>The maximum result per page that can be returned</td></tr><tr><td>data.pageInfo.page</td><td>The current page number</td></tr><tr><td>data.pageInfo.t_record</td><td>The total number of results across all pages</td></tr><tr><td>data.pageInfo.t_page</td><td>The total number of pages containing results</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

[^1]:


---

# 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://arito-dev.gitbook.io/arito-api-integration-documentation/list-api/export-customer.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.
