Skip to main content

Register Customer

Initiate the customer registration process. This endpoint sends a verification code to the customer’s email.
curl -X POST https://api.eisegmi.facturador.es/auth/clienteRegister \
  -H "Content-Type: application/json" \
  -d '{
    "nombres": "Juan Pérez",
    "email": "juan.perez@example.com"
  }'

Request Body

nombres
string
required
Customer’s full name
email
string
required
Customer’s email address. A verification code will be sent to this email.

Response

{
  "message": "Código de verificación enviado al correo electrónico",
  "status": 200
}
After successful registration, the customer will receive a verification code via email. This code is required to complete the account verification in the next step.

Verify Registration Code

Verify the customer’s email address using the code sent during registration.
curl -X POST https://api.eisegmi.facturador.es/auth/clienteValidarCodigoRegistro \
  -H "Content-Type: application/json" \
  -d '{
    "email": "juan.perez@example.com",
    "codigo": "123456"
  }'

Request Body

email
string
required
Customer’s email address that was registered
codigo
string
required
Verification code sent to the customer’s email

Response

{
  "message": "Cuenta verificada exitosamente",
  "status": 200
}

Complete Customer Profile

After email verification, complete the customer profile with additional details.
curl -X POST https://api.eisegmi.facturador.es/auth/clienteCrear \
  -H "Content-Type: application/json" \
  -d '{
    "numero_documento": "12345678",
    "nombres": "Juan Pérez",
    "fecha_nacimiento": "1990-05-15",
    "email": "juan.perez@example.com",
    "password": "securePassword123",
    "id_lista_precio": 1,
    "id_distrito": 150101,
    "celular": "987654321",
    "tipo_cliente": "Natural",
    "tipo_pago": "Contado",
    "incluye_igv": 1,
    "extra_domicilio_a_domicilio": 0,
    "extra_domicilio_a_agencia": 0,
    "extra_agencia_a_domicilio": 0,
    "id_tipo_detraccion": null,
    "direcciones": []
  }'

Request Body

numero_documento
string
required
Customer’s national ID or document number
nombres
string
required
Customer’s full name
fecha_nacimiento
string
required
Customer’s date of birth (format: YYYY-MM-DD)
email
string
required
Customer’s verified email address
password
string
required
Customer’s account password
id_lista_precio
integer
required
Price list/plan ID for the customer
id_distrito
integer
required
District ID where the customer is located
celular
string
Customer’s mobile phone number
tipo_cliente
string
required
Customer type (e.g., “Natural”, “Jurídica”)
tipo_pago
string
required
Payment type (e.g., “Contado”, “Crédito”)
incluye_igv
integer
required
Whether prices include IGV/tax (1 = yes, 0 = no)
extra_domicilio_a_domicilio
integer
Extra charge for door-to-door delivery
extra_domicilio_a_agencia
integer
Extra charge for door-to-agency delivery
extra_agencia_a_domicilio
integer
Extra charge for agency-to-door delivery
id_tipo_detraccion
integer
Tax withholding type ID (optional)
direcciones
array
Array of customer addresses (can be empty initially)

Response

{
  "message": "Cliente creado exitosamente",
  "status": 200,
  "data": {
    "id": 789,
    "nombres": "Juan Pérez",
    "email": "juan.perez@example.com"
  }
}

Registration Flow

1

Start Registration

Call /auth/clienteRegister with customer name and email. A verification code is sent to the email.
2

Verify Email

Call /auth/clienteValidarCodigoRegistro with the email and verification code received.
3

Complete Profile

Call /auth/clienteCrear with complete customer information to finalize the registration.
4

Login

Customer can now login using the /auth/loginCliente endpoint.
The verification code typically expires after a certain time period. If the code expires, the customer will need to restart the registration process.

Build docs developers (and LLMs) love