← HomeFleetPay / Schema

FiscalTaxRule

Structure preserved from the versioned API contract.

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

idintegerRequired

Integer rule ID; this is the identifier accepted by DELETE.

minimum1
origin_statestring | nullRequired

Origin state; null means any origin (wildcard).

minLength2
maxLength2
destination_statestring | nullRequired

Destination state; null means any destination (wildcard).

minLength2
maxLength2
tp_servinteger | nullRequired

Service type (ide/tpServ) to which the rule applies; null means any type.

0 · 1 · 2 · 3 · null
tp_serv_rotulostring | nullRequired

Human-readable service type label — for example, Subcontratação; null when the rule applies to any type. Read-only: returned by GET and the 201 response to POST; not accepted in request payloads.

cfopstring | nullRequired

Suggested CFOP when filling in the draft.

pattern"^\\d{4}$"
icms_variante_rotulostringRequired

Human-readable ICMS variant label — for example, Tributação normal do ICMS (CST 00). Read-only: returned by GET and the 201 response to POST; not accepted in request payloads.

cststringRequired

Effective CST derived from the rule's variant; supplied by the client only for ICMS45.

minLength2
maxLength2
aliquotanumber | null · doubleRequired

ICMS rate.

minimum0
maximum100
p_red_bcnumber | null · doubleRequired

ICMS tax-base reduction percentage.

minimum0
maximum100
ibs_cbs_cststring | nullRequired

IBS/CBS CST, with 3 digits — for example, 000, full taxation. This uses the Tax Reform's own vocabulary: it is not the ICMS cst, which has 2 digits, and neither is derived from the other.

pattern"^\\d{3}$"
ibs_cbs_class_tribstring | nullRequired

IBS/CBS tax classification, with 6 digits — e.g. 000001.

pattern"^\\d{6}$"
ibs_uf_aliquotanumber | null · doubleRequired

State IBS tax rate, as a percentage, with up to 4 decimal places.

minimum0
maximum100
ibs_mun_aliquotanumber | null · doubleRequired

Municipal IBS tax rate, as a percentage, with up to 4 decimal places.

minimum0
maximum100
cbs_aliquotanumber | null · doubleRequired

CBS tax rate, as a percentage, with up to 4 decimal places.

minimum0
maximum100
ibs_cbs_p_red_bcnumber | null · doubleRequired

IBS/CBS tax-base reduction percentage, with up to 4 decimal places. Applied before tax rates.

minimum0
maximum100
valid_fromstring | null · dateRequired
valid_untilstring | null · dateRequired
notesstring | nullRequired
maxLength255
Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "required": [
    "id",
    "origin_state",
    "destination_state",
    "tp_serv",
    "tp_serv_rotulo",
    "cfop",
    "icms_variante",
    "icms_variante_rotulo",
    "cst",
    "aliquota",
    "p_red_bc",
    "ibs_cbs_cst",
    "ibs_cbs_class_trib",
    "ibs_uf_aliquota",
    "ibs_mun_aliquota",
    "cbs_aliquota",
    "ibs_cbs_p_red_bc",
    "valid_from",
    "valid_until",
    "notes"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1,
      "description": "ID inteiro da regra; é ele que o `DELETE` recebe."
    },
    "origin_state": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 2,
      "maxLength": 2,
      "description": "UF de origem; `null` = qualquer origem (curinga)."
    },
    "destination_state": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 2,
      "maxLength": 2,
      "description": "UF de destino; `null` = qualquer destino (curinga)."
    },
    "tp_serv": {
      "type": [
        "integer",
        "null"
      ],
      "enum": [
        0,
        1,
        2,
        3,
        null
      ],
      "description": "Tipo de serviço (`ide/tpServ`) a que a regra se aplica; `null` = qualquer tipo."
    },
    "tp_serv_rotulo": {
      "type": [
        "string",
        "null"
      ],
      "description": "Rótulo legível do tipo de serviço — ex.: `Subcontratação`; `null` quando a regra vale\npara qualquer tipo. Somente leitura: aparece no `GET` e no `201` do `POST`, e não é\naceito no envio.\n"
    },
    "cfop": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{4}$",
      "description": "CFOP sugerido no preenchimento do rascunho."
    },
    "icms_variante": {
      "$ref": "#/components/schemas/FiscalTaxRuleIcmsVariant"
    },
    "icms_variante_rotulo": {
      "type": "string",
      "description": "Rótulo legível da variante de ICMS — ex.: `Tributação normal do ICMS (CST 00)`.\nSomente leitura: aparece no `GET` e no `201` do `POST`, e não é aceito no envio.\n"
    },
    "cst": {
      "type": "string",
      "minLength": 2,
      "maxLength": 2,
      "description": "CST efetivo da regra, derivado da variante — informado pelo cliente somente em `ICMS45`."
    },
    "aliquota": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Percentual do ICMS."
    },
    "p_red_bc": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Redução da base de cálculo do ICMS, em percentual."
    },
    "ibs_cbs_cst": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{3}$",
      "description": "CST de IBS/CBS, com 3 dígitos — ex.: `000`, tributação integral. Vocabulário próprio\nda Reforma Tributária: não é o `cst` do ICMS, que tem 2 dígitos, e um não deriva do\noutro.\n"
    },
    "ibs_cbs_class_trib": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\d{6}$",
      "description": "Classificação tributária de IBS/CBS, com 6 dígitos — ex.: `000001`.\n"
    },
    "ibs_uf_aliquota": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Alíquota do IBS estadual, em percentual, com até 4 casas decimais."
    },
    "ibs_mun_aliquota": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Alíquota do IBS municipal, em percentual, com até 4 casas decimais."
    },
    "cbs_aliquota": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Alíquota da CBS, em percentual, com até 4 casas decimais."
    },
    "ibs_cbs_p_red_bc": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "minimum": 0,
      "maximum": 100,
      "description": "Redução da base de cálculo de IBS/CBS, em percentual, com até 4 casas decimais.\nAplicada antes das alíquotas.\n"
    },
    "valid_from": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "valid_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    }
  }
}