TF Fiscal

Core APIs

NF-e Invoices

18 endpoints

POST/api/invoice/create

Issue a new invoice

Issues an NF-e (model 55). The issuing company is identified by the token header; do not send company_id in the body.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

Body — top-level fields

FieldTypeDescription
Identification and operation
idstringUnique client-supplied ID for idempotency (composes the dedup key)
nature_of_operation *stringOperation nature (e.g., "Sale of goods")
transaction_type *stringType: "0"=inbound, "1"=outbound, "2"=import, "3"=export
model *stringDocument model: "55"=NF-e
issuance_type *stringIssuance type ("1"=normal, "9"=contingency, etc.)
ambiente *string"1"=production, "2"=homologation
finalidadestringPurpose: "1"=normal, "2"=complementary, "3"=adjustment, "4"=return
ref_nfe_chavestring44-digit access key of the referenced NF-e (complementary/adjustment/return)
is_reopenbooleanReopen/overwrite a previously issued NF-e
dh_sai_entstringExit or entry datetime (ISO 8601). Default: current timestamp
Amounts and discounts
total_discount_amountdecimalTotal invoice discount
price_includes_ipibooleanWhether unit prices already include IPI. When true, IPI is back-calculated from the gross price and the invoice total equals the quoted price; default false. Can be overridden per product
trocodecimalChange amount (typical for NFC-e)
segurodecimalInsurance amount (apportioned across products as XML vSeg)
outras_despesasdecimalOther expenses (apportioned across products as XML vOutro)
Indicators and additional info
ind_finalstringEnd consumer: "0"=B2B, "1"=B2C
ind_presstringPresence indicator: "1"=in-person, "2"=internet, "3"=tele-service, etc.
informacoes_complementaresstringComplementary info (written to infAdic.infCpl)
informacoes_fiscostringInformation for the tax authority (written to infAdic.infAdFisco)

Body — cliente (object, required)

For domestic operations (transaction_type 0 or 1): cpf or cnpj, name, endereco, bairro (min. 2 chars), city, uf, and cep are required. For import/export (transaction_type 2 or 3): only name is required.
FieldTypeDescription
cpfstringCustomer CPF (alternative to cnpj)
cnpjstringCustomer CNPJ (alternative to cpf)
iestringState Registration (Inscrição Estadual)
name *stringCompany / customer name
enderecostringStreet address
complementostringAddress complement
numerostringAddress number
bairrostringNeighborhood (minimum 2 characters for domestic operations)
citystringCity
ufstringState (UF) — overwritten by the UF resolved from the CEP
cepstringZIP code (validates UF and city)
telefonestringPhone
emailstringEmail
id_estrangeirostringForeign ID (used for import/export)
c_paisintBACEN country code. Default: 1058 (Brazil)
x_paisstringCountry name. Default: "BRASIL"

Body — products[] (array, at least 1 item)

Each product requires taxation: either category_id (reference to a pre-registered tax category), or the impostos object with inline configuration.
FieldTypeDescription
codigostringInternal product code
name *stringProduct description (CJK characters are stripped)
ncm *stringNCM with 8 digits
ceststringCEST code (required when ICMS-ST applies)
gtinstringGTIN / barcode
gtin_tributavelstringTaxable-unit GTIN
count *decimalQuantity
unit *stringCommercial unit (e.g., "UN", "KG", "MT")
unit_price *decimalUnit price
total_price *decimalTotal item value
discount_pricedecimalDiscount applied to the item
price_includes_ipibooleanPer-product override of price_includes_ipi; omit to follow the invoice-level setting
origem *intGoods origin (0=Domestic, 1=Foreign — direct import, etc.)
indicador_total *intComposes the NF-e total: 0=no, 1=yes
category_idstringID of a pre-registered tax category (required if impostos is not provided)
impostosobjectInline tax configuration (alternative to category_id). Structure below. The former name tax_info is still accepted.
disable_difalbooleanDisables DIFAL calculation for this item
desconta_icms_pis_cofinsbooleanDeduct ICMS before computing PIS/COFINS — tax on (amount − ICMS), the current Brazilian standard; default false (no deduction, higher tax)
iiobjectImport Tax — required for CFOP 3.xxx. Structure below
import_declarationsarrayImport Declarations (DI) — required when transaction_type="2". Structure below
nItemPedintPurchase Order Item (I61). Sequential item number within the order referenced by xPed (which comes from root id). Valid range: 1–999999. Default: omitted.

Body — products[].impostos

FieldTypeDescription
industriastringBase industry/rate (alias: aliquota)
icms
icms.codigo_cfopstringCFOP
icms.situacao_tributariastringICMS CST/CSOSN
icms.tipo_pessoastringPerson type (PF/PJ)
icms.codigo_beneficio_fiscalstringcBenef (tax-benefit code)
icms.aliquotastringOwn ICMS rate in % (CST 00, 10, 20, 51, 70, 90). If empty, the system derives it from the interstate/internal table
icms.aliquota_reducaostringOwn ICMS base reduction percentage (CST 20, 51, 70, 90)
icms.aliquota_ststringICMS-ST rate of the destination state in % (CST 10, 30, 70, 90)
icms.aliquota_reducao_ststringICMS-ST base reduction percentage (CST 10, 30, 70, 90)
icms.aliquota_mvastringMVA/IVA-ST in % (CST 10, 30, 70, 90)
icms.aliquota_fcpstringOwn FCP rate in % — emits pFCP/vFCP in the ICMS group (CST 00, 10, 20, 51, 70, 90)
icms.aliquota_fcp_ststringFCP-ST rate in % (CST 10, 30, 70, 90)
icms.aliquota_fcp_uf_deststringDestination state’s FCP rate % (pFCPUFDest). Falls back to aliquota_fcp when omitted
icms.aliquota_uf_deststringDestination state’s ICMS rate %. Usually not needed — the platform keeps standard rates per state. Only override when the product has a differentiated rate in the destination state (beverages, tobacco, electricity). Destination state, not the sender’s
icms.difal_desconta_icms_interbooleanDeduct the interstate ICMS already paid from the DIFAL base — the "com exclusão" in state rules. See "Interstate: how to set the DIFAL base" on this page
icms.difal_base_por_dentrobooleanGross up the DIFAL base because the tax is included in the price — the "base dupla" in state rules. See "Interstate: how to set the DIFAL base" on this page
icms.v_bc_uf_deststringIf you already computed the DIFAL base, pass the amount (R$) here. The two options above stop applying
icms.aliquota_creditostringSimples Nacional credit rate in % (CSOSN 101, 201, 900)
icms.aliquota_diferimentostringICMS deferral percentage (CST 51)
icms.motivo_desoneracaostringICMS exemption reason code (CST 20, 40, 41, 50, 90)
icms.ad_rem_icmsstringSingle-phase ICMS — ad rem rate in BRL/unit (CST 02, 15, 53)
icms.ad_rem_icms_retstringSingle-phase ICMS — withheld ad rem in BRL/unit (CST 15, 61)
icms.p_dif_monostringSingle-phase ICMS — deferral percentage (CST 53)
icms.q_bc_monostringSingle-phase ICMS — taxed quantity (liters/kg). Empty uses the item quantity (CST 02, 15, 53)
icms.valor_desoneracaostringExempted ICMS amount in BRL — emits vICMSDeson (CST 40, 41, 50, 90)
icms.v_bc_st_retstringCalculation base of the ICMS-ST withheld in the previous operation (provided, not calculated — CST 60, CSOSN 500)
icms.p_ststringRate borne by the final consumer, in % (provided, not calculated — CST 60, CSOSN 500)
icms.v_icms_st_retstringICMS-ST amount withheld in the previous operation (provided, not calculated — CST 60, CSOSN 500)
icms.v_icms_substitutostringSubstitute's own ICMS amount (provided, not calculated — CST 60, CSOSN 500)
icms.v_bc_fcp_st_retstringCalculation base of the FCP withheld by ST (provided, not calculated — CST 60, CSOSN 500)
icms.p_fcp_st_retstringFCP rate withheld by ST, in % (provided, not calculated — CST 60, CSOSN 500)
icms.v_fcp_st_retstringFCP amount withheld by ST (provided, not calculated — CST 60, CSOSN 500)
ipi
ipi.codigo_enquadramentostringIPI legal framework code
ipi.situacao_tributariastringIPI CST
ipi.aliquotastringIPI rate
ipi.valor_unidadestringIPI by quantity — value in BRL/unit. Only used when there is no percentage rate; if aliquota is present, the percentage takes precedence (CST 00, 50, 49, 99)
ipi.tipo_pessoastringPerson type
pis
pis.situacao_tributariastringPIS CST
pis.aliquotastringPIS rate
pis.valor_unidadestringPIS by quantity — value in BRL/unit. vPIS = quantity × value (CST 03 and other per-quantity forms)
pis.tipo_pessoastringPerson type
cofins
cofins.situacao_tributariastringCOFINS CST
cofins.aliquotastringCOFINS rate
cofins.valor_unidadestringCOFINS by quantity — value in BRL/unit. vCOFINS = quantity × value (CST 03 and other per-quantity forms)
cofins.tipo_pessoastringPerson type
is (Selective Tax)
is.cenariostringIS scenario
is.situacao_tributariastringIS CST
is.aliquotastringIS rate
is.tipo_pessoastringPerson type
ibs_cbs (Tax Reform)
ibs_cbs.situacao_tributariastringIBS/CBS CST
ibs_cbs.tipo_pessoastringPerson type
ibs_cbs.classificacao_tributariastringIBS/CBS tax classification
ibs_cbs.p_ibs_ufstringIBS state rate in % (optional; empty uses the transition default, 0.10 in 2026). Accepts dot or comma
ibs_cbs.p_ibs_munstringIBS municipal rate in % (optional; default 0 in 2026)
ibs_cbs.p_cbsstringCBS rate in % (optional; default 0.90 in 2026)
ibs_cbs.p_red_aliqstringRate reduction percentage (CST 011, 200, 515)
ibs_cbs.p_difstringDeferral percentage (CST 510, 515)
ibs_cbs.p_red_bcstringTax base reduction percentage (CST 222)
ibs_cbs.proporcaostringOperation proportion in % (CST 221)
ibs_cbs.aliquota_cbs_monostringSingle-phase CBS — rate in % over the base; takes precedence over valor_unidade_cbs (CST 620)
ibs_cbs.aliquota_ibs_monostringSingle-phase IBS — rate in % over the base; takes precedence over valor_unidade_ibs (CST 620)
ibs_cbs.valor_unidade_cbsstringSingle-phase CBS — ad rem in BRL/unit; only used when there is no percentage rate (CST 620)
ibs_cbs.valor_unidade_ibsstringSingle-phase IBS — ad rem in BRL/unit; only used when there is no percentage rate (CST 620)
ibs_cbs.valor_deducao_legalstringLegal base deduction value in BRL (CST 830)
difal
difal.disable_difalbooleanDisables DIFAL for the item (alternative to disable_difal at the product level)

Interstate: how to set the DIFAL base

This section applies only to interstate sales to individuals (non-taxpayers). Not needed for intrastate or B2B invoices.

Step 1 — look up the buyer’s state

Buyer’s stateSend in addition to aliquota, aliquota_fcp
PE, RJnothing else
SEonly difal_base_por_dentro: true
the other 24 states
AC AL AM AP BA CE DF ES GO MA MG MS MT PA PB PI PR RN RO RR RS SC SP TO
difal_desconta_icms_inter: true
difal_base_por_dentro: true

Important: the DIFAL base method directly determines the tax due; choosing the wrong one leads to underpayment (with exposure to assessments and penalties) or overpayment. The table above reflects the prevailing practice per state and is provided for reference only — state legislation changes, and specific goods may follow differentiated rules. Confirm the applicable method for the destination state with your accountant or tax advisor before going live. If unsure, send neither difal_desconta_icms_inter nor difal_base_por_dentro: the base equals the invoice amount, which is the most conservative treatment.

Step 2 — request examples by scenario

Selling to RJ — difal_desconta_icms_inter and difal_base_por_dentro not required (FECP 2%)

{
  "icms": { "codigo_cfop": "6102", "situacao_tributaria": "00",
            "aliquota": "4", "aliquota_fcp": "2" }
}

Selling to AL — difal_desconta_icms_inter and difal_base_por_dentro both set to true (FECP 1%)

{
  "icms": { "codigo_cfop": "6102", "situacao_tributaria": "00",
            "aliquota": "4", "aliquota_fcp": "1",
            "difal_desconta_icms_inter": true,
            "difal_base_por_dentro": true }
}

If your system already calculates the DIFAL base, send v_bc_uf_dest; difal_desconta_icms_inter and difal_base_por_dentro then no longer apply

{
  "icms": { "aliquota": "4", "aliquota_fcp": "1", "v_bc_uf_dest": "122.29" }
}

What the three options produce

SettingDIFAL baseDIFAL due
neither difal_desconta_icms_inter nor difal_base_por_dentro100.0016.50
both true122.2921.07
v_bc_uf_dest=150150.0026.75

Invoice 100.00, interstate ICMS paid 4.00, destination rate 20.5%, FECP 1%.

Why states differ (background, safe to skip)

ICMS is a tax-inclusive tax. Some states require the DIFAL itself to be added back into its own base (base dupla) after deducting the interstate ICMS already paid (com exclusão); others simply use the invoice amount (base única). difal_desconta_icms_inter and difal_base_por_dentro correspond to these two steps. The destination rate itself is maintained by the platform.

Body — products[].ii (Import Tax)

FieldTypeDescription
vBCdecimalII calculation base
vDespAdudecimalCustoms expenses
vIIdecimalII amount
vIOFdecimalIOF amount

Body — products[].import_declarations[]

FieldTypeDescription
nDIstringDI number
dDIstring (date)DI date
xLocDesembstringCustoms clearance location
UFDesembstringCustoms clearance state
dDesembstring (date)Customs clearance date
cExportadorstringExporter code
tpViaTranspintInternational transport mode
tpIntermediointIntermediation type
vAFRMMdecimalAFRMM amount
additionsarrayDI additions (fields: nAdicao, nSeqAdic, cFabricante, vDescDI, nDraw)

Body — shipping_address / delivery_address (objects, optional)

shipping_address is the pickup location (physical origin, if different from the issuer). delivery_address is the delivery location (physical destination, if different from the customer). When present, both require: cpf or cnpj, name, endereco, bairro (min. 2 chars), city, uf, and cep. Both objects share the same structure.
FieldTypeDescription
cpfstringCPF (alternative to cnpj)
cnpjstringCNPJ (alternative to cpf)
iestringState Registration
name *stringCompany / name
endereco *stringStreet address
complementostringComplement
numberstringNumber (note: the field is number, not numero)
bairro *stringNeighborhood
city *stringCity
uf *stringState
cep *stringZIP code
telefonestringPhone
emailstringEmail

Body — transportation (object, optional)

If transportation is omitted, the system assumes transport_mode="9" (no freight).
FieldTypeDescription
transport_modestringFreight modality: "0"=by issuer, "1"=by recipient, "2"=by third party, "3"=sender's own transport, "4"=recipient's own transport, "9"=no freight
freight_amountdecimalTotal freight amount
carrier_info — carrier
carrier_info.cpfstringCarrier CPF (alternative to cnpj)
carrier_info.cnpjstringCarrier CNPJ (alternative to cpf)
carrier_info.iestringState Registration
carrier_info.namestringCompany name
carrier_info.enderecostringStreet address
carrier_info.citystringCity
carrier_info.ufstringState
carrier_info.cepstringZIP code
vehicle_info — vehicle
vehicle_info.platestringLicense plate
vehicle_info.ufstringPlate state
vehicle_info.rntcstringRNTC (National Cargo Carrier Registration)
trailer_info — trailer (same structure as vehicle_info)
trailer_info.platestringTrailer plate
trailer_info.ufstringState
trailer_info.rntcstringRNTC
packages[] — volumes
packages[].qtyintQuantity
packages[].gross_weightdecimalGross weight
packages[].net_weightdecimalNet weight
packages[].packaging_typestringPackaging type
packages[].numberstringNumbering
packages[].markstringMark
packages[].sealsarray<string>Seals
transport_tax_retention_info — ICMS retention on freight
transport_tax_retention_info.freight_service_amountdecimalTransport service amount
transport_tax_retention_info.tax_basedecimalRetention calculation base
transport_tax_retention_info.tax_ratedecimalRetention rate
transport_tax_retention_info.cfopstringCFOP
transport_tax_retention_info.cepstringZIP code

Body — pag_info[] (array, optional)

If omitted, the system assumes [{ "payment_method": "01", "payment_indicator": "0" }] (cash, in cash).
FieldTypeDescription
payment_method *stringPayment method: "01"=cash, "02"=check, "03"=credit card, "04"=debit card, "05"=store credit, "10"=meal voucher, "11"=food voucher, "15"=bank slip, "17"=PIX, "90"=no payment, "99"=others
payment_indicator *stringIndicator: "0"=in cash, "1"=on credit
payment_valuedecimalAmount paid
card_info — card details (for payment_method 03/04)
card_info.integration_type *stringCard-machine integration type (required if card_info is present)
card_info.brand_code *stringCard brand (required if card_info is present)
card_info.acquirer_cnpjstringAcquirer CNPJ
card_info.authorization_codestringAuthorization code

* Required field.

Response fields (data)

FieldTypeDescription
uuidstringInternal NF-e identifier. Use it in follow-up calls (/api/invoice/get_detail, /refresh, /cancel)
statusstringSituation: "Success" (authorized), "Failed" (rejected/failed), "Processing", "Canceled"
motivostringOfficial tax authority message for the cStat (bilingual PT / 中文 format)
nfeintIssued NF-e number
serieintNF-e series
chavestring44-digit access key (empty when the invoice was not authorized)
modelostringDocument model: "nfe"
epecbooleanIssued under EPEC contingency
xmlstringURL of the authorized XML. The DANFE (PDF) and other formats come from /api/invoice/get_detail

Response — rejection / error

When tax authority rejects the invoice, success is false and data.motivo holds the reason; chave comes back empty. Field validation errors (before reaching tax authority) return success: false with the message in message and no data object.
        {
          "success": false,
          "data": {
            "uuid": "65f8b9a1c2d3e4f5a6b7c8d9",
            "status": "Failed",
            "motivo": "Rejeição 226: Código da UF do Emitente diverge da UF autorizadora / 拒绝 226: 发件人所在州代码与授权州不一致",
            "nfe": 100,
            "serie": 1,
            "chave": "",
            "modelo": "nfe",
            "epec": false,
            "xml": ""
          }
        }
GET/api/invoice/get_list

List NF-e (paginated)

Lists the company's NF-e with pagination. Parameters are passed via query string (not in the body). The time filter is optional, but if used, both start_create_time and end_create_time are required.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature (path includes the query string)
timestampstringUnix timestamp in seconds

Query string

ParameterTypeDescription
page *intPage number (≥ 1)
page_size *intPage size (1–50)
start_create_timelongUnix timestamp in milliseconds — start (requires end_create_time)
end_create_timelongUnix timestamp in milliseconds — end
statusstringFilter by status. Values: "Success" (authorized), "Canceled" (canceled), "Voided" (voided), "Processing" (processing), "InvoicingFailed" (invoicing failed), "Failed" (failed), "Contingencia" (offline contingency), "Unknown" (unknown)

* Required field.

GET/api/invoice/get_detail

Get NF-e details

Returns the details of a specific NF-e by UUID or by access key. Includes XML URL, DANFE URLs (full, simplified, and label) and metadata.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature (path includes the query string)
timestampstringUnix timestamp in seconds

Query string

ParameterTypeDescription
uuidstringNF-e UUID
chavestringNF-e access key (44 digits)

Provide uuid or chave (at least one). If both are sent, uuid takes precedence.

POST/api/invoice/refresh

Refresh invoice status

Queries the current NF-e status at the tax authority and updates the local record. Useful when issuance remained in processing or contingency.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
uuid *stringUUID of the NF-e to query

* Required field.

POST/api/invoice/cancel

Cancel invoice

Cancels an authorized NF-e. The justification sent to the tax authority is fixed: "Erro no preenchimento da nota fiscal." — it cannot be configured via payload.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
uuid *stringUUID of the NF-e to cancel (internal identifier returned by /api/invoice/create)

* Required field.

Response fields (data)

FieldTypeDescription
motivostringOfficial tax authority message confirming the cancellation
statusstringSituation: "Canceled"
nfeintCanceled NF-e number
serieintNF-e series
chavestring44-digit access key
modelostringDocument model: "nfe"
epecbooleanIssued under EPEC contingency
xmlstringURL of the cancellation event XML

Response — error

Failures return success: false with the tax authority message in message and no data object. Happens when uuid is missing, the certificate is invalid, or tax authority rejects the cancellation (e.g. deadline exceeded, invoice already canceled).
        {
          "success": false,
          "message": "Rejeição: NF-e já está cancelada na base de dados da tax authority"
        }
POST/api/invoice/invalid

Invalidate numbering range

Invalidates a contiguous range of NF-e numbers that were never authorized (not to be confused with cancellation — cancellation applies to already-authorized invoices). The operation is registered at the tax authority and is irreversible.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
modelo *stringDocument model: "55"=NF-e, "65"=NFC-e. (Note: the field is modelo, not model)
ambiente *string"1"=production, "2"=homologation
serie *intSeries of the numbering to invalidate
start_number *intStarting number of the range
end_number *intEnding number of the range
motivo *stringJustification for the invalidation (minimum 15 characters, tax authority requirement)

* Required field.

Response fields (data)

FieldTypeDescription
uuidstringInternal identifier of the invalidation record
xmlstringURL of the invalidation XML authorized by the tax authority

Response — error

Failures return success: false with the tax authority message in message and no data object. Happens when a required field is missing, the certificate is invalid, or tax authority rejects the invalidation (e.g. range already invalidated).
        {
          "success": false,
          "message": "Rejeição: Faixa de numeração já inutilizada"
        }
POST/api/invoice/get_danfe

Get NF-e DANFE

Returns three URLs for an NF-e DANFE: the full DANFE (PDF), the simplified DANFE PDF (receipt format) and the simplified DANFE as a PNG (label image). PDFs are generated on demand from the authorized XML and cached in OSS. On subsequent calls, if the invoice status has not changed, the existing cache is returned; if the status has changed (e.g. the invoice was cancelled), PDFs are regenerated.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

Body

FieldTypeDescription
uuid ⚠stringInternal NF-e UUID (returned by /api/invoice/create)
chave ⚠stringNF-e access key (44 digits)

⚠ Either uuid or chave is required.

Response fields

FieldTypeDescription
danfestringURL of the full DANFE PDF (A4 format)
danfe_simplesstringURL of the simplified DANFE PDF (receipt format)
danfe_simples_pngstringURL of the simplified DANFE PNG (label image)

Error responses

MessageCause
uuid/chave不能为空Neither uuid nor chave was provided
发票不存在Invoice not found for the token user, or authorized XML missing
发票详情不存在Invoice detail (with protocol) not found
获取PDF失败:<reason>Failure generating the PDF from XML
POST/api/invoice/get_xml

Batch export NF-e

Starts an asynchronous bulk export task for the user's invoices, filtering by period and status. Can generate an Excel spreadsheet (metadata only) or a ZIP package with the XMLs. The first call creates the task and returns status: "Processing"; subsequent calls with the same parameters return the progress until status: "Success", when the url field contains the download link.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
type *stringOutput format: "excel" (metadata spreadsheet) or any other value (e.g. "xml") for ZIP with XMLs
statusstringFilter by invoice status (e.g. "Success", "Canceled", "Voided"). For type=excel, lowercased internally
monthintMonth (1–12). When provided, overrides start_create_time/end_create_time; uses America/Sao_Paulo timezone and the current year (or previous year if the month is in the future)
start_create_timelongPeriod start, inclusive (Unix timestamp in milliseconds). The UTC date and time of the value are read as Brasília time: send the UTC midnight of the day, e.g. Date.UTC(2026, 7, 1) = 1785542400000 means 2026-08-01 00:00 in Brasília
end_create_timelongPeriod end, exclusive (same rule). Send the UTC midnight of the day after the last day you want: for the whole of August 2026, Date.UTC(2026, 8, 1) = 1788220800000

* Required field.

Period: start_create_time/end_create_time are read by their UTC date and time and interpreted as Brasília time (UTC−3, no daylight saving). Send the UTC midnight of the calendar days: start inclusive, end exclusive. Example, full days 2026-08-29 through 2026-09-01: start_create_time = 1787961600000 (2026-08-29T00:00Z) and end_create_time = 1788307200000 (2026-09-02T00:00Z). Do not add 3 hours to the value.

Response fields

FieldTypeDescription
statusstring"Processing" while the task runs, "Success" when the file is ready
progress_countintNumber of invoices processed so far
total_countintTotal invoices to process
urlstringDownload URL of the final file (empty while status = Processing)
Idempotency: tasks are deduplicated by a hash of the parameters (uid + token + period + status + type). Repeated calls with the same parameters return the same task's progress, without triggering new executions.

Error responses

MessageCause
发票类型字段不能为空type missing
POST/api/invoice/consultar_status

Get NF-e status

Consults the current status of an NF-e or NFC-e directly at the tax authority using the access key (44 digits), via the NfeConsultaProtocolo4 service. Works for both own invoices (issued by the token company) and third-party invoices (e.g. captured via DistDFe). The model (NF-e/NFC-e) is detected automatically from positions 20-21 of the key.

Required headers

HeaderTypeDescription
tokenstringCompany token (whose certificate will be used in the consultation)
signstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

Body

FieldTypeDescription
chave *stringAccess key (44 numeric digits). Issuer UF is extracted from positions 0-1; model from positions 20-21 (55=NF-e, 65=NFC-e).
ambientestringWhich environment to query: 1=production, 2=homologation (also accepts producao/homologacao). If omitted, the environment the note was issued in is used; production when the note is not found locally. The two are separate databases — querying production for a note issued in homologation always returns 217.

* Required field.

Response fields

FieldTypeDescription
chavestringAccess key queried
statusstringNormalized status (see table below)
cstatintRaw tax authority cStat code
motivostringRaw tax authority xMotivo message

Status mapping

statustax authority cStatMeaning
autorizada100, 150NF-e authorized for use
cancelada101, 151Cancelled (also returned if there is a linked cancellation event, even with cStat=100)
denegada110, 301, 302Use denied by the tax authority
inutilizada102Number invalidated (numbering range)
nao_encontrada217NF-e not present in the tax authority database
desconhecidoothersUnmapped cStat — check raw cstat and motivo

Error responses

MessageCause
chave inválida: deve ter 44 dígitosKey missing, with size other than 44, or containing non-numeric characters
empresa não possui certificado configuradoThe token company has no cert_file registered
tax authority retornou resposta vaziatax authority returned no response (timeout, offline)
erro ao consultar tax authority: <detail>Exception while calling the service (invalid XML, timeout, expired certificate, etc.)
POST/api/invoice/return

Issue return NF-e

Issues a return NF-e (model 55, purpose 4) from an original NF-e. Two modes are supported: full return (reference the original invoice via uuid or chave — the return is a full clone of the original NF-e) or partial/custom return (send chave + the complete invoice fields in the request body itself, same structure as /api/invoice/create).

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body — fields always read from the root

FieldTypeDescription
uuidstringUUID of the original NF-e (full return; send either this or chave). It is a 36-character GUID with dashes, not the 24-character _id. With uuid and no return_detail the note is cloned in full; if return_detail is also sent, a partial return is performed
chavestring44-digit access key of the original NF-e (required for partial return; alternative to uuid for full return)
return_detailobjectPartial-return detail object. Every partial-return field must go inside this object (cliente, products, transaction_type, model, issuance_type, ambiente, id); leaving them at the request root returns an error. chave, cfop and natureza_operacao are always read from the root, and the root natureza_operacao overrides the one inside the object
cfop *stringReturn CFOP. A return NF-e is inbound (tpNF=0) and requires an inbound CFOP: "1202", "1411" within the state, "2202", "2411" interstate. If omitted, "1202"/"2202" is chosen automatically. Sending an outbound CFOP ("5202", "6202", ...) conflicts with tpNF and is rejected by the tax authority
natureza_operacaostringOperation nature (e.g., "Devolução de venda"). Alias accepted: nature_of_operation

Body — fields inside return_detail

All fields below go inside the return_detail object. Placing them at the request root has no effect — the endpoint returns an error instead of silently falling back to a full return.

FieldTypeDescription
transaction_typestringOperation type. Required but the value has no effect: the endpoint unconditionally overrides it to inbound (tpNF=0), so "0" and "1" behave identically — it is only a placeholder
modelstringDocument model: "55" (required for partial return)
issuance_typestringIssuance type: "1"=normal (required for partial return)
ambientestringEnvironment: "1"=production, "2"=homologation (required for partial return)
idstringOrder number (return deduplication key). Returns do not use the order-reservation mechanism, so duplicate protection relies entirely on this field: when a return already exists for the same id, that note is returned instead of issuing a new one. Without it there is no duplicate protection at all and the same return can be issued repeatedly — strongly recommended
total_discount_amountnumberTotal discount amount for the note. Defaults to 0
clienteobjectRecipient data, same structure as /api/invoice/create (required for partial return). Quirk: the address number field is number (in English), not numero. Without number, the address goes out with nro "S/N"; IBGE code, city and state are resolved from cep
productsarrayReturned items, same structure as /api/invoice/create (required for partial return). codigo is optional — when absent, cProd falls back to name Tax data via category_id or impostos — either one; use the latter when the original invoice was issued by another provider.
products[].n_itemintItem number on the original invoice (1..990). Homologação only: there the return references the original per item, and a partial return cannot infer that number (the original may not be on this platform). Omitted, the reference group is dropped and tax authority returns Rejeição 321. Production references at header level and does not need this field

* Required field. uuid OR chave is also required (exactly one).

Automatic on returns: payment goes out as 90 (No Payment) — pag_info is ignored; empty natureza_operacao defaults to "Devolução de Mercadoria"; item taxation (CST/CSOSN, PIS/COFINS, IPI, IBS/CBS) comes from the fiscal category of category_id, matched by person type and scenario, or is sent inline per item via impostos — either one.

Complete Example with Transportation

        {
          "nature_of_operation": "Venda de mercadoria",
          "transaction_type": "1",
          "model": "55",
          "issuance_type": "1",
          "ambiente": "2",
          "ind_final": "0",
          "ind_pres": "1",
          "cliente": {
            "cnpj": "12345678000199",
            "ie": "123456789",
            "name": "Empresa Cliente Ltda",
            "endereco": "Rua Exemplo",
            "number": "123",
            "complemento": "Sala 45",
            "bairro": "Centro",
            "city": "São Paulo",
            "uf": "SP",
            "cep": "01234567",
            "telefone": "11999999999",
            "email": "contato@empresa.com"
          },
          "products": [
            {
              "codigo": "PROD001",
              "name": "Smartphone XYZ",
              "ncm": "85171210",
              "cest": "2804000",
              "count": 2,
              "unit": "matriz",
              "unit_price": 1500.00,
              "total_price": 3000.00,
              "category_id": "YOUR_CATEGORY_ID",
              "origem": "0",
              "indicador_total": "1"
            }
          ],
          "transportation": {
            "transport_mode": "0",
            "freight_amount": 30.00,
            "carrier_info": {
              "cnpj": "12345678000188",
              "name": "Transportadora Expressa",
              "endereco": "Rua da Transportadora",
              "city": "São Paulo",
              "uf": "SP"
            },
            "vehicle_info": {
              "plate": "ABC1234",
              "uf": "SP",
              "rntc": "123456"
            },
            "packages": [
              {
                "qty": 1,
                "packaging_type": "CX",
                "gross_weight": 2.500,
                "net_weight": 2.000
              }
            ]
          },
          "shipping_address": {
            "cnpj": "12345678000199",
            "name": "Remetente Ltda",
            "endereco": "Rua do Remetente",
            "number": "100",
            "bairro": "Centro",
            "city": "São Paulo",
            "uf": "SP",
            "cep": "01001000"
          },
          "delivery_address": {
            "cnpj": "98765432000111",
            "name": "Destinatário Ltda",
            "endereco": "Rua do Destinatário",
            "number": "200",
            "bairro": "Centro",
            "city": "Rio de Janeiro",
            "uf": "RJ",
            "cep": "20040020"
          },
          "pag_info": [
            {
              "payment_method": "03",
              "payment_indicator": "0",
              "card_info": {
                "integration_type": "1",
                "brand_code": "01"
              }
            }
          ],
          "informacoes_complementares": "Sem informações adicionais",
          "informacoes_fisco": "ICMS recolhido conforme legislação"
        }
💡 INFORMATION: This example includes all important fields, including transportation, detailed fiscal information, and payment. Adapt values according to your specific needs.

Complete Import Example

        {
          "id": "PED-IMP-001",
          "nature_of_operation": "Importacao para revenda",
          "transaction_type": "2",
          "model": "55",
          "issuance_type": "1",
          "ambiente": "1",
          "finalidade": "1",
          "ind_final": "0",
          "ind_pres": "9",
          "cliente": {
            "name": "EXPORTADOR EXTERIOR CO LTD",
            "endereco": "Pudong District",
            "numero": "456",
            "city": "Shanghai",
            "id_estrangeiro": "CN-EXP-001",
            "c_pais": 1600,
            "x_pais": "CHINA"
          },
          "products": [
            {
              "name": "Fonte chaveada 12V 2A Quickfitting",
              "codigo": "123450000888",
              "ncm": "85044090",
              "count": 2,
              "unit": "PC",
              "unit_price": 0.25,
              "total_price": 0.50,
              "origem": 1,
              "indicador_total": "1",
              "category_id": "YOUR_CATEGORY_ID",
              "import_declarations": [
                {
                  "nDI": "2312345678",
                  "dDI": "2026-04-12",
                  "xLocDesemb": "PORTO DE SANTOS",
                  "UFDesemb": "SP",
                  "dDesemb": "2026-04-15",
                  "tpViaTransp": 1,
                  "vAFRMM": 0.01,
                  "tpIntermedio": 1,
                  "cExportador": "EXP-CN-001",
                  "additions": [
                    {
                      "nAdicao": 1,
                      "nSeqAdic": 1,
                      "cFabricante": "FAB-CN-001",
                      "vDescDI": 0,
                      "nDraw": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "Quick fitting MA",
              "codigo": "123450000157",
              "ncm": "85044090",
              "count": 2,
              "unit": "PC",
              "unit_price": 0.25,
              "total_price": 0.50,
              "origem": 1,
              "indicador_total": "1",
              "category_id": "YOUR_CATEGORY_ID",
              "ii": {
                "vBC": 0.50,
                "vDespAdu": 0.00,
                "vII": 0.00,
                "vIOF": 0.00
              },
              "import_declarations": [
                {
                  "nDI": "2312345678",
                  "dDI": "2026-04-12",
                  "xLocDesemb": "PORTO DE SANTOS",
                  "UFDesemb": "SP",
                  "dDesemb": "2026-04-15",
                  "tpViaTransp": 1,
                  "vAFRMM": 1.00,
                  "tpIntermedio": 1,
                  "cExportador": "EXP-CN-001",
                  "additions": [
                    {
                      "nAdicao": 1,
                      "nSeqAdic": 2,
                      "cFabricante": "FAB-CN-001",
                      "vDescDI": 0,
                      "nDraw": ""
                    }
                  ]
                }
              ]
            }
          ],
          "pag_info": [
            {
              "payment_method": "90",
              "payment_indicator": "0"
            }
          ]
        }
💡 INFORMATION: Example for NFe Import (CFOP 3.xxx). Differences from a domestic NFe:
  • transaction_type: "2" — inbound (import) operation.
  • cliente without cnpj/cpf/uf/cep; uses id_estrangeiro, c_pais (BACEN table — China = 1600) and x_pais.
  • category_id must point to a fiscal category with CFOP 3.xxx and CST/CSOSN compatible with import.
  • Product origem = 1 (foreign — direct import) or 2 (foreign — purchased domestically).
  • The ii block (Import Tax) is required when CFOP is 3.xxx. Values come from the DI issued by the customs broker (vBC, vDespAdu, vII, vIOF). May be zero for testing.
  • The import_declarations block (Import Declaration) contains customs clearance data: nDI, dDI, clearance location/state/date, transport mode, intermediary, exporter and additions.
  • vAFRMM is required when tpViaTransp = 1 (Sea).

Supplementary NFe and Adjustment NFe are invoices issued to correct tax values of an already authorized invoice. Unlike CC-e, which only corrects registration data, these invoices allow changing tax amounts, quantities, and prices.

Supplementary NFe (finalidade = 2):
  • Used to add values that were reported lower than correct in the original invoice
  • Price supplement, quantity, or tax amount
  • Example: issued invoice with 12% ICMS but the correct rate was 18% — issue supplementary with the difference
Adjustment NFe (finalidade = 3):
  • Used for various tax adjustments provided by legislation
  • Inventory adjustment, credit transfer, tax regularization
  • Example: ICMS adjustment by assessment, credit transfer between branches
Important:
  • Both are new invoices — they generate a new access key and new number
  • Must reference the original invoice via the ref_nfe_chave field (44-digit key)
  • The original invoice must be authorized
  • Each consumes 1 credit (same as a regular issuance)

Authentication

Uses the same endpoint and authentication as the NFe issuance:

HeaderTypeDescription
token string Company token (obtained during registration)
sign string MD5 Signature: MD5(token + path + body + timestamp)
timestamp string Unix timestamp in seconds (5-minute window)
POST/api/invoice/create

Issue complementary NF-e

Required Headers

HeaderTypeDescription
tokenstringCompany token
signstringMD5 Signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

Specific Fields

FieldTypeDescription
finalidadestring"2" for Supplementary (required)
ref_nfe_chavestringAccess key of the original invoice — 44 digits (required)
Note: The remaining fields follow the same pattern as the /api/invoice/create endpoint for regular issuance. See the NFe issuance documentation for details on all fields.
Payment: In supplementary invoices, payment is usually "90" (No Payment) since it is only a supplement of tax values.
POST/api/invoice/create

Issue adjustment NF-e

Required Headers

HeaderTypeDescription
tokenstringCompany token
signstringMD5 Signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

Specific Fields

FieldTypeDescription
finalidadestring"3" for Adjustment (required)
ref_nfe_chavestringAccess key of the original invoice — 44 digits (required)
Available finalidade values:
ValueDescription
1Normal (default)
2Supplementary
3Adjustment
4Return
Difference between Supplementary and Adjustment:
  • Supplementary (2): Supplements values from the original invoice (price, tax, quantity reported lower than correct)
  • Adjustment (3): Tax adjustments provided by legislation (regularization, credit transfer, inventory adjustment)
POST/api/invoice/v2/create

Issue NF-e asynchronously

The request body and validation are identical to /api/invoice/create. The difference is that it does not wait for the tax authority: once validated, the request is queued and the receipt number task_id is returned immediately; issuance completes in the background. Fetch the result by polling /api/invoice/v2/task/get or receive it on the webhook address configured in the portal (see “Webhook callbacks” below).

Required headers

FieldTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

Fields are identical to /api/invoice/create (cliente, products[], pag_info…) and are not repeated here. A callback_url in the request is ignored: the callback address comes only from the portal configuration.
FieldTypeDescription
is_reopenbooleanReopen / overwrite a previously issued NF-e, same meaning as in v1

Processing rules

RuleDescription
IdempotencyWhen the business id id is sent, identical requests from the same CNPJ within 5 minutes reuse the same task and return the same task_id without re-queuing; without id no deduplication is applied.
Rate limitAt most 100 pending or processing tasks per CNPJ per minute; beyond that the response is Rate limit exceeded for this CNPJ.
Statuspending on acceptance, processing while running, final success / failed.

Response fields

FieldTypeDescription
task_idstringTask number, used for polling and callback deduplication
idstringBusiness id from the request (empty if not sent)
statusstringTask status, always pending on acceptance

Response — rejected

{ "success": false, "message": "Rate limit exceeded for this CNPJ, please slow down" }
POST/api/invoice/v2/task/get

Get async issuance result

Query task status and result by task_id. The canonical path is /api/invoice/v2/task/get; the legacy path /api/invoice/task/get remains available with identical behaviour and billing. Only tasks submitted by the same account can be queried, otherwise Task not found. Poll every 1–2 seconds; tasks usually finish within seconds.

Required headers

FieldTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
task_id *stringTask number returned by /api/invoice/v2/create

status

StatusMeaning
pendingAccepted, waiting to be processed
processingBeing submitted to the tax authority
successIssued; the response carries the same data as /api/invoice/create
failedIssuance failed; message holds the reason (tax authority rejection reason when available)
The top-level status is the task status (lowercase); on success data.status is the issuance result status (e.g. Success), identical to /api/invoice/create.

When an asynchronous issuance task reaches a final state, the platform pushes one result notification to the address configured by the integrator. Push and polling can be combined: rely on the callback and use polling as a fallback.

Configuration and address requirements

  • Account-level address: integrator portal, “Account → Webhook URL”.
  • Application-level address: configured on the application (API key) that manages the company, with optional per-endpoint subscription; application level takes precedence over account level.
  • A request-level callback_url is not supported and is ignored.
  • The address must be a public http(s) URL, never a private or loopback address; redirects are not followed (3xx counts as failure); timeout 10 s; any 2xx counts as delivered.

Delivery timing and retries

  • Delivered once immediately after the task reaches success / failed.
  • On failure, retried at +1 min, +10 min, +60 min, +4 h and +12 h, 6 attempts in total (about 17 hours); after that delivery stops and /api/invoice/v2/task/get remains available as a fallback.
  • Delivery is at-least-once; deduplicate by task_id.

Payload (decrypted)

FieldTypeDescription
task_idstringTask number, deduplication key
idstringBusiness id from the request
company_idintIssuing company ID
cnpjstringIssuing company CNPJ
statusstringsuccess / failed
resultobjectOn success, the same response object as /api/invoice/create plus data.danfe (DANFE PDF URL); null on failure
errorstringFailure reason, tax authority rejection reason when available; empty string on success
testbooleanPresent and true only on messages sent by the portal “Test push” button; receivers should ignore them

{
  "task_id": "66d0a1b2c3d4e5f6a7b8c9d0",
  "id": "PED-1001",
  "company_id": 1263,
  "cnpj": "12345678000199",
  "status": "success",
  "result": {
    "success": true,
    "message": "成功",
    "data": {
      "uuid": "65f8b9a1c2d3e4f5a6b7c8d9",
      "status": "Success",
      "motivo": "Autorizado o uso da NF-e",
      "nfe": 100, "serie": 1,
      "chave": "35260112345678000199550010000001001000000017",
      "modelo": "nfe", "epec": false,
      "xml": "https://oss.example.com/.../chave.xml",
      "danfe": "https://oss.example.com/.../chave.pdf"
    }
  },
  "error": ""
}

Encrypted envelope

Payloads are delivered encrypted with AES-256-GCM. The key is derived from the integrator’s API key, so no extra secret is exchanged: key = SHA-256(UTF-8(token)), where token is the application key managing the company. GCM provides integrity: tampering with any field (including ts) makes decryption fail, so no separate signature header is added.

Headers: X-Webhook-Timestamp (Unix seconds, equal to the envelope ts) and X-Webhook-Encryption: A256GCM. If no key can be resolved the payload is delivered in plain text without the X-Webhook-Encryption header; receivers should branch on that header.

Decryption: nonce, payload and tag are Base64; the additional authenticated data (AAD) is the decimal string of ts (UTF-8).

POST {webhook_url}
Content-Type: application/json
X-Webhook-Timestamp: 1786990396
X-Webhook-Encryption: A256GCM

{
  "enc": "A256GCM",
  "kid": "token",
  "ts": 1786990396,
  "nonce": "<base64, 12 bytes>",
  "payload": "<base64 ciphertext>",
  "tag": "<base64, 16 bytes>"
}

Python decryption example (cryptography)

import base64, hashlib, json
from cryptography.hazmat.primitives.ciphers.aead import AESGCM

def decrypt(token, body):
    env = json.loads(body)
    key = hashlib.sha256(token.encode("utf-8")).digest()
    aad = str(env["ts"]).encode("utf-8")
    data = base64.b64decode(env["payload"]) + base64.b64decode(env["tag"])
    plain = AESGCM(key).decrypt(base64.b64decode(env["nonce"]), data, aad)
    return json.loads(plain)

Node.js decryption example

const crypto = require("crypto");

function decrypt(token, body) {
  const env = JSON.parse(body);
  const key = crypto.createHash("sha256").update(token, "utf8").digest();
  const d = crypto.createDecipheriv("aes-256-gcm", key, Buffer.from(env.nonce, "base64"));
  d.setAAD(Buffer.from(String(env.ts), "utf8"));
  d.setAuthTag(Buffer.from(env.tag, "base64"));
  const plain = Buffer.concat([d.update(Buffer.from(env.payload, "base64")), d.final()]);
  return JSON.parse(plain.toString("utf8"));
}

Integration testing

  • The “Test push” button next to the webhook URL in the portal sends an encrypted test message (test: true) to that address to verify connectivity and decryption.
  • The system test inbox (/webhook/inbox/{slot}, slot being any identifier of your choice) can also be configured as the webhook URL; decrypted messages are then visible in the portal.

The CC-e (Electronic Correction Letter) is an event linked to the NF-e that allows correcting information in an already authorized invoice, without changing tax values. Regulated by Ajuste SINIEF 01/07.

What can be corrected via CC-e:
  • Recipient or issuer address
  • Recipient company name (without changing CNPJ/CPF)
  • Fiscal operation code (CFOP), as long as it does not change the nature of taxes
  • Product description
  • Additional data and supplementary information
What CANNOT be corrected via CC-e:
  • Tax values (tax base, rate, tax amount)
  • Product quantity and value
  • Issuer or recipient CNPJ/CPF
  • Data that changes tax calculations
Rules:
  • Only invoices with authorized (Success) status can receive CC-e
  • Correction text must be between 15 and 1000 characters
  • Up to 20 CC-e can be issued for the same invoice
  • Each CC-e consumes 1 credit

Authentication

All CC-e endpoints use the same authentication as the main API:

HeaderTypeDescription
token string Company token (obtained during registration)
sign string MD5 Signature: MD5(token + path + body + timestamp)
timestamp string Unix timestamp in seconds (5-minute window)
POST/api/invoice/cce/send

Send Correction Letter (CC-e)

Sends a CC-e (event 110110) to the tax authority to correct data of an already authorized NF-e. The sequence (nSeqEvento) is calculated automatically — do not send it. Only non-fiscal data can be corrected (does not correct values, CNPJ, IE, etc.).

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
uuidstringNF-e UUID (required if chave is absent)
chavestring44-digit access key of the NF-e (required if uuid is absent)
correcao *stringCorrection text (tax authority limit: 15–1000 characters)
n_seq_eventointEvent sequence number. By default it is derived from the correction letters already registered on this platform. Provide a higher value explicitly when the invoice has received correction letters elsewhere

* Required field. At least one of uuid or chave is also required.

Invoices issued elsewhere can also receive a correction letter: the letter is an event independent of the original invoice, and the only requirement is that the issuer tax number embedded in the access key belongs to a company under this token. For such invoices the platform holds no original record, so the sequence number cannot be derived and defaults to 1. If the tax authority reports that an event with that number already exists, resubmit with a higher n_seq_evento. Correction letter PDF is not available for these invoices; only the event XML is.

POST/api/invoice/cce/get_list

List CC-e

Returns all CC-e (Correction Letters) issued for a specific NF-e, ordered from most recent to oldest.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
uuidstringNF-e UUID (required if chave is absent)
chavestring44-digit access key of the NF-e (required if uuid is absent)

At least one of uuid or chave is required.

POST/api/invoice/cce/download_pdf

Download CC-e PDF

Returns the CC-e PDF URL. The PDF is generated on demand on the first call (rendered from the invoice XML + CC-e XML) and stored in OSS; subsequent calls return the existing URL.

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
cce_id *stringCC-e ID (ObjectId) returned by /api/invoice/cce/get_list in the id field

* Required field.

POST/api/invoice/cce/download_xml

Download CC-e XML

Returns the URL of the signed CC-e XML (already stored in OSS after submission to the tax authority).

Required headers

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
cce_id *stringCC-e ID (ObjectId) returned by /api/invoice/cce/get_list in the id field

* Required field.