POST
/
customers
Crear clientes
curl --request POST \
  --url https://api.onepay.la/v1/customers \
  --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>",
  "enable_notifications": true,
  "nationality": "<string>",
  "birthdate": "<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",
  "nationality":"CO",
  "birthdate":"1990-01-01",
  "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
enable_notifications
boolean
default:"true"
required
Si deseas eliminar las notificaciones del cliente, setea el valor en false
nationality
string
Nacionalidad del cliente, Formato ISO 3166-1 alpha-2
birthdate
string
Fecha de nacimiento del cliente, formato YYYY-MM-DD

Response

id
string
Identificador único del cliente en formato UUID
name
string
Nombre del cliente
email
string
Correo electrónico del cliente
phone
string
Número de teléfono del cliente
document_number
string
Número de documento de identidad del cliente
document_type
string
Tipo de documento de identidad del cliente (ej. DNI, RUC, CE)
created_at
date
Fecha y hora de creación del cliente
{
  "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",
  "nationality":"CO",
  "birthdate":"1990-01-01",
  "created_at":"2024-12-04T20:09:08.000000Z"
}