Core APIs
CFOP Codes
2 endpoints
/api/cfop/getLook up CFOP
Returns one code from the official CFOP table published by the NF-e Portal (Technical Report 2023.002), with every column: the tax authority's title and explanatory note, validity dates, the table's nine indicators, plus type (inbound or outbound), scope and group. The platform maintains the table: when the tax authority publishes a new version, the update is applied with no change on the integration side, and the versao field states the version in force. Parameter passed in the JSON body. Discontinued codes remain queryable, with ativo = false. Free of charge.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Issuing company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| cfop * | string | 4-digit code, with or without the dot ("5101" or "5.101") |
* Required field.
Response fields
| Field | Type | Description |
|---|---|---|
| cfop | string | 4-digit code, no dot |
| descricao | string | "Título do CFOP" from the official table (Portuguese) |
| nota_explicativa | string | "Descrição (nota explicativa)" from the official table: what is classified under the code (Portuguese) |
| serie | int | First digit: 1, 2, 3 (inbound) or 5, 6, 7 (outbound) |
| tipo | string | entrada (inbound) or saida (outbound) |
| abrangencia | string | intraestadual (same state; series 1 and 5), interestadual (interstate; 2 and 6) or exterior (abroad; 3 and 7) |
| grupo | string | Group of the official table (5.100, 5.200, 5.400...) |
| grupo_descricao | string | Official group title (Portuguese) |
| vigencia_inicio | string | Start of validity (yyyy-mm-dd) |
| vigencia_fim | string | End of validity (yyyy-mm-dd); empty = no end scheduled |
| ind_nfe | int | 1 = code allowed in NF-e (model 55) |
| ind_comunica | int | 1 = communication service |
| ind_transp | int | 1 = transport service |
| ind_devol | int | 1 = goods return (devolução) |
| ind_retor | int | 1 = return of goods previously shipped (retorno) |
| ind_anula | int | 1 = value cancellation (anulação) |
| ind_remes | int | 1 = shipment (remessa) |
| ind_comb | int | Fuel and lubricant indicator from the official table (0 = no; 1 and 2 as defined in the Technical Report) |
| ind_exc_ibscbs | int | IBS/CBS indicator from the official table (0 or 1), passed through as published |
| ativo | bool | false = discontinued code (validity ended or removed from the table); kept for old documents |
| versao | string | Version of the table in force (Technical Report version) |
| fonte | string | Name of the official source |
/api/cfop/listList CFOP
Returns the official CFOP table, optionally filtered by series (first digit), type and scope, passed in the JSON body. All filters are optional and can be combined; an empty body ({}) returns the whole table (around 620 codes, with every column), suitable for populating a dropdown or a local cache, refreshed whenever versao changes. Items are always returned in ascending CFOP order. The series already determines type and scope (series 5 is always outbound within the state), so the three filters overlap; a contradictory combination returns an empty list. By default only active codes are returned. Free of charge.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Issuing company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| serie | string | First digit: "1", "2", "3", "5", "6" or "7" |
| tipo | string | "entrada" (inbound) or "saida" (outbound) |
| abrangencia | string | "intraestadual", "interestadual" or "exterior" |
| incluir_inativos | string | "1" to also return discontinued codes (ativo = false) |
All fields are optional. With none of them, send {}.
Each item has the same fields as /api/cfop/get, including the full explanatory note, always in ascending CFOP order. versao and fonte identify the version of the table in force; total is the number of items returned.