Skip to Content
v1.5Official documentation for the LX CloudPos API · stable in production
v1.5 (current)Data modelFacturaApiClienteDto

FacturaApiClienteDto

Identifies the recipient of the document. Required for FE, NC, and ND; optional for TE.

interface FacturaApiClienteDto { /** ID of an existing customer. If provided, the other fields are ignored. */ idCliente?: number | null; /** Recipient's ID number (cédula). Alternative to idCliente: it's looked up in the tenant and, if it doesn't exist, is created with the fields below. */ identificacion?: string | null; /** ID type. See Hacienda catalog. Required if creating by identificacion. */ tipoIdentificacion?: string | null; /** Legal name or full name. */ nombre?: string | null; /** Email to automatically send the document to. */ correo?: string | null; /** Phone number with country code. */ telefono?: string | null; }

Fields

FieldTypeRequiredDescription
idClientenumberOne of the twoID of the existing customer in the tenant’s catalog. If present, the other fields are ignored.
identificacionstringOne of the twoRecipient’s ID number. It’s looked up in the tenant and, if it doesn’t exist, is created.
tipoIdentificacionstringIf creatingID type per Hacienda catalog.
nombrestringIf creatingLegal name or full name.
correostringOptionalEmail the document will be automatically sent to.
telefonostringOptionalPhone number with country code.

Usage modes

{ "idCliente": 42 }

LX CloudPos looks up the customer by ID in the tenant’s catalog. If it doesn’t exist, 400.

Mode B — By ID number, with automatic creation

{ "identificacion": "3-101-123456", "tipoIdentificacion": "02", "nombre": "Comercializadora Ejemplo S.A.", "correo": "facturas@ejemplo.cr", "telefono": "22001100" }

This is the intended mode for integrators: you don’t need to know LX CloudPos’s internal identifiers.

  • If a customer with that ID number already exists in the tenant, it’s reused — it isn’t duplicated, nor are its data updated. Modifying it is done from the POS.
  • If it doesn’t exist, it’s created with the data sent. tipoIdentificacion and nombre become required; if missing, a 400 is returned indicating exactly which one is missing.
  • The phone number and email are validated and normalized the same way as in the POS. A malformed email produces a 400, instead of a document that Hacienda accepts and the customer never receives.
  • The customer is created with paga_timbre set to false. If that customer is subject to the stamp tax (timbre), it must be adjusted from the POS: it’s not a value assumed on an automatic creation.