# customer

{% openapi src="<https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30>" path="/V2022-03/customers" method="post" %}
[gitbook .json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media\&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30)
{% endopenapi %}

### 创建客户接口请求报文示例

{% code title="createCustomer.sh" %}

```
curl --request POST \
  --url https://{paymentApiUrl}/V2022-03/customers \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
  --data'{
    "description": "It's VIP 40210 customer",
    "email": "labdpno@163.com",
    "firstName": "Smfrvi",
    "lastName": "Txwtbs",
    "phone": "13924343678"
}'
```

{% endcode %}

{% openapi src="<https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30>" path="/V2022-03/customers/{customerId}" method="get" %}
[gitbook .json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media\&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30)
{% endopenapi %}

### 获取客户接口请求报文示例

{% code title="getCustomer.sh" %}

```
curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/customers/cus_1526753334131306496 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
```

{% endcode %}

#### **结果对象描述（创建客户接口、获取客户接口）**

| property name | type   | description |
| ------------- | ------ | ----------- |
| code          | String | 返回码         |
| message       | String | 返回信息        |
| data          | Object | 数据对象        |
| customerId    | String | 客户ID        |
| email         | String | 邮箱          |
| firstName     | String | 名           |
| lastName      | String | 姓           |
| phone         | String | 电话          |
| description   | String | 描述          |
| created       | String | 创建客户时间      |

{% openapi src="<https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30>" path="/V2022-03/customers" method="get" %}
[gitbook .json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media\&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30)
{% endopenapi %}

### 批量获取客户接口请求报文示例

{% code title="getCustomerList.sh" %}

```
curl --request GET \
  --url https://{paymentApiUrl}/V2022-03/customers?pageIndex=1&pageSize=100 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
```

{% endcode %}

#### 结果对象属性描述（获取所有客户接口）

| property name | type    | description |
| ------------- | ------- | ----------- |
| code          | String  | 返回码         |
| message       | String  | 返回信息        |
| data          | Object  | 数据对象        |
| page          | Object  | 分页对象        |
| pageIndex     | Integer | 当前页         |
| pageSize      | Integer | 每页数据条数      |
| total         | Integer | 总条数         |
| list          | Array   | 列表          |
| customerId    | String  | 客户ID        |
| email         | String  | 邮箱          |
| firstName     | String  | 名           |
| lastName      | String  | 姓           |
| phone         | String  | 电话          |
| description   | String  | 描述          |
| created       | String  | 创建客户时间      |

{% openapi src="<https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30>" path="/V2022-03/customers/{customerId}" method="delete" %}
[gitbook .json](https://1129616527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb9UzyxGUyxHylm4UJSJ%2Fuploads%2FaSm0HICLvmjsHIG0gPX6%2Fgitbook%20.json?alt=media\&token=02baaaa5-1304-46b3-bba2-4dbae43ffa30)
{% endopenapi %}

### 删除客户接口请求报文示例

```
curl --request DELETE \
  --url https://{paymentApiUrl}/V2022-03/customers/cus_1526753334131306496 \
  --header 'Content-Type: application/json' \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
```

#### **结果对象描述（删除客户接口）**

| property name | type   | description       |
| ------------- | ------ | ----------------- |
| code          | String | 返回码，"00000"表示删除成功 |
| message       | String | 返回信息              |
| data          | Object | 返回null            |


---

# 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://asiabill.gitbook.io/api-explorer/api-reference/jiao-yi/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.
