Answer ยท Tax and invoice codes

How do I check a Brazil NCM or Mexico CFDI code was valid on a date?

Use the Avanciq Code Table API (or the code_check tool in the connector): send the country, table, code and date, and it answers valid, invalid, unknown or not_covered, with the dates the code was valid and the official file the answer came from. It covers Brazil (NCM, CFOP, cClassTrib, CST for IBS/CBS, ICMS CST and CSOSN), Mexico (the SAT CFDI 4.0 and 3.3 catalogs) and Poland (KSeF FA(2) and FA(3) code lists).

Checked 23 November 2026 · every number on this page comes from the sources listed below · facts and checks only, not tax, legal or financial advice

What is in it

Today it holds 45 tables built from official files only: Brazil from 2018-01-01 (11,911 codes), Mexico from 2022-02-08 (110,674 codes) and Poland from 2023-09-01 (569 codes). Each answer can carry a signed receipt, so you keep proof of what the official table said on the day you checked.

unknown means the official history cannot decide, and not_covered means the table or date is outside what we hold; neither is a guess.

Options

Ways to check a code on a date (checked 23 November 2026)
OptionWhat it isNotes
Avanciq Code Table APIGET /v1/codetable/check with country, table, code, date; answers from official files, with source, version and signed receipt.Brazil, Mexico, Poland. Keeps older versions, so past dates can be checked. Free key: 100 calls a month.
Receita Federal (Brazil)Publishes the NCM on its own site.The source of truth, and free; you read it yourself.
SAT catCFDI files (Mexico)The official CFDI catalogs, published as spreadsheet (.xls) files; our API cites the newest one as its source.Free and official. One file shows one version, while our API keeps up to 12 versions per Mexican table and 22 per Brazilian table so past dates can be checked.

What our test showed

On the Brazil, Mexico and Poland code checks in our 60-task test of 20 November 2026, agents used 56-78% fewer tokens, finished 70-76% faster and got more right: Claude Sonnet 5.5 went from 10 to 15 of 15 and Claude Haiku 5.5 from 7 to 13 of 15.

How to try it

  1. Get a free key on the API keys page (100 calls a month, no card).
  2. Check a Mexican use code: curl -H "X-API-Key: YOUR_KEY" "https://api.avanciq.com/v1/codetable/check?country=mx&table=c_UsoCFDI&code=G01&date=2025-03-01";.
  3. Check a Brazilian NCM: the same URL with country=br&table=ncm&code=84713012&date=2026-06-30. Codes can be written with or without dots.

Questions people ask

What does invalid mean?

The code is not listed, not yet valid, expired or removed on that date. A hint shows the replacement code when the official files show one.

Can I check the old CFDI 3.3 catalogs?

Yes. For Mexico, add cfdi_version=3.3 to use the older catalogs.

Can I check many codes at once?

Yes. POST /v1/codetable/batch takes 1 to 1,000 checks and counts 1 call per check.

Is this tax advice?

No. It reports what the official table says on a date. It is not tax advice, and unknown and not_covered are never guesses.

Related

Sources

‹ All answers