Skip to main content

Create Customer

Register a new customer with their basic information and addresses.
POST /clientes/createCliente
Content-Type: application/json

{
  "numero_documento": "12345678",
  "nombres": "Juan Pérez",
  "fecha_nacimiento": "1990-01-15",
  "email": "[email protected]",
  "password": "securePassword123",
  "celular": "987654321",
  "tipo_cliente": "Natural",
  "tipo_pago": "Contado",
  "incluye_igv": 1,
  "id_distrito": 150101,
  "id_lista_precio": 1,
  "id_tipo_detraccion": 1,
  "extra_domicilio_a_domicilio": 5,
  "extra_domicilio_a_agencia": 3,
  "extra_agencia_a_domicilio": 3,
  "direcciones": [
    {
      "direccion": "Av. Javier Prado 123",
      "referencia": "Cerca al centro comercial"
    },
    {
      "direccion": "Jr. Los Olivos 456",
      "referencia": "Frente al parque"
    }
  ]
}

Request Parameters

numero_documento
string
required
Customer’s document number (DNI for individuals, RUC for companies)
nombres
string
required
Customer’s full name or company name
fecha_nacimiento
string
Date of birth in YYYY-MM-DD format
email
string
Customer’s email address
password
string
Password for customer portal access
celular
string
required
Mobile phone number
tipo_cliente
string
required
Customer type. Common values:
  • Natural - Individual
  • Jurídico - Company
tipo_pago
string
required
Payment type (e.g., “Contado”, “Crédito”)
incluye_igv
integer
required
Whether prices include IGV (tax):
  • 1 - Include IGV
  • 0 - Exclude IGV
id_distrito
integer
required
District ID where customer is located
id_lista_precio
integer
required
Price list ID (plan) assigned to customer
id_tipo_detraccion
integer
Detraction type ID for tax purposes
extra_domicilio_a_domicilio
integer
Extra charge for home-to-home delivery service
extra_domicilio_a_agencia
integer
Extra charge for home-to-agency delivery service
extra_agencia_a_domicilio
integer
Extra charge for agency-to-home delivery service
direcciones
array
required
Array of customer addresses

Response

Returns a success message when the customer is created successfully.
message
string
Success confirmation message

Error Responses

{
  "error": "El número de documento ya está registrado"
}

Customer Types

Customers can be classified into different types based on their legal status:
  • Natural: Individual person with DNI document
  • Jurídico: Company or legal entity with RUC document

Payment Types

Common payment type values:
  • Contado: Cash payment (immediate)
  • Crédito: Credit payment (deferred)

Address Structure

Each customer can have multiple delivery addresses. The address object contains:
  • direccion: The complete street address
  • referencia: Optional reference point to help locate the address (e.g., “Near the shopping mall”, “In front of the park”)

Extra Charges

Customers can have custom extra charges applied for different delivery service types:
  • extra_domicilio_a_domicilio: Additional fee for door-to-door delivery
  • extra_domicilio_a_agencia: Additional fee for home pickup to agency delivery
  • extra_agencia_a_domicilio: Additional fee for agency pickup to home delivery
These charges are added on top of the standard delivery prices.

Build docs developers (and LLMs) love