> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 客户对象

> 介绍客户对象及其属性，包括联系方式、地址和证件数据

此对象表示将使用您的服务进行支付的客户。

## 属性

**id** `string`

客户的唯一标识符（MAX 64; MIN 36）。

示例：faa89e18-5a11-11ed-9b6a-0242ac120002

**merchant\_customer\_id** `string`

客户在外部商户中的唯一标识符（MAX 255; MIN 1）。

示例：50ca6f06-5a12-11ed-9b6a-0242ac120002

**merchant\_customer\_created\_at** `timestamp`

客户在商户平台上的注册日期（MAX 27; MIN 27 [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)）。

示例：2022-05-09T20:46:54.786342Z

**first\_name** `string`

客户的名字（MAX 255; MIN 1）。

示例：John

**last\_name** `string`

客户的姓氏（MAX 255; MIN 1）。

示例：Doe

**gender** `enum`

客户的性别（MAX 2; MIN 1）。

可能的枚举值：`M`、`F` 或 `NB`

**date\_of\_birth** `string`

客户的出生日期，格式为 YYYY-MM-DD（MAX 10; MIN 10）。

示例：1990-02-28

**email** `string`

客户的 email（MAX 255; MIN 3）。

示例：[john.doe@email.com](mailto:john.doe@email.com)

**nationality** `enum`

客户的国籍（MAX 2; MIN 2; [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)）。

可能的枚举值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

**country** `enum`

客户所在的国家/地区（MAX 2; MIN 2; [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)）。

可能的枚举值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

**document** `object`

指定客户的证件对象，包括证件号码和类型。

**属性**

**document\_number** `string`

客户的证件号码（MAX 40; MIN 3）。

示例：1093333333

**document\_type** `enum`

客户的证件类型（MAX 6; MIN 2）。

可能的枚举值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

**phone** `object`

指定客户的电话号码对象。

**属性**

**country\_code** `string`

客户电话的国际区号（MAX 3; MIN 1）。可能的值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

示例：57

**number** `string`

客户的电话号码，不含国际区号（MAX 32; MIN 1）。

示例：3132450765

**billing\_address** `object`

指定客户的账单地址对象。

**属性**

**address\_line\_1** `string`

客户账单地址的第一行（MAX 255; MIN 3）。

示例：Calle 34 # 56 - 78

**address\_line\_2** `string`

客户账单地址的第二行（MAX 255; MIN 3）。

示例：Apartamento 502, Torre I

**city** `string`

账单地址所在的城市（MAX 255; MIN 3）。

示例：Bogotá

**country** `enum`

账单地址所在的国家/地区（MAX 2; MIN 2; [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)）。

可能的枚举值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

**state** `string`

账单地址所在的州/省（MAX 255; MIN 3; [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)）。

示例：Cundinamarca

**zip\_code** `string`

账单地址的邮政编码（MAX 11; MIN 4）。

示例：111111

**neighborhood** `string`

客户地址所在的街区（MAX 255; MIN 2）

示例：Barrio 11

**shipping\_address** `object`

指定客户的收货地址对象。

**属性**

**address\_line\_1** `string`

客户收货地址的第一行（MAX 255; MIN 3）。

示例：Calle 34 # 56 - 78

**address\_line\_2** `string`

客户收货地址的第二行（MAX 255; MIN 3）。

示例：Apartamento 502, Torre I

**city** `string`

收货地址所在的城市（MAX 255; MIN 3）。

示例：Bogotá

**country** `enum`

收货地址所在的国家/地区（MAX 2; MIN 2; [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)）。

可能的枚举值：请查看[国家/地区参考](https://docs.y.uno/zh-hans/reference/country-reference.md)。

**state** `string`

收货地址所在的州/省（MAX 255; MIN 3; [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)）。

示例：Cundinamarca

**zip\_code** `string`

收货地址的邮政编码（MAX 10; MIN 5）。

示例：111111

**neighborhood** `string`

客户地址所在的街区（MAX 255; MIN 2）

示例：Barrio 11

**metadata** `array of objects`

指定与客户关联的自定义键值对列表（用于内部引用、客户细分或工作流标签）。最多可以添加 50 个 metadata 对象。

**属性**

**metadata object** `object`

指定一个 metadata 键及其对应的值。

用于附加商户自定义的上下文信息（例如：`crm_id`、`segment`）。请避免发送敏感数据或个人数据。

**属性**

**key** `string`

指定一个 metadata 键。

示例：age

**value** `string`

指定所定义的 metadata 键对应的值。

示例：28

**created\_at** `timestamp`

客户的创建日期和时间（MAX 27; MIN 27; [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)）。

示例：2022-05-09T20:46:54.786342Z

**updated\_at** `timestamp`

客户的最后更新日期和时间（MAX 27; MIN 27; [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)）。

示例：2022-05-09T20:46:54.786342Z

## 操作

* [创建客户](https://docs.y.uno/zh-hans/reference/customers/create-customer.md)
* [检索客户](https://docs.y.uno/zh-hans/reference/customers/retrieve-customer.md)
* [按外部 ID 检索客户](https://docs.y.uno/zh-hans/reference/customers/retrieve-customer-by-external-id.md)
* [更新客户](https://docs.y.uno/zh-hans/reference/customers/update-customer.md)
* [删除客户](https://docs.y.uno/zh-hans/reference/customers/delete-customer.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.