TF Fiscal
Documentation

Tax classes

Update tax class

Replaces the whole class; the version goes up on every change.

POST/openapi/v2/empresas/{empresaId}/classes-imposto/{codigo}
Requires the token, timestamp and sign signature headers, see Authentication.

Send the whole class, with the same tipo: any group or row not sent stops existing. Any change, including only descricao, adds 1 to the version; content identical to the current one writes nothing. An IncompativelComRegime class that passes validation under the current regime goes back to Compativel. Invoices already accepted do not change; they stored the expanded taxes and the version used.

Path parameters

empresaId*
stringCompany identifier
codigo*
stringClass code

* Required field

Request body

tipo*
required; equal to the current one
stringClass type
descricao
stringClass name
*
icms and issqn add up to at least 1 row
arrayICMS rows
arrayIPI rows
*
at least 1 row
arrayPIS rows
*
at least 1 row
arrayCOFINS rows
*
icms and issqn add up to at least 1 row
arrayISSQN rows
arrayIBS and CBS rows
arrayICMS per destination state

* Required field

200
Class updated.
codigo
stringClass code
tipo
stringClass type
descricao
stringClass name
situacao
stringClass status
arrayIncompatibility reasons
versao
intVersion
icms
arrayRows of the group
ipi
arrayRows of the group
pis
arrayRows of the group
cofins
arrayRows of the group
issqn
arrayRows of the group
ibsCbs
arrayRows of the group
icmsPorEstado
arrayICMS per destination state
dataCriacao
stringCreation time
dataUltimaAlteracao
stringLast change

Each row is validated with the rules of the matching issuance group, plus the class rules:

ValidationError
codigo in the body: the code is generated by the platform10005208
Unknown field at any level; the message names the path, such as icms[0].aliquotaX10005210
Number or boolean sent as text, such as "aliquota": "18"10005213
Required fields, format, range, Padrao on ICMS, pis / cofins with at least 1 row, icms and issqn adding up to at least 1 row, at most 50 rows per group10001001
Same combination of cenario, tipoPessoa and naoContribuinte repeated in the group10005211
First digit of cfop not matching the scenario; the ISSQN Padrao row is not checked10005212
ISSQN row with cfop other than 5933, including Padrao; ICMS row with 593310005214
tipo different from the current one on update10005216
Group the type does not allow: issqn on NFe, ipi on NFCe10005218
NFCe class with a scenario outside SaidaDentroEstado / Padrao10005219
NFCe class with a field NFC-e issuance does not have, such as icms[0].difal10005217
ICMS row with naoContribuinte = true or tipoPessoa = Fisica using CST / CSOSN 10, 30, 70, 101, 201, 202, 203 or percentualCreditoSimples10004047
PIS / COFINS 01 with an aliquota other than the statutory rate of the PIS/COFINS regime set on the company10005008
CST or CSOSN according to the company CRT: CRT 1 / 4 CSOSN only, CRT 2 / 3 CST only10004046
Existing tax code (ICMS, PIS, COFINS, IPI, IBS/CBS)10005203
IBS/CBS classification belonging to the CST10005204
Fields the code requires; percentualCreditoSimples on CSOSN 101 / 201 may come from the company record10004043
Fields that do not apply to the code10004044

Left for issuance: CEST on codes with ST and every calculation of the tax engine. Numbers are stored and returned as sent: 18.00 comes back 18.00.