> For the complete documentation index, see [llms.txt](https://asiabill.gitbook.io/api-explorer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asiabill.gitbook.io/api-explorer/api-reference/jiao-yi/customer.md).

# customer

{% openapi src="/files/AM3SZZl8CySoEL2YMS4v" 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="/files/AM3SZZl8CySoEL2YMS4v" 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="/files/AM3SZZl8CySoEL2YMS4v" 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="/files/AM3SZZl8CySoEL2YMS4v" 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            |
