POST
/
customers
Crear clientes
curl --request POST \
  --url https://api.onepay.la/v1/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-idempotency: <x-idempotency>' \
  --data '{
  "user_type": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "document_type": "<string>",
  "document_number": "<string>"
}'
{
  "id":"9da58912-101d-46f8-86c9-20a52119c0bf",
  "first_name":"John",
  "last_name":"Doe",
  "email":"john.doe@example.com",
  "phone":"+573100001020",
  "document_type":"CC",
  "document_number":"1060500333",
  "created_at":"2024-12-04T20:09:08.000000Z"
}

Headers

x-idempotency
string
required
Token único para garantizar la idempotencia de la petición

Body

user_type
string
required
Tipo de usuario, valores permitidos: natural, company
first_name
string
required
Primer Nombre del cliente
last_name
string
required
Apellidos Nombre del cliente
email
string
required
Correo electrónico del cliente
phone
string
required
Número de teléfono del cliente usa el prefijo de la región ejemplo: +57
document_type
string
required
Tipo de documento de identidad (CC, CE, NIT, PASSPORT)
document_number
string
required
Número de documento de identidad

Response

{
  "id":"9da58912-101d-46f8-86c9-20a52119c0bf",
  "first_name":"John",
  "last_name":"Doe",
  "email":"john.doe@example.com",
  "phone":"+573100001020",
  "document_type":"CC",
  "document_number":"1060500333",
  "created_at":"2024-12-04T20:09:08.000000Z"
}