/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
tokenstring | string | Either an integrator token or a company token; no subscription is required. If the header is not sent, the token may also be placed in the token field of the body, but the signature is still computed with the header |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
seriestring | string | First digit: "1", "2", "3", "5", "6" or "7" |
tipostring | string | "entrada" (inbound) or "saida" (outbound); case and accents are ignored |
abrangenciastring | string | "intraestadual", "interestadual" or "exterior" |
incluir_string | string | "1", "true", "sim", "yes", "s" or "y" 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.
Common errors
| Message | Cause |
|---|---|
| Série inválida. Use 1, 2, 3, 5, 6 ou 7 / ... | serie is not one of the accepted values |
| Tipo inválido. Use entrada ou saida / ... | tipo is not one of the accepted values |
| Abrangência inválida. Use intraestadual, interestadual ou exterior / ... | abrangencia is not one of the accepted values |
| Tabela de CFOP ainda não carregada. Contate o suporte. / CFOP 表尚未加载,请联系技术支持 | The platform has not loaded the CFOP table yet |
| Falha na consulta. Tente novamente mais tarde. / 查询失败,请稍后重试 | The platform query failed; retry later |
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/cfop/list" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"serie": "5",
"tipo": "saida",
"abrangencia": "intraestadual"
}
{
"success": true,
"message": "成功",
"data": {
"versao": "2.10",
"fonte": "Informe Técnico NF-e 2023.002 v2.10 - Tabela CFOP",
"total": 154,
"items": [
{
"cfop": "5101",
"descricao": "Venda de produção do estabelecimento.",
"nota_explicativa": "Classificam-se neste código as vendas de produtos industrializados ou produzidos pelo próprio estabelecimento.",
"serie": 5,
"tipo": "saida",
"abrangencia": "intraestadual",
"grupo": "5.100",
"grupo_descricao": "Vendas de produção própria ou de terceiros",
"vigencia_inicio": "2006-01-01",
"vigencia_fim": "",
"ind_nfe": 1,
"ind_comunica": 0,
"ind_transp": 0,
"ind_devol": 0,
"ind_retor": 0,
"ind_anula": 0,
"ind_remes": 0,
"ind_comb": 0,
"ind_exc_ibscbs": 0,
"ativo": true
}
]
}
}