TF Fiscal

Core APIs

CFOP Codes

2 endpoints

POST/api/cfop/get

Look 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

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
cfop *string4-digit code, with or without the dot ("5101" or "5.101")

* Required field.

Response fields

FieldTypeDescription
cfopstring4-digit code, no dot
descricaostring"Título do CFOP" from the official table (Portuguese)
nota_explicativastring"Descrição (nota explicativa)" from the official table: what is classified under the code (Portuguese)
serieintFirst digit: 1, 2, 3 (inbound) or 5, 6, 7 (outbound)
tipostringentrada (inbound) or saida (outbound)
abrangenciastringintraestadual (same state; series 1 and 5), interestadual (interstate; 2 and 6) or exterior (abroad; 3 and 7)
grupostringGroup of the official table (5.100, 5.200, 5.400...)
grupo_descricaostringOfficial group title (Portuguese)
vigencia_iniciostringStart of validity (yyyy-mm-dd)
vigencia_fimstringEnd of validity (yyyy-mm-dd); empty = no end scheduled
ind_nfeint1 = code allowed in NF-e (model 55)
ind_comunicaint1 = communication service
ind_transpint1 = transport service
ind_devolint1 = goods return (devolução)
ind_retorint1 = return of goods previously shipped (retorno)
ind_anulaint1 = value cancellation (anulação)
ind_remesint1 = shipment (remessa)
ind_combintFuel and lubricant indicator from the official table (0 = no; 1 and 2 as defined in the Technical Report)
ind_exc_ibscbsintIBS/CBS indicator from the official table (0 or 1), passed through as published
ativoboolfalse = discontinued code (validity ended or removed from the table); kept for old documents
versaostringVersion of the table in force (Technical Report version)
fontestringName of the official source
POST/api/cfop/list

List 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

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature
timestampstringUnix timestamp in seconds

Body

FieldTypeDescription
seriestringFirst digit: "1", "2", "3", "5", "6" or "7"
tipostring"entrada" (inbound) or "saida" (outbound)
abrangenciastring"intraestadual", "interestadual" or "exterior"
incluir_inativosstring"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.