GET https://api.fire.rest/v1/orders/21ec1f6c-c301-4528-b999-7836c1d21c6c/fiscal-print
x-api-key: <your_api_key>
Accept: application/json
{
"fiscal": {
"countryCode": "BR",
"documentType": "nfce",
"documentNumber": "1000013",
"authorizationProtocol": "141200000956123",
"authorizedAt": "2026-05-06T01:23:10.991Z",
"pdfUrl": "https://api.fiscal-provider.example/nfce/<docId>/pdf",
"xmlUrl": "https://api.fiscal-provider.example/nfce/<docId>/xml",
"status": "authorized",
"source": "authority",
"graphic": null
},
"countryData": {
"chaveAcesso": "41201008187168000160558050010000131609769080",
"serie": "1",
"serialNumber": 1
},
"company": {
"legalName": "Sandbox LTDA",
"tradeName": "Sandbox",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000"
},
"store": {
"name": "Loja Centro - SP",
"code": "BR-SP-001",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000",
"stateRegistration": "000000000000",
"city": "São Paulo",
"address": "Av. Paulista 1578, Bela Vista",
"phone": "1132094347"
},
"buyer": {
"isFinalConsumer": true,
"govIdType": "FINAL_CONSUMER",
"govIdNumber": "00000000000",
"name": "CONSUMIDOR FINAL",
"email": null,
"phone": null,
"address": null
},
"order": {
"id": "21ec1f6c-c301-4528-b999-7836c1d21c6c",
"orderCode": "OC-br-001",
"status": "COMPLETED",
"isCancelled": false,
"businessDayDate": "2026-05-06",
"createdAt": "2026-05-06T01:22:59.028Z"
}
}
Note there is no fiscalRepresentation. Brazil fiscalizes by callback, without going through
the Fiscal Gateway: there is no document numbered by Fire to mirror, so the key simply does not
come. The response is the same as always, field by field.
{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000003",
"authorizationProtocol": "1508202601179001234500120010010000000031234567813",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": {
"qr": "1508202601179001234500120010010000000031234567813"
}
},
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000003",
"issuedAt": "2026-08-15T22:32:14.826Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"establecimiento": "001",
"puntoEmision": "001",
"secuencial": "000000003",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000031234567813" },
"failure": null,
"compensates": null,
"history": []
},
"company": {
"legalName": "INT FOOD SERVICES CORP SA",
"tradeName": "KFC",
"govIdType": "RUC",
"govIdNumber": "1791415132001"
},
"order": {
"orderCode": "FUEL-EC-PRINT-0002",
"status": "COMPLETED",
"isCancelled": false
}
}
{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000009",
"status": "authorized",
"source": "representation",
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" }
},
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "CREDIT_NOTE",
"documentLabel": "NOTA DE CREDITO RIDE",
"documentNumber": "001-001-000000009",
"issuedAt": "2026-08-15T23:05:11.402Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" },
"failure": null,
"compensates": {
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"reason": "ORDER_CANCELLATION",
"reasonLabel": "Anulación de pedido"
},
"history": [
{
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"numberingStatus": "GENERATED",
"countryData": {
"numeroComprobante": "001-001-000000008",
"claveAcceso": "1508202601179001234500120010010000000081234567819",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000081234567819" },
"compensates": null
}
]
},
"order": {
"orderCode": "FUEL-EC-NC-0030",
"status": "CANCELLED",
"isCancelled": true
}
}
{
"fiscal": {
"countryCode": "CO",
"documentNumber": "SETP990000001",
"authorizationProtocol": "9c4f1e… (the CUFE)",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": null
},
"countryData": {
"numeroComprobante": "SETP990000001",
"cufe": "9c4f1e… (96 hexadecimal characters)",
"prefijo": "SETP",
"numeroDian": "990000001",
"qrCode": "https://catalogo-vpfe.dian.gov.co/document/searchqr?documentkey=9c4f1e…",
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA ELECTRONICA DE VENTA",
"documentNumber": "SETP990000001",
"issuedAt": "2026-08-16T14:21:03.118Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "VALIDACION PREVIA"
}
}
The credit note does not replace the invoice: it displaces it. On top stays the document in
force —the note, with its own number and its compensates— and the invoice the customer took away
printed moves down to history, with the same shape. To reprint it, you pull it out of there.
The ticket is printed before the SRI replies. In the example above source: "representation"
and authorizedAt: null: the receipt already has its number —numeroComprobante, the one that
goes on the paper— but numeroAutorizacion is still empty because the authority has not ruled
yet. When it does, the receipt’s number does not change; the authorization is added.
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "forbidden",
"message": "API key is missing the orders:read scope"
}
}
{
"error": {
"code": "not_found",
"message": "Order not found"
}
}
Fiscal print data
Retrieve the printable fiscal data for an order — emitter, store, buyer, document references, and country-specific fields. Use it to render a receipt or invoice from the integration side.
GET https://api.fire.rest/v1/orders/21ec1f6c-c301-4528-b999-7836c1d21c6c/fiscal-print
x-api-key: <your_api_key>
Accept: application/json
{
"fiscal": {
"countryCode": "BR",
"documentType": "nfce",
"documentNumber": "1000013",
"authorizationProtocol": "141200000956123",
"authorizedAt": "2026-05-06T01:23:10.991Z",
"pdfUrl": "https://api.fiscal-provider.example/nfce/<docId>/pdf",
"xmlUrl": "https://api.fiscal-provider.example/nfce/<docId>/xml",
"status": "authorized",
"source": "authority",
"graphic": null
},
"countryData": {
"chaveAcesso": "41201008187168000160558050010000131609769080",
"serie": "1",
"serialNumber": 1
},
"company": {
"legalName": "Sandbox LTDA",
"tradeName": "Sandbox",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000"
},
"store": {
"name": "Loja Centro - SP",
"code": "BR-SP-001",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000",
"stateRegistration": "000000000000",
"city": "São Paulo",
"address": "Av. Paulista 1578, Bela Vista",
"phone": "1132094347"
},
"buyer": {
"isFinalConsumer": true,
"govIdType": "FINAL_CONSUMER",
"govIdNumber": "00000000000",
"name": "CONSUMIDOR FINAL",
"email": null,
"phone": null,
"address": null
},
"order": {
"id": "21ec1f6c-c301-4528-b999-7836c1d21c6c",
"orderCode": "OC-br-001",
"status": "COMPLETED",
"isCancelled": false,
"businessDayDate": "2026-05-06",
"createdAt": "2026-05-06T01:22:59.028Z"
}
}
Note there is no fiscalRepresentation. Brazil fiscalizes by callback, without going through
the Fiscal Gateway: there is no document numbered by Fire to mirror, so the key simply does not
come. The response is the same as always, field by field.
{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000003",
"authorizationProtocol": "1508202601179001234500120010010000000031234567813",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": {
"qr": "1508202601179001234500120010010000000031234567813"
}
},
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000003",
"issuedAt": "2026-08-15T22:32:14.826Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"establecimiento": "001",
"puntoEmision": "001",
"secuencial": "000000003",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000031234567813" },
"failure": null,
"compensates": null,
"history": []
},
"company": {
"legalName": "INT FOOD SERVICES CORP SA",
"tradeName": "KFC",
"govIdType": "RUC",
"govIdNumber": "1791415132001"
},
"order": {
"orderCode": "FUEL-EC-PRINT-0002",
"status": "COMPLETED",
"isCancelled": false
}
}
{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000009",
"status": "authorized",
"source": "representation",
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" }
},
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "CREDIT_NOTE",
"documentLabel": "NOTA DE CREDITO RIDE",
"documentNumber": "001-001-000000009",
"issuedAt": "2026-08-15T23:05:11.402Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" },
"failure": null,
"compensates": {
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"reason": "ORDER_CANCELLATION",
"reasonLabel": "Anulación de pedido"
},
"history": [
{
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"numberingStatus": "GENERATED",
"countryData": {
"numeroComprobante": "001-001-000000008",
"claveAcceso": "1508202601179001234500120010010000000081234567819",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000081234567819" },
"compensates": null
}
]
},
"order": {
"orderCode": "FUEL-EC-NC-0030",
"status": "CANCELLED",
"isCancelled": true
}
}
{
"fiscal": {
"countryCode": "CO",
"documentNumber": "SETP990000001",
"authorizationProtocol": "9c4f1e… (the CUFE)",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": null
},
"countryData": {
"numeroComprobante": "SETP990000001",
"cufe": "9c4f1e… (96 hexadecimal characters)",
"prefijo": "SETP",
"numeroDian": "990000001",
"qrCode": "https://catalogo-vpfe.dian.gov.co/document/searchqr?documentkey=9c4f1e…",
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA ELECTRONICA DE VENTA",
"documentNumber": "SETP990000001",
"issuedAt": "2026-08-16T14:21:03.118Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "VALIDACION PREVIA"
}
}
The credit note does not replace the invoice: it displaces it. On top stays the document in
force —the note, with its own number and its compensates— and the invoice the customer took away
printed moves down to history, with the same shape. To reprint it, you pull it out of there.
The ticket is printed before the SRI replies. In the example above source: "representation"
and authorizedAt: null: the receipt already has its number —numeroComprobante, the one that
goes on the paper— but numeroAutorizacion is still empty because the authority has not ruled
yet. When it does, the receipt’s number does not change; the authorization is added.
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "forbidden",
"message": "API key is missing the orders:read scope"
}
}
{
"error": {
"code": "not_found",
"message": "Order not found"
}
}
- Emitter context — legal entity, gov ID, store info, state registration
- Country-specific fiscal references — chave de acesso, CUFE, clave de acceso, CAE, folio, etc., per country
- Buyer context — recipient, with anonymous/final-consumer flagging
- Order summary — code, status, business day
Two versions, both alive
GET /api/v1/restaurant-os/injected-orders/{orderId}/fiscal-print
GET /api/v2/restaurant-os/injected-orders/{orderId}/fiscal-print
| v1 | v2 | |
|---|---|---|
| Response blocks | fiscal, countryData, company, store, buyer, order | the same ones + fiscalRepresentation |
Authority codes in countryData | raw (ambiente: "2") | translated (ambiente: "PRODUCCION") |
| Credit note | cannot be composed | compensates + history |
ambiente is the same field with a
different value— and changing it in v1 would move the data out from under an already integrated
till. There is no sunset date for v1.fiscalRepresentation).fiscalRepresentation— the document exactly as it was numbered, with its history. It is what makes a credit note printable: it carriescompensates(which invoice it voids, with the reason already written out) and that whole invoice inhistory. In v1 that information does not exist.- Resolved labels —
FACTURA,NOTA DE CREDITO RIDE,EMISION NORMAL,PRODUCCION: the authority’s codes already translated, so you do not carry its table inside your POS. - The issue date (
issuedAt) of the receipt, which v1 does not expose.
Authentication
orders:read scope. Vendor-scoped: the API key must belong to the same vendor that owns the store/order.Path parameters
| reference | what it is |
|---|---|
orders.id | Fire’s internal UUID (matches data.orderId in order.completed) |
order_external | the id you assigned when creating the order |
metadata.order_id | a copy of the external id inside the order |
Query parameters
vendorId parameter was removed — if you send it, it is ignored.GET https://api.fire.rest/v1/orders/21ec1f6c-c301-4528-b999-7836c1d21c6c/fiscal-print
x-api-key: <your_api_key>
Accept: application/json
Response
Show fiscal
Show fiscal
BR, CO, EC, CL, AR, VE.nfce, nfe, factura_electronica, dte, factura_a.001-020-000000123 (it also shows up as
countryData.numeroComprobante), while the SRI’s reply lives in
countryData.numeroAutorizacion.null until the document is authorized.processing, authorized, cancelled, …), or null if the order is not fiscalized. Without it the nulls above are ambiguous: you cannot tell “the authority has not authorized yet” from “it authorized but the field is missing”.documentNumber, authorizationProtocol and countryData come from:authority— confirmed by the tax authority. Final.representation— issued by fiscal numbering before the authority replied. This is what was already printed at the till and will not change, but it is not authorized yet:authorizedAtstaysnullon purpose.null— neither one nor the other.
representation must NOT claim it is authorized.null when it returned none or the sale was not numbered.It is returned because reprinting is precisely the case where the original ticket is gone: in Ecuador the QR matches the access key and could be rebuilt, but in a country where it carries something else the till would have nothing to build it from.fiscal.countryCode. Examples:- BR:
chaveAcesso(44 digits),serie,serialNumber - CO:
cufe,prefijo,numeroDian - EC:
numeroComprobante,claveAcceso(49 digits),numeroAutorizacion,ambiente - CL:
folio,ted,tipoDte,trackId - AR:
cae,fechaVtoCae,puntoVenta,numeroComprobante,tipoComprobante - VE:
numeroControl,numeroFactura,rifEmisor
ambiente: "2" —that is how the SRI defines it— and in v2 what arrives is
"PRODUCCION", which is what goes on the print. In v1 that field still carries "2",
unchanged.
It is the same criterion as in fiscal numbering: translating it on
the point-of-sale side would mean every integrator keeps its own copy of the authority’s table,
and the first one to copy it wrong prints “PRUEBAS” on a production invoice.A country with no label table returns its values verbatim.null: it is not there.It is the same shape that travels in data.fiscalRepresentation on the events, so whoever learns
to read one reads the other.fiscal. They answer different questions: fiscal is the document
with the authority’s verdict on top —status, protocol, authorization date— and it changes
when the authority replies. This other one is what was printed at the till and it never
changes.When the SRI authorizes, fiscal.status turns to authorized and the PDF and the XML show up,
but the receipt’s number stays the same. They are two facts, not two versions of the same
one.Show fiscalRepresentation
Show fiscalRepresentation
SALE_INVOICE or CREDIT_NOTE. Canonical: it means the same thing in every country.FACTURA, NOTA DE CREDITO RIDE. Already translated.GENERATED, FAILED). It is NOT the authority’s verdict —
that one lives in fiscal.status.ONLINE · OFFLINE · BATCH.EMISION NORMAL / EMISION POR CONTINGENCIA. In Ecuador the SRI requires it to be printed.SANDBOX / PRODUCTION). Do not confuse it with the authority’s
ambiente, which travels inside countryData with the country’s code.N. FACTURA MODIFICADA and FECHA EMISION FAC..It is a pointer, not a copy: documentNumber is the key you resolve against history,
where the whole document sits with its country block. It also carries reasonLabel, the
reason already written out.Show store
Show store
BR-SP-001).Show buyer
Show buyer
true for anonymous consumer (e.g. BR CONSUMIDOR FINAL placeholder). When true, name, email, phone, address are typically null and govIdType is "FINAL_CONSUMER" with govIdNumber: null (or a placeholder per country).CPF, CNPJ, RUT, DNI, etc.).null for isFinalConsumer: true.{
"fiscal": {
"countryCode": "BR",
"documentType": "nfce",
"documentNumber": "1000013",
"authorizationProtocol": "141200000956123",
"authorizedAt": "2026-05-06T01:23:10.991Z",
"pdfUrl": "https://api.fiscal-provider.example/nfce/<docId>/pdf",
"xmlUrl": "https://api.fiscal-provider.example/nfce/<docId>/xml",
"status": "authorized",
"source": "authority",
"graphic": null
},
"countryData": {
"chaveAcesso": "41201008187168000160558050010000131609769080",
"serie": "1",
"serialNumber": 1
},
"company": {
"legalName": "Sandbox LTDA",
"tradeName": "Sandbox",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000"
},
"store": {
"name": "Loja Centro - SP",
"code": "BR-SP-001",
"govIdType": "CNPJ",
"govIdNumber": "00000000000000",
"stateRegistration": "000000000000",
"city": "São Paulo",
"address": "Av. Paulista 1578, Bela Vista",
"phone": "1132094347"
},
"buyer": {
"isFinalConsumer": true,
"govIdType": "FINAL_CONSUMER",
"govIdNumber": "00000000000",
"name": "CONSUMIDOR FINAL",
"email": null,
"phone": null,
"address": null
},
"order": {
"id": "21ec1f6c-c301-4528-b999-7836c1d21c6c",
"orderCode": "OC-br-001",
"status": "COMPLETED",
"isCancelled": false,
"businessDayDate": "2026-05-06",
"createdAt": "2026-05-06T01:22:59.028Z"
}
}
fiscalRepresentation. Brazil fiscalizes by callback, without going through
the Fiscal Gateway: there is no document numbered by Fire to mirror, so the key simply does not
come. The response is the same as always, field by field.{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000003",
"authorizationProtocol": "1508202601179001234500120010010000000031234567813",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": {
"qr": "1508202601179001234500120010010000000031234567813"
}
},
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000003",
"issuedAt": "2026-08-15T22:32:14.826Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000003",
"claveAcceso": "1508202601179001234500120010010000000031234567813",
"establecimiento": "001",
"puntoEmision": "001",
"secuencial": "000000003",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000031234567813" },
"failure": null,
"compensates": null,
"history": []
},
"company": {
"legalName": "INT FOOD SERVICES CORP SA",
"tradeName": "KFC",
"govIdType": "RUC",
"govIdNumber": "1791415132001"
},
"order": {
"orderCode": "FUEL-EC-PRINT-0002",
"status": "COMPLETED",
"isCancelled": false
}
}
{
"fiscal": {
"countryCode": "EC",
"documentNumber": "001-001-000000009",
"status": "authorized",
"source": "representation",
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" }
},
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"numeroAutorizacion": null,
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "CREDIT_NOTE",
"documentLabel": "NOTA DE CREDITO RIDE",
"documentNumber": "001-001-000000009",
"issuedAt": "2026-08-15T23:05:11.402Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "EMISION NORMAL",
"environment": "PRODUCTION",
"providerCode": "hio",
"countryData": {
"numeroComprobante": "001-001-000000009",
"claveAcceso": "1508202604179001234500120010010000000091234567815",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202604179001234500120010010000000091234567815" },
"failure": null,
"compensates": {
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"reason": "ORDER_CANCELLATION",
"reasonLabel": "Anulación de pedido"
},
"history": [
{
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA",
"documentNumber": "001-001-000000008",
"issuedAt": "2026-08-15T23:02:41.237Z",
"numberingStatus": "GENERATED",
"countryData": {
"numeroComprobante": "001-001-000000008",
"claveAcceso": "1508202601179001234500120010010000000081234567819",
"ambiente": "PRODUCCION"
},
"graphic": { "qr": "1508202601179001234500120010010000000081234567819" },
"compensates": null
}
]
},
"order": {
"orderCode": "FUEL-EC-NC-0030",
"status": "CANCELLED",
"isCancelled": true
}
}
{
"fiscal": {
"countryCode": "CO",
"documentNumber": "SETP990000001",
"authorizationProtocol": "9c4f1e… (the CUFE)",
"authorizedAt": null,
"pdfUrl": null,
"xmlUrl": null,
"status": "processing",
"source": "representation",
"graphic": null
},
"countryData": {
"numeroComprobante": "SETP990000001",
"cufe": "9c4f1e… (96 hexadecimal characters)",
"prefijo": "SETP",
"numeroDian": "990000001",
"qrCode": "https://catalogo-vpfe.dian.gov.co/document/searchqr?documentkey=9c4f1e…",
"ambiente": "PRODUCCION"
},
"fiscalRepresentation": {
"documentType": "SALE_INVOICE",
"documentLabel": "FACTURA ELECTRONICA DE VENTA",
"documentNumber": "SETP990000001",
"issuedAt": "2026-08-16T14:21:03.118Z",
"numberingStatus": "GENERATED",
"authorizationMode": "ONLINE",
"authorizationLabel": "VALIDACION PREVIA"
}
}
compensates— and the invoice the customer took away
printed moves down to history, with the same shape. To reprint it, you pull it out of there.source: "representation"
and authorizedAt: null: the receipt already has its number —numeroComprobante, the one that
goes on the paper— but numeroAutorizacion is still empty because the authority has not ruled
yet. When it does, the receipt’s number does not change; the authorization is added.{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "forbidden",
"message": "API key is missing the orders:read scope"
}
}
{
"error": {
"code": "not_found",
"message": "Order not found"
}
}
graphicisnull. The QR is the DIAN catalog URL and it travels incountryData.qrCode. In Ecuador the QR is derived from the access key and that is why it is handed over separately; here it already arrives resolved, and duplicating it would give two copies that can disagree.- The labels are the DIAN’s:
FACTURA ELECTRONICA DE VENTAinstead ofFACTURA, andVALIDACION PREVIAinstead ofEMISION NORMAL. ambientearrives translated just like in Ecuador, but mind the source code: the DIAN uses1for production and the SRI uses it for testing. Fire resolves it, which is why both readPRODUCCIONhere.authorizationProtocolcarries the CUFE, which is what identifies the document before the authority — the equivalent of Ecuador’s access key.
store, company and order blocks do not change per country, so they are omitted here
and the ones from the Ecuador example apply.Common patterns
- Render-time fetch. Call this endpoint at print/render time and persist the response if you need durable artifacts —
pdfUrlandxmlUrlmay be signed URLs that expire. - Final-consumer flag. Always check
buyer.isFinalConsumerbefore rendering buyer details. For anonymous consumers in BR,govIdNumberis"00000000000"and other buyer fields arenull. - Country-specific UI. Use
fiscal.countryCodeto dispatch to the right rendering template — DANFCE for BR NFC-e, DIAN-style for CO, SRI for EC, etc.

