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

FacturaCompraApiEmisorDto

Identifies the supplier — who fiscally appears as the issuer of the document, even though its generation and submission to Hacienda are done by the integrator.

interface FacturaCompraApiEmisorDto { /** ID of an existing supplier in the tenant's catalog. If provided, the other fields are ignored. */ idEmisor?: number | null; /** Supplier's ID number (cédula). Alternative to idEmisor: 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; /** Name. Required if creating by identificacion. */ nombre?: string | null; /** Last name (individual). */ apellidos?: string | null; /** Trade name, if applicable. */ nombreComercial?: string | null; /** Supplier's email. */ correo?: string | null; /** Phone number with country code. */ telefono?: string | null; /** Supplier's economic-activity code. Only used when creating: it goes into the XML's CodigoActividadEmisor. On an existing supplier it isn't changed through here — it's edited from the POS. */ codigoActividadEmisor?: string | null; }

Fields

FieldTypeRequiredDescription
idEmisornumberOne of the twoID of the existing supplier in the tenant’s catalog. If present, the other fields are ignored.
identificacionstringOne of the twoSupplier’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 creatingSupplier’s name.
apellidosstringOptionalLast name, when it’s an individual.
nombreComercialstringOptionalTrade name, if applicable.
correostringOptionalSupplier’s email.
telefonostringOptionalPhone number with country code.
codigoActividadEmisorstringOptionalSupplier’s economic activity. Only used when creating.

Usage modes

{ "idEmisor": 15 }

Same as cliente.idCliente for sales (see FacturaApiClienteDto): looks up by ID in the tenant’s catalog. If it doesn’t exist, 400.

Mode B — By ID number, with automatic creation

{ "identificacion": "1-0234-0567", "tipoIdentificacion": "01", "nombre": "Juan", "apellidos": "Pérez Solano", "correo": "juan.perez@correo.cr", "telefono": "88001122", "codigoActividadEmisor": "011101" }
  • If a supplier with that ID number already exists in the tenant, it’s reused — it isn’t duplicated, nor are its data updated.
  • If it doesn’t exist, it’s created. tipoIdentificacion and nombre become required; without them, 400.
  • The phone number and email are validated and normalized the same way as in the POS. An invalid format is 400.
  • Hacienda validates the supplier’s ID number independently. The creation succeeding in LX CloudPos doesn’t guarantee Hacienda will recognize it: if the ID number doesn’t exist in its registry, the document ends up rejected.