MCP-Server

Stackin

io.github.stackin-io/stackin
Business & Betrieb Recht & Compliance Öffentlich und erreichbar MCP 2025-11-25

Was dieses MCP kann

Issues, validates, consults, corrects, cancels, and manages Brazilian NF-e and NFS-e fiscal invoices and related taxpayer and classification data.

cancel_invoice
Cancel an authorized invoice. Legal cancellation, with fiscal and accounting effect, inside a window the NFS-e authorizer enforces for the municipality. Ask the human to confirm before calling; never call it speculatively. The reason reaches the tax authority verbatim and must be at least 15 characters. Pass idempotency_key to make a retry safe: repeating the same key with the same access key and reason replays the first answer instead of cancelling a second time. Reuse the key only when retrying that exact call; a genuinely new cancellation needs a new key, or none. Nothing generates one for you — two calls without a key are two cancellations.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', 'title': 'cancel_invoiceArguments', 'required': ['access_key', 'document_type', 'reason'], 'properties': {'reason': {'type': 'string', 'title': 'Reason', 'maxLength': 256, 'minLength': 15}, 'access_key': {'type': 'string', 'title': 'Access Key'}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type'}, 'idempotency_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Idempotency Key', 'default': None}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
consult_invoice
Look up an invoice's current status by its access key. Read-only: it never changes the document.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'consult_invoiceArguments', 'required': ['access_key', 'document_type'], 'properties': {'access_key': {'type': 'string', 'title': 'Access Key'}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type'}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
correct_invoice
File an electronic correction letter (CC-e) against an NF-e. NF-e only: there is no correction letter for an NFS-e, where a wrong document is cancelled and issued again. It corrects wording and non-fiscal fields only. It cannot change values, taxes, the recipient or the products — those still require cancelling and issuing again, and telling the user a CC-e will fix an amount is wrong in a way they only discover at an audit. Each letter supersedes the previous one and the SEFAZ keeps at most 20 per document. The text reaches the tax authority verbatim.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', 'title': 'correct_invoiceArguments', 'required': ['access_key', 'correction'], 'properties': {'access_key': {'type': 'string', 'title': 'Access Key'}, 'correction': {'type': 'string', 'title': 'Correction', 'maxLength': 1000, 'minLength': 15}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
get_invoice_pdf
Return the printable rendering of a document, as a PDF. Works for both types — a DANFE for nfe, a DANFSe for nfse. The PDF comes back base64-encoded in content_base64; the XML, not this, is the legally valid document. A 502 from here means the authorizer is unavailable, not that the invoice is wrong.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'get_invoice_pdfArguments', 'required': ['access_key', 'document_type'], 'properties': {'access_key': {'type': 'string', 'title': 'Access Key'}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type'}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoicePdf', 'required': ['access_key', 'content_base64'], 'properties': {'access_key': {'type': 'string', 'title': 'Access Key'}, 'content_type': {'type': 'string', 'title': 'Content Type', 'default': 'application/pdf'}, 'content_base64': {'type': 'string', 'title': 'Content Base64', 'description': 'The PDF bytes, base64-encoded. Decode before saving.'}}, 'description': 'A printed document, base64-encoded because a tool answer is JSON.'}
get_invoice_submissions
Show every attempt made for one invoice and what came back. This is the tool that answers "why was it rejected". consult_invoice gives the status; this gives the tax authority's own code, its message, and the request and response exactly as they went over the wire. Read-only. It takes the invoice_id, like reissue_invoice — a rejected document has no access key to look it up by. Get the id from list_invoices. The rows are attempts, not documents: a reissued invoice has more than one, oldest first, and only the last describes the current state. Quote the authority's message rather than paraphrasing it; the code is what the user will search for.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'get_invoice_submissionsArguments', 'required': ['invoice_id'], 'properties': {'invoice_id': {'type': 'string', 'title': 'Invoice Id'}}}
Ausgabeschema
{'type': 'object', '$defs': {'SubmissionAttempt': {'type': 'object', 'title': 'SubmissionAttempt', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None}, 'detail': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Detail', 'default': None, 'description': "The authorizer's message. The reason a document was rejected, in its own words."}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None}, 'created_at': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Created At', 'default': None}, 'environment': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Environment', 'default': None, 'description': 'homologation or production.'}, 'http_status': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Http Status', 'default': None}, 'raw_request': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Raw Request', 'default': None}, 'raw_response': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Raw Response', 'default': None}}, 'description': "One transmission attempt, and what the authorizer answered.\n\nThis is where a rejection's reason lives: `detail` carries the tax\nauthority's own words, and `raw_response` its full answer.", 'additionalProperties': True}}, 'title': 'SubmissionList', 'properties': {'attempts': {'type': 'array', 'items': {'$ref': '#/$defs/SubmissionAttempt'}, 'title': 'Attempts'}, 'invoice_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Invoice Id', 'default': None}}, 'description': 'Every attempt made for one document, oldest first.\n\nOnly the last attempt describes the current state; the earlier ones\nare why it got there.', 'additionalProperties': True}
invalidate_numbering
Declare an NF-e numbering range reserved but never used. NF-e numbering has to be continuous, so a gap left by a failed issuance is explained to the SEFAZ with this — not with a new document. Irreversible: a number declared unused can never be used. Only for numbers that were never authorized. An authorized document is cancelled, never invalidated. Confirm the range with the user and read it back before calling: the range is inclusive, and one digit wrong burns numbers the company still needs. The SDK refuses a backwards range and a reason outside 15-255 characters before anything is transmitted.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', 'title': 'invalidate_numberingArguments', 'required': ['series', 'number_start', 'number_end', 'reason'], 'properties': {'reason': {'type': 'string', 'title': 'Reason', 'maxLength': 255, 'minLength': 15}, 'series': {'type': 'string', 'title': 'Series'}, 'number_end': {'type': 'integer', 'title': 'Number End', 'minimum': 1}, 'number_start': {'type': 'integer', 'title': 'Number Start', 'minimum': 1}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
issue_invoice
Issue a Brazilian fiscal document: NFS-e or NF-e. This produces a legal fiscal document. Confirm the data with the user before calling when you inferred any field. Every item needs a price: unit_price is what one unit costs and amount is the line's gross total. Send unit_price with quantity when the user quotes a price per unit, amount when they quote the line. Sending both asserts they agree and is refused if they do not. document_type nfse is a service invoice: each item needs a description and a price, the recipient address is optional, and service_code (LC 116/2003 item.subitem) falls back to the company's fiscal profile when omitted. document_type nfe is for goods, and the SEFAZ rejects a partial one: every item needs ncm and cfop, and recipient_address is required with street, number, neighborhood, city, state, zip_code and city_code all filled. Call validate_invoice_payload first when any of that was inferred rather than given. Pass idempotency_key when a retry is possible: repeating the same key with the same payload replays the first answer instead of issuing a second document. Without one, a retry after a lost response issues again — another credit, another number burned, and undoing it means cancelling, which has a deadline. Nothing generates the key for you; use one per business event, not per call.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', '$defs': {'Ipi': {'type': 'object', 'title': 'Ipi', 'required': ['c_enq', 'trib'], 'properties': {'trib': {'anyOf': [{'$ref': '#/$defs/IpiTrib'}, {'$ref': '#/$defs/IpiNt'}, {'type': 'object', 'additionalProperties': True}], 'title': 'Trib'}, 'c_enq': {'type': 'string', 'title': 'C Enq'}, 'c_selo': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'C Selo', 'default': None}, 'q_selo': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Selo', 'default': None}, 'cnpj_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Cnpj Prod', 'default': None}}, 'description': "This item's IPI."}, 'Tax': {'type': 'object', 'title': 'Tax', 'properties': {'ipi': {'anyOf': [{'$ref': '#/$defs/Ipi'}, {'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Ipi', 'default': None}, 'pis': {'anyOf': [{'$ref': '#/$defs/PisAliq'}, {'$ref': '#/$defs/PisQtde'}, {'$ref': '#/$defs/PisNt'}, {'$ref': '#/$defs/PisOutr'}, {'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Pis', 'default': None}, 'icms': {'anyOf': [{'$ref': '#/$defs/Icms00'}, {'$ref': '#/$defs/Icms02'}, {'$ref': '#/$defs/Icms10'}, {'$ref': '#/$defs/Icms15'}, {'$ref': '#/$defs/Icms20'}, {'$ref': '#/$defs/Icms30'}, {'$ref': '#/$defs/Icms40'}, {'$ref': '#/$defs/Icms51'}, {'$ref': '#/$defs/Icms53'}, {'$ref': '#/$defs/Icms60'}, {'$ref': '#/$defs/Icms61'}, {'$ref': '#/$defs/Icms70'}, {'$ref': '#/$defs/Icms90'}, {'$ref': '#/$defs/IcmsPart'}, {'$ref': '#/$defs/IcmsSt'}, {'$ref': '#/$defs/IcmsSn101'}, {'$ref': '#/$defs/IcmsSn102'}, {'$ref': '#/$defs/IcmsSn201'}, {'$ref': '#/$defs/IcmsSn202'}, {'$ref': '#/$defs/IcmsSn500'}, {'$ref': '#/$defs/IcmsSn900'}, {'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Icms', 'default': None}, 'cofins': {'anyOf': [{'$ref': '#/$defs/CofinsAliq'}, {'$ref': '#/$defs/CofinsQtde'}, {'$ref': '#/$defs/CofinsNt'}, {'$ref': '#/$defs/CofinsOutr'}, {'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Cofins', 'default': None}, 'pis_st': {'anyOf': [{'$ref': '#/$defs/PisSt'}, {'type': 'null'}], 'default': None}, 'cofins_st': {'anyOf': [{'$ref': '#/$defs/CofinsSt'}, {'type': 'null'}], 'default': None}, 'v_tot_trib': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Tot Trib', 'default': None}, 'icms_uf_dest': {'anyOf': [{'$ref': '#/$defs/IcmsUfDest'}, {'type': 'null'}], 'default': None}}, 'description': "This item's taxes, already computed by the caller."}, 'IpiNt': {'type': 'object', 'title': 'IpiNt', 'required': ['cst'], 'properties': {'cst': {'enum': ['01', '02', '03', '04', '05', '51', '52', '53', '54', '55'], 'type': 'string', 'title': 'Cst'}}, 'description': 'IPI not taxed.'}, 'PisNt': {'type': 'object', 'title': 'PisNt', 'required': ['cst'], 'properties': {'cst': {'enum': ['04', '05', '06', '07', '08', '09'], 'type': 'string', 'title': 'Cst'}}, 'description': 'PIS not taxed.'}, 'PisSt': {'type': 'object', 'title': 'PisSt', 'required': ['v_pis'], 'properties': {'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_pis': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Pis', 'default': None}, 'v_pis': {'type': 'string', 'title': 'V Pis'}, 'q_bc_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Prod', 'default': None}, 'v_aliq_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Aliq Prod', 'default': None}, 'ind_soma_pis_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Soma Pis St', 'default': None}}, 'description': 'PIS withheld by substitution.'}, 'IbsCbs': {'type': 'object', 'title': 'IbsCbs', 'required': ['cst', 'classification', 'rate_state', 'rate_city', 'rate_federal'], 'properties': {'cst': {'type': 'string', 'title': 'Cst', 'pattern': '^\\d{3}$'}, 'base': {'anyOf': [{'type': 'number', 'exclusiveMinimum': 0}, {'type': 'null'}], 'title': 'Base', 'default': None}, 'rate_city': {'type': 'number', 'title': 'Rate City', 'minimum': 0}, 'rate_state': {'type': 'number', 'title': 'Rate State', 'minimum': 0}, 'rate_federal': {'type': 'number', 'title': 'Rate Federal', 'minimum': 0}, 'classification': {'type': 'string', 'title': 'Classification', 'pattern': '^\\d{6}$'}}, 'description': 'The Reforma Tributária group for one item.'}, 'Icms00': {'type': 'object', 'title': 'Icms00', 'required': ['orig', 'mod_bc', 'v_bc', 'p_icms', 'v_icms'], 'properties': {'cst': {'type': 'string', 'const': '00', 'title': 'Cst', 'default': '00'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'type': 'string', 'title': 'Mod Bc'}, 'p_icms': {'type': 'string', 'title': 'P Icms'}, 'v_icms': {'type': 'string', 'title': 'V Icms'}}, 'description': 'ICMS fully taxed.'}, 'Icms02': {'type': 'object', 'title': 'Icms02', 'required': ['orig', 'ad_rem_icms', 'v_icms_mono'], 'properties': {'cst': {'type': 'string', 'const': '02', 'title': 'Cst', 'default': '02'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'q_bc_mono': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono', 'default': None}, 'ad_rem_icms': {'type': 'string', 'title': 'Ad Rem Icms'}, 'v_icms_mono': {'type': 'string', 'title': 'V Icms Mono'}}, 'description': 'ICMS monofasico, taxed by unit.'}, 'Icms10': {'type': 'object', 'title': 'Icms10', 'required': ['orig', 'mod_bc', 'v_bc', 'p_icms', 'v_icms', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st'], 'properties': {'cst': {'type': 'string', 'const': '10', 'title': 'Cst', 'default': '10'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'type': 'string', 'title': 'Mod Bc'}, 'p_icms': {'type': 'string', 'title': 'P Icms'}, 'v_icms': {'type': 'string', 'title': 'V Icms'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'v_bc_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'mot_des_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms St', 'default': None}, 'v_icms_st_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St Deson', 'default': None}}, 'description': 'ICMS taxed with substitution.'}, 'Icms15': {'type': 'object', 'title': 'Icms15', 'required': ['orig', 'ad_rem_icms', 'v_icms_mono', 'ad_rem_icms_reten', 'v_icms_mono_reten'], 'properties': {'cst': {'type': 'string', 'const': '15', 'title': 'Cst', 'default': '15'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'q_bc_mono': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono', 'default': None}, 'ad_rem_icms': {'type': 'string', 'title': 'Ad Rem Icms'}, 'v_icms_mono': {'type': 'string', 'title': 'V Icms Mono'}, 'p_red_ad_rem': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Ad Rem', 'default': None}, 'mot_red_ad_rem': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Red Ad Rem', 'default': None}, 'q_bc_mono_reten': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono Reten', 'default': None}, 'ad_rem_icms_reten': {'type': 'string', 'title': 'Ad Rem Icms Reten'}, 'v_icms_mono_reten': {'type': 'string', 'title': 'V Icms Mono Reten'}}, 'description': 'ICMS monofasico with retention.'}, 'Icms20': {'type': 'object', 'title': 'Icms20', 'required': ['orig', 'mod_bc', 'p_red_bc', 'v_bc', 'p_icms', 'v_icms'], 'properties': {'cst': {'type': 'string', 'const': '20', 'title': 'Cst', 'default': '20'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'type': 'string', 'title': 'Mod Bc'}, 'p_icms': {'type': 'string', 'title': 'P Icms'}, 'v_icms': {'type': 'string', 'title': 'V Icms'}, 'p_red_bc': {'type': 'string', 'title': 'P Red Bc'}, 'v_bc_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp', 'default': None}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}}, 'description': 'ICMS with a reduced base.'}, 'Icms30': {'type': 'object', 'title': 'Icms30', 'required': ['orig', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st'], 'properties': {'cst': {'type': 'string', 'const': '30', 'title': 'Cst', 'default': '30'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}}, 'description': 'ICMS exempt with substitution.'}, 'Icms40': {'type': 'object', 'title': 'Icms40', 'required': ['orig', 'cst'], 'properties': {'cst': {'enum': ['40', '41', '50'], 'type': 'string', 'title': 'Cst'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}}, 'description': 'ICMS exempt or not taxed.'}, 'Icms51': {'type': 'object', 'title': 'Icms51', 'required': ['orig'], 'properties': {'cst': {'type': 'string', 'const': '51', 'title': 'Cst', 'default': '51'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Dif', 'default': None}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mod Bc', 'default': None}, 'p_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms', 'default': None}, 'v_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms', 'default': None}, 'p_red_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc', 'default': None}, 'v_bc_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp', 'default': None}, 'p_fcp_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp Dif', 'default': None}, 'v_fcp_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp Dif', 'default': None}, 'v_icms_op': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Op', 'default': None}, 'v_fcp_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp Efet', 'default': None}, 'v_icms_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Dif', 'default': None}, 'c_benef_rbc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'C Benef Rbc', 'default': None}}, 'description': 'ICMS deferred.'}, 'Icms53': {'type': 'object', 'title': 'Icms53', 'required': ['orig'], 'properties': {'cst': {'type': 'string', 'const': '53', 'title': 'Cst', 'default': '53'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'p_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Dif', 'default': None}, 'q_bc_mono': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono', 'default': None}, 'ad_rem_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ad Rem Icms', 'default': None}, 'v_icms_mono': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Mono', 'default': None}, 'q_bc_mono_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono Dif', 'default': None}, 'v_icms_mono_op': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Mono Op', 'default': None}, 'ad_rem_icms_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ad Rem Icms Dif', 'default': None}, 'v_icms_mono_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Mono Dif', 'default': None}}, 'description': 'ICMS monofasico deferred.'}, 'Icms60': {'type': 'object', 'title': 'Icms60', 'required': ['orig'], 'properties': {'cst': {'type': 'string', 'const': '60', 'title': 'Cst', 'default': '60'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'p_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P St', 'default': None}, 'v_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Efet', 'default': None}, 'p_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms Efet', 'default': None}, 'v_bc_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc St Ret', 'default': None}, 'v_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Efet', 'default': None}, 'p_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St Ret', 'default': None}, 'v_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St Ret', 'default': None}, 'p_red_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc Efet', 'default': None}, 'v_icms_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St Ret', 'default': None}, 'v_bc_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St Ret', 'default': None}, 'v_icms_substituto': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Substituto', 'default': None}}, 'description': 'ICMS already charged by an earlier substitution.'}, 'Icms61': {'type': 'object', 'title': 'Icms61', 'required': ['orig', 'ad_rem_icms_ret', 'v_icms_mono_ret'], 'properties': {'cst': {'type': 'string', 'const': '61', 'title': 'Cst', 'default': '61'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'q_bc_mono_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Mono Ret', 'default': None}, 'ad_rem_icms_ret': {'type': 'string', 'title': 'Ad Rem Icms Ret'}, 'v_icms_mono_ret': {'type': 'string', 'title': 'V Icms Mono Ret'}}, 'description': 'ICMS monofasico already charged earlier.'}, 'Icms70': {'type': 'object', 'title': 'Icms70', 'required': ['orig', 'mod_bc', 'p_red_bc', 'v_bc', 'p_icms', 'v_icms', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st'], 'properties': {'cst': {'type': 'string', 'const': '70', 'title': 'Cst', 'default': '70'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'type': 'string', 'title': 'Mod Bc'}, 'p_icms': {'type': 'string', 'title': 'P Icms'}, 'v_icms': {'type': 'string', 'title': 'V Icms'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'p_red_bc': {'type': 'string', 'title': 'P Red Bc'}, 'v_bc_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}, 'mot_des_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms St', 'default': None}, 'v_icms_st_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St Deson', 'default': None}}, 'description': 'ICMS with a reduced base and substitution.'}, 'Icms90': {'type': 'object', 'title': 'Icms90', 'required': ['orig'], 'properties': {'cst': {'type': 'string', 'const': '90', 'title': 'Cst', 'default': '90'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Dif', 'default': None}, 'p_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp', 'default': None}, 'v_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp', 'default': None}, 'mod_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mod Bc', 'default': None}, 'p_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms', 'default': None}, 'v_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms', 'default': None}, 'v_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc St', 'default': None}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'p_red_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc', 'default': None}, 'v_bc_fcp': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mod Bc St', 'default': None}, 'p_fcp_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp Dif', 'default': None}, 'p_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms St', 'default': None}, 'v_fcp_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp Dif', 'default': None}, 'v_icms_op': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Op', 'default': None}, 'v_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St', 'default': None}, 'v_fcp_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp Efet', 'default': None}, 'v_icms_dif': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Dif', 'default': None}, 'c_benef_rbc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'C Benef Rbc', 'default': None}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}, 'mot_des_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms St', 'default': None}, 'v_icms_st_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St Deson', 'default': None}}, 'description': 'ICMS, other cases.'}, 'IcmsSt': {'type': 'object', 'title': 'IcmsSt', 'required': ['orig', 'cst', 'v_bc_st_ret', 'v_icms_st_ret', 'v_bc_st_dest', 'v_icms_st_dest'], 'properties': {'cst': {'enum': ['41', '60'], 'type': 'string', 'title': 'Cst'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'p_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P St', 'default': None}, 'v_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Efet', 'default': None}, 'p_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms Efet', 'default': None}, 'v_bc_st_ret': {'type': 'string', 'title': 'V Bc St Ret'}, 'v_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Efet', 'default': None}, 'p_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St Ret', 'default': None}, 'v_bc_st_dest': {'type': 'string', 'title': 'V Bc St Dest'}, 'v_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St Ret', 'default': None}, 'p_red_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc Efet', 'default': None}, 'v_icms_st_ret': {'type': 'string', 'title': 'V Icms St Ret'}, 'v_icms_st_dest': {'type': 'string', 'title': 'V Icms St Dest'}, 'v_bc_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St Ret', 'default': None}, 'v_icms_substituto': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Substituto', 'default': None}}, 'description': 'ICMS charged earlier, for the substituted taxpayer.'}, 'Address': {'type': 'object', 'title': 'Address', 'properties': {'city': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'City', 'default': None}, 'state': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'State', 'default': None}, 'number': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Number', 'default': None}, 'street': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Street', 'default': None}, 'zip_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Zip Code', 'default': None}, 'city_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'City Code', 'default': None}, 'neighborhood': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Neighborhood', 'default': None}}, 'description': 'A plain postal address.'}, 'IpiTrib': {'type': 'object', 'title': 'IpiTrib', 'required': ['cst', 'v_ipi'], 'properties': {'cst': {'enum': ['00', '49', '50', '99'], 'type': 'string', 'title': 'Cst'}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_ipi': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Ipi', 'default': None}, 'v_ipi': {'type': 'string', 'title': 'V Ipi'}, 'q_unid': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Unid', 'default': None}, 'v_unid': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Unid', 'default': None}}, 'description': 'IPI taxed by rate or by quantity.'}, 'PisAliq': {'type': 'object', 'title': 'PisAliq', 'required': ['cst', 'v_bc', 'p_pis', 'v_pis'], 'properties': {'cst': {'enum': ['01', '02'], 'type': 'string', 'title': 'Cst'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_pis': {'type': 'string', 'title': 'P Pis'}, 'v_pis': {'type': 'string', 'title': 'V Pis'}}, 'description': 'PIS taxed by rate.'}, 'PisOutr': {'type': 'object', 'title': 'PisOutr', 'required': ['cst', 'v_pis'], 'properties': {'cst': {'enum': ['49', '50', '51', '52', '53', '54', '55', '56', '60', '61', '62', '63', '64', '65', '66', '67', '70', '71', '72', '73', '74', '75', '98', '99'], 'type': 'string', 'title': 'Cst'}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_pis': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Pis', 'default': None}, 'v_pis': {'type': 'string', 'title': 'V Pis'}, 'q_bc_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Prod', 'default': None}, 'v_aliq_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Aliq Prod', 'default': None}}, 'description': 'PIS taxed some other way.'}, 'PisQtde': {'type': 'object', 'title': 'PisQtde', 'required': ['q_bc_prod', 'v_aliq_prod', 'v_pis'], 'properties': {'cst': {'type': 'string', 'const': '03', 'title': 'Cst', 'default': '03'}, 'v_pis': {'type': 'string', 'title': 'V Pis'}, 'q_bc_prod': {'type': 'string', 'title': 'Q Bc Prod'}, 'v_aliq_prod': {'type': 'string', 'title': 'V Aliq Prod'}}, 'description': 'PIS taxed by quantity.'}, 'Product': {'type': 'object', 'title': 'Product', 'required': ['description'], 'properties': {'ncm': {'anyOf': [{'type': 'string', 'pattern': '^\\d{2}$|^\\d{8}$'}, {'type': 'null'}], 'title': 'Ncm', 'default': None}, 'tax': {'anyOf': [{'$ref': '#/$defs/Tax'}, {'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Tax', 'default': None}, 'cest': {'anyOf': [{'type': 'string', 'pattern': '^\\d{7}$'}, {'type': 'null'}], 'title': 'Cest', 'default': None}, 'cfop': {'anyOf': [{'type': 'string', 'pattern': '^[123567]\\d{3}$'}, {'type': 'null'}], 'title': 'Cfop', 'default': None}, 'unit': {'type': 'string', 'title': 'Unit', 'default': 'UN'}, 'amount': {'anyOf': [{'type': 'number', 'exclusiveMinimum': 0.0}, {'type': 'string', 'pattern': '^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$'}, {'type': 'null'}], 'title': 'Amount', 'default': None}, 'barcode': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Barcode', 'default': None}, 'ex_tipi': {'anyOf': [{'type': 'string', 'pattern': '^\\d{2,3}$'}, {'type': 'null'}], 'title': 'Ex Tipi', 'default': None}, 'freight': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Freight', 'default': None}, 'ibs_cbs': {'anyOf': [{'$ref': '#/$defs/IbsCbs'}, {'type': 'null'}], 'default': None}, 'discount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Discount', 'default': None}, 'quantity': {'type': 'number', 'title': 'Quantity', 'default': 1.0, 'exclusiveMinimum': 0}, 'insurance': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Insurance', 'default': None}, 'nve_codes': {'anyOf': [{'type': 'array', 'items': {'type': 'string', 'pattern': '^[A-Z]{2}\\d{4}$'}}, {'type': 'null'}], 'title': 'Nve Codes', 'default': None}, 'ind_escala': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Escala', 'default': None}, 'unit_price': {'anyOf': [{'type': 'number', 'exclusiveMinimum': 0.0}, {'type': 'string', 'pattern': '^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$'}, {'type': 'null'}], 'title': 'Unit Price', 'default': None}, 'description': {'type': 'string', 'title': 'Description', 'minLength': 1}, 'extra_groups': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Extra Groups', 'default': None}, 'observations': {'anyOf': [{'type': 'string', 'maxLength': 2000}, {'type': 'null'}], 'title': 'Observations', 'default': None, 'description': 'nfse only.'}, 'service_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Service Code', 'default': None, 'description': 'LC 116/2003 item.subitem, nfse only.'}, 'tax_retained': {'type': 'boolean', 'title': 'Tax Retained', 'default': False, 'description': 'ISSQN retained by the tomador, nfse only.'}, 'recopi_number': {'anyOf': [{'type': 'string', 'pattern': '^\\d{20}$'}, {'type': 'null'}], 'title': 'Recopi Number', 'default': None}, 'other_expenses': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Other Expenses', 'default': None}, 'purchase_order': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Purchase Order', 'default': None}, 'presumed_credits': {'anyOf': [{'type': 'array', 'items': {'$ref': '#/$defs/PresumedCredit'}}, {'type': 'null'}], 'title': 'Presumed Credits', 'default': None}, 'service_discount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Service Discount', 'default': None, 'description': 'Unconditional discount, nfse only.'}, 'tax_benefit_code': {'anyOf': [{'type': 'string', 'pattern': '^(SEM CBENEF|[\\x21-\\xff]{8}|[\\x21-\\xff]{10})$'}, {'type': 'null'}], 'title': 'Tax Benefit Code', 'default': None}, 'manufacturer_cnpj': {'anyOf': [{'type': 'string', 'pattern': '^[0-9A-Z]{12}\\d{2}$'}, {'type': 'null'}], 'title': 'Manufacturer Cnpj', 'default': None}, 'used_movable_asset': {'type': 'boolean', 'title': 'Used Movable Asset', 'default': False}, 'purchase_order_item': {'anyOf': [{'type': 'string', 'pattern': '^\\d{1,6}$'}, {'type': 'null'}], 'title': 'Purchase Order Item', 'default': None}, 'import_content_control_number': {'anyOf': [{'type': 'string', 'pattern': '^[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}$'}, {'type': 'null'}], 'title': 'Import Content Control Number', 'default': None}}, 'description': 'One product or service line item on an invoice.'}, 'CofinsNt': {'type': 'object', 'title': 'CofinsNt', 'required': ['cst'], 'properties': {'cst': {'enum': ['04', '05', '06', '07', '08', '09'], 'type': 'string', 'title': 'Cst'}}, 'description': 'COFINS not taxed.'}, 'CofinsSt': {'type': 'object', 'title': 'CofinsSt', 'required': ['v_cofins'], 'properties': {'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_cofins': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Cofins', 'default': None}, 'v_cofins': {'type': 'string', 'title': 'V Cofins'}, 'q_bc_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Prod', 'default': None}, 'v_aliq_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Aliq Prod', 'default': None}, 'ind_soma_cofins_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Soma Cofins St', 'default': None}}, 'description': 'COFINS withheld by substitution.'}, 'IcmsPart': {'type': 'object', 'title': 'IcmsPart', 'required': ['orig', 'cst', 'mod_bc', 'v_bc', 'p_icms', 'v_icms', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st', 'p_bc_op', 'uf_st'], 'properties': {'cst': {'enum': ['10', '20', '90'], 'type': 'string', 'title': 'Cst'}, 'orig': {'type': 'string', 'title': 'Orig'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'uf_st': {'type': 'string', 'title': 'Uf St'}, 'mod_bc': {'type': 'string', 'title': 'Mod Bc'}, 'p_icms': {'type': 'string', 'title': 'P Icms'}, 'v_icms': {'type': 'string', 'title': 'V Icms'}, 'p_bc_op': {'type': 'string', 'title': 'P Bc Op'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'p_red_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'mot_des_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mot Des Icms', 'default': None}, 'v_icms_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Deson', 'default': None}, 'ind_deduz_deson': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Ind Deduz Deson', 'default': None}}, 'description': 'ICMS split between the origin and destination states.'}, 'IcmsSn101': {'type': 'object', 'title': 'IcmsSn101', 'required': ['orig', 'p_cred_sn', 'v_cred_icms_sn'], 'properties': {'orig': {'type': 'string', 'title': 'Orig'}, 'csosn': {'type': 'string', 'const': '101', 'title': 'Csosn', 'default': '101'}, 'p_cred_sn': {'type': 'string', 'title': 'P Cred Sn'}, 'v_cred_icms_sn': {'type': 'string', 'title': 'V Cred Icms Sn'}}, 'description': 'Simples Nacional ICMS with a credit.'}, 'IcmsSn102': {'type': 'object', 'title': 'IcmsSn102', 'required': ['csosn'], 'properties': {'orig': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Orig', 'default': None}, 'csosn': {'enum': ['102', '103', '300', '400'], 'type': 'string', 'title': 'Csosn'}}, 'description': 'Simples Nacional ICMS without a credit.'}, 'IcmsSn201': {'type': 'object', 'title': 'IcmsSn201', 'required': ['orig', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st', 'p_cred_sn', 'v_cred_icms_sn'], 'properties': {'orig': {'type': 'string', 'title': 'Orig'}, 'csosn': {'type': 'string', 'const': '201', 'title': 'Csosn', 'default': '201'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_cred_sn': {'type': 'string', 'title': 'P Cred Sn'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'v_cred_icms_sn': {'type': 'string', 'title': 'V Cred Icms Sn'}}, 'description': 'Simples Nacional ICMS with a credit and substitution.'}, 'IcmsSn202': {'type': 'object', 'title': 'IcmsSn202', 'required': ['orig', 'csosn', 'mod_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st'], 'properties': {'orig': {'type': 'string', 'title': 'Orig'}, 'csosn': {'enum': ['202', '203'], 'type': 'string', 'title': 'Csosn'}, 'v_bc_st': {'type': 'string', 'title': 'V Bc St'}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'type': 'string', 'title': 'Mod Bc St'}, 'p_icms_st': {'type': 'string', 'title': 'P Icms St'}, 'v_icms_st': {'type': 'string', 'title': 'V Icms St'}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}}, 'description': 'Simples Nacional ICMS without a credit, with substitution.'}, 'IcmsSn500': {'type': 'object', 'title': 'IcmsSn500', 'required': ['orig'], 'properties': {'orig': {'type': 'string', 'title': 'Orig'}, 'p_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P St', 'default': None}, 'csosn': {'type': 'string', 'const': '500', 'title': 'Csosn', 'default': '500'}, 'v_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Efet', 'default': None}, 'p_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms Efet', 'default': None}, 'v_bc_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc St Ret', 'default': None}, 'v_icms_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Efet', 'default': None}, 'p_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St Ret', 'default': None}, 'v_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St Ret', 'default': None}, 'p_red_bc_efet': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc Efet', 'default': None}, 'v_icms_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St Ret', 'default': None}, 'v_bc_fcp_st_ret': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St Ret', 'default': None}, 'v_icms_substituto': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms Substituto', 'default': None}}, 'description': 'Simples Nacional ICMS already charged by substitution.'}, 'IcmsSn900': {'type': 'object', 'title': 'IcmsSn900', 'properties': {'orig': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Orig', 'default': None}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'csosn': {'type': 'string', 'const': '900', 'title': 'Csosn', 'default': '900'}, 'mod_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mod Bc', 'default': None}, 'p_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms', 'default': None}, 'v_icms': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms', 'default': None}, 'v_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc St', 'default': None}, 'p_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp St', 'default': None}, 'p_mva_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Mva St', 'default': None}, 'p_red_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc', 'default': None}, 'v_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp St', 'default': None}, 'mod_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Mod Bc St', 'default': None}, 'p_cred_sn': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Cred Sn', 'default': None}, 'p_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Icms St', 'default': None}, 'v_icms_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Icms St', 'default': None}, 'p_red_bc_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Red Bc St', 'default': None}, 'v_bc_fcp_st': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp St', 'default': None}, 'v_cred_icms_sn': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Cred Icms Sn', 'default': None}}, 'description': 'Simples Nacional ICMS, other cases.'}, 'CofinsAliq': {'type': 'object', 'title': 'CofinsAliq', 'required': ['cst', 'v_bc', 'p_cofins', 'v_cofins'], 'properties': {'cst': {'enum': ['01', '02'], 'type': 'string', 'title': 'Cst'}, 'v_bc': {'type': 'string', 'title': 'V Bc'}, 'p_cofins': {'type': 'string', 'title': 'P Cofins'}, 'v_cofins': {'type': 'string', 'title': 'V Cofins'}}, 'description': 'COFINS taxed by rate.'}, 'CofinsOutr': {'type': 'object', 'title': 'CofinsOutr', 'required': ['cst', 'v_cofins'], 'properties': {'cst': {'enum': ['49', '50', '51', '52', '53', '54', '55', '56', '60', '61', '62', '63', '64', '65', '66', '67', '70', '71', '72', '73', '74', '75', '98', '99'], 'type': 'string', 'title': 'Cst'}, 'v_bc': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc', 'default': None}, 'p_cofins': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Cofins', 'default': None}, 'v_cofins': {'type': 'string', 'title': 'V Cofins'}, 'q_bc_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Q Bc Prod', 'default': None}, 'v_aliq_prod': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Aliq Prod', 'default': None}}, 'description': 'COFINS taxed some other way.'}, 'CofinsQtde': {'type': 'object', 'title': 'CofinsQtde', 'required': ['q_bc_prod', 'v_aliq_prod', 'v_cofins'], 'properties': {'cst': {'type': 'string', 'const': '03', 'title': 'Cst', 'default': '03'}, 'v_cofins': {'type': 'string', 'title': 'V Cofins'}, 'q_bc_prod': {'type': 'string', 'title': 'Q Bc Prod'}, 'v_aliq_prod': {'type': 'string', 'title': 'V Aliq Prod'}}, 'description': 'COFINS taxed by quantity.'}, 'IcmsUfDest': {'type': 'object', 'title': 'IcmsUfDest', 'required': ['v_bc_uf_dest', 'p_icms_uf_dest', 'p_icms_inter', 'p_icms_inter_part', 'v_icms_uf_dest', 'v_icms_uf_remet'], 'properties': {'p_icms_inter': {'type': 'string', 'title': 'P Icms Inter'}, 'v_bc_uf_dest': {'type': 'string', 'title': 'V Bc Uf Dest'}, 'p_fcp_uf_dest': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'P Fcp Uf Dest', 'default': None}, 'v_fcp_uf_dest': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Fcp Uf Dest', 'default': None}, 'p_icms_uf_dest': {'type': 'string', 'title': 'P Icms Uf Dest'}, 'v_icms_uf_dest': {'type': 'string', 'title': 'V Icms Uf Dest'}, 'v_icms_uf_remet': {'type': 'string', 'title': 'V Icms Uf Remet'}, 'v_bc_fcp_uf_dest': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'V Bc Fcp Uf Dest', 'default': None}, 'p_icms_inter_part': {'type': 'string', 'title': 'P Icms Inter Part'}}, 'description': 'Interstate ICMS share owed to the destination state.'}, 'PresumedCredit': {'type': 'object', 'title': 'PresumedCredit', 'required': ['code', 'percentage', 'amount'], 'properties': {'code': {'type': 'string', 'title': 'Code', 'pattern': '^[\\x21-\\xff]{8}$|^[\\x21-\\xff]{10}$'}, 'amount': {'type': 'number', 'title': 'Amount'}, 'percentage': {'type': 'number', 'title': 'Percentage'}}, 'description': 'A presumed tax credit applied to this item.'}}, 'title': 'issue_invoiceArguments', 'required': ['document_type', 'client_name', 'tax_id', 'items'], 'properties': {'items': {'type': 'array', 'items': {'$ref': '#/$defs/Product'}, 'title': 'Items'}, 'number': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Number', 'default': None}, 'series': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Series', 'default': None}, 'tax_id': {'type': 'string', 'title': 'Tax Id', 'maxLength': 18, 'minLength': 11}, 'client_name': {'type': 'string', 'title': 'Client Name', 'maxLength': 120, 'minLength': 1}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type'}, 'idempotency_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Idempotency Key', 'default': None}, 'recipient_address': {'anyOf': [{'$ref': '#/$defs/Address'}, {'type': 'null'}], 'default': None}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
list_fiscal_kinds
Which classifications this country has data for, right now. Ask this before assuming a classification exists. The answer grows as the source data does, so a name absent here is absent today rather than absent forever.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'list_fiscal_kindsArguments', 'properties': {'country': {'type': 'string', 'title': 'Country', 'default': 'BR', 'maxLength': 2, 'minLength': 2, 'description': 'ISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess.'}}}
Ausgabeschema
{'type': 'object', 'title': 'FiscalReferenceKinds', 'properties': {'kinds': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Kinds'}}, 'description': 'Which classifications this country has data for, right now.', 'additionalProperties': True}
list_invoices
List the invoices this company issued, newest first. One document type at a time: pass nfse for services or nfe for goods. A company that issues both has to be asked twice. Use it for "my last invoices", "what was rejected today", and to find a document whose access key the user does not have at hand. Read-only. An authorized document is stored as issued, which is the value the rows carry; authorized is accepted as a synonym and asks for the same thing. Every row carries both identifiers the other tools need: id, which reissue_invoice takes, and access_key, which consult_invoice, cancel_invoice and get_invoice_pdf take. A rejected row has an id and no access key — the authorizer never assigned one.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'list_invoicesArguments', 'properties': {'limit': {'type': 'integer', 'title': 'Limit', 'default': 20, 'maximum': 100, 'minimum': 1}, 'offset': {'type': 'integer', 'title': 'Offset', 'default': 0, 'minimum': 0}, 'status': {'anyOf': [{'enum': ['pending', 'issued', 'authorized', 'rejected', 'cancelled'], 'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type', 'default': 'nfse'}}}
Ausgabeschema
{'type': 'object', '$defs': {'InvoiceListItem': {'type': 'object', 'title': 'InvoiceListItem', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None}, 'amount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Amount', 'default': None}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None}, 'created_at': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Created At', 'default': None}, 'client_name': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Client Name', 'default': None}, 'document_type': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Document Type', 'default': None}}, 'description': 'One row of the issuance history.', 'additionalProperties': True}}, 'title': 'InvoiceList', 'properties': {'data': {'type': 'array', 'items': {'$ref': '#/$defs/InvoiceListItem'}, 'title': 'Data', 'description': 'The rows on this page.'}, 'page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Page', 'default': None}, 'total': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Total', 'default': None, 'description': 'How many exist, not how many are here.'}, 'per_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Per Page', 'default': None}, 'next_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Next Page', 'default': None}, 'prev_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Prev Page', 'default': None}, 'total_pages': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Total Pages', 'default': None}}, 'description': 'A page of documents this company issued, newest first.', 'additionalProperties': True}
list_received_invoices
List NF-e documents other companies issued against this one. The mirror of list_invoices: that one shows what this company issued, this one what it received. Read-only. It reads what the API already collected and never calls the tax authority, which caps how often a company may ask per day. Each row carries the issuer, the amount and, once one was filed, the manifestation. Before a manifestation the authority sends a summary only; the full document arrives after one.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'list_received_invoicesArguments', 'properties': {'limit': {'type': 'integer', 'title': 'Limit', 'default': 20, 'maximum': 100, 'minimum': 1}, 'offset': {'type': 'integer', 'title': 'Offset', 'default': 0, 'minimum': 0}}}
Ausgabeschema
{'type': 'object', '$defs': {'ReceivedItem': {'type': 'object', 'title': 'ReceivedItem', 'properties': {'amount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'title': 'Amount', 'default': None}, 'issued_at': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Issued At', 'default': None}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None}, 'issuer_name': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Issuer Name', 'default': None, 'description': 'Who issued it against this company.'}, 'issuer_tax_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Issuer Tax Id', 'default': None}, 'manifestation': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Manifestation', 'default': None, 'description': 'The position already filed, when there is one. Before a manifestation the authority sends a summary only.'}}, 'description': 'One document another company issued against this one.', 'additionalProperties': True}}, 'title': 'ReceivedList', 'properties': {'data': {'type': 'array', 'items': {'$ref': '#/$defs/ReceivedItem'}, 'title': 'Data'}, 'page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Page', 'default': None}, 'total': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Total', 'default': None}, 'per_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Per Page', 'default': None}, 'next_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Next Page', 'default': None}, 'prev_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Prev Page', 'default': None}}, 'description': 'A page of documents issued against this company, newest first.', 'additionalProperties': True}
lookup_fiscal_code
Resolve one code of one classification, when you know both. Use this to confirm a code before putting it on a document — an NCM that does not exist is rejected by the tax authority after issuing, which costs a cancellation. A code that is not there answers 404. That means the code is wrong, not that the lookup failed; do not retry it. `metadata` differs per kind and is passed through as published: utrib on an NCM, ncm_code on a CEST, tax_type on a CST, and nothing at all on an ISS service.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'lookup_fiscal_codeArguments', 'required': ['kind', 'code'], 'properties': {'code': {'type': 'string', 'title': 'Code', 'description': 'The code itself, as published: 84716052 for an NCM, 5102 for a CFOP. Digits only, no dots.'}, 'kind': {'type': 'string', 'title': 'Kind', 'description': 'cfop, ncm, cest, cst, csosn, ...'}, 'country': {'type': 'string', 'title': 'Country', 'default': 'BR', 'maxLength': 2, 'minLength': 2, 'description': 'ISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess.'}}}
Ausgabeschema
{'type': 'object', 'title': 'FiscalReferenceItem', 'properties': {'code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Code', 'default': None}, 'kind': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Kind', 'default': None, 'description': 'cfop, ncm, cest, cst, csosn, ...'}, 'country': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Country', 'default': None}, 'metadata': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Metadata', 'default': None, 'description': 'Whatever the classification carries beyond a code and a description, and it differs per kind: utrib on an NCM, ncm_code on a CEST, tax_type on a CST, null on an ISS service.'}, 'description': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Description', 'default': None}}, 'description': 'One code of one classification.', 'additionalProperties': True}
lookup_taxpayer
Look up one taxpayer by exact tax id, to confirm who it is. Use it to check a recipient's name before issuing against them. It takes the id exactly — punctuation is fine, but there is no search by name, by prefix or by state, and there will not be: the registry holds the names and addresses of real people. A 404 does not mean the company does not exist. The registry reloads monthly from the RFB's dump, so a recently registered CNPJ is simply not in it yet. Say that to the user rather than reporting the tax id as invalid, and never turn a 404 here into a validation rule.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'lookup_taxpayerArguments', 'required': ['tax_id'], 'properties': {'tax_id': {'type': 'string', 'title': 'Tax Id', 'description': 'The exact tax id. A CNPJ is 14 digits.'}, 'country': {'type': 'string', 'title': 'Country', 'default': 'BR', 'maxLength': 2, 'minLength': 2, 'description': 'ISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess.'}}}
Ausgabeschema
{'type': 'object', 'title': 'TaxpayerResult', 'properties': {'kind': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Kind', 'default': None, 'description': 'Whether it is a company or a person.'}, 'name': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Name', 'default': None}, 'state': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'State', 'default': None}, 'status': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Status', 'default': None}, 'tax_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Tax Id', 'default': None}, 'country': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Country', 'default': None}, 'metadata': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Metadata', 'default': None, 'description': 'Whatever the registry holds beyond these.'}, 'city_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'City Code', 'default': None}, 'started_at': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Started At', 'default': None}, 'trade_name': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Trade Name', 'default': None}, 'postal_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Postal Code', 'default': None}, 'activity_code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Activity Code', 'default': None}}, 'description': 'One registered taxpayer, as the registry describes it.\n\nEverything but country, tax_id, kind and name can be absent: the\nregistry publishes what it has.', 'additionalProperties': True}
manifest_received_invoice
Declare this company's position on a document issued against it. Legally binding and irreversible once the tax authority accepts it — ask the human to confirm before calling, and read back which document and which of the four positions is being filed. Denying a document (210220) or declaring the operation did not happen (210240) is an accusation against whoever issued it. Never pick either because the user sounds unsure — ask. 210200 confirms the operation happened, 210210 acknowledges the document exists, 210220 denies knowing it, and 210240 states the operation was not carried out. Only 210240 takes a reason, and it requires one; the others are refused if a reason is sent.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', 'title': 'manifest_received_invoiceArguments', 'required': ['access_key', 'manifestation'], 'properties': {'reason': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Reason', 'default': None}, 'access_key': {'type': 'string', 'title': 'Access Key'}, 'manifestation': {'enum': ['210200', '210210', '210220', '210240'], 'type': 'string', 'title': 'Manifestation'}}}
Ausgabeschema
{'type': 'object', 'title': 'ManifestationResult', 'properties': {'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The receipt, when the authority gave one.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None}, 'manifestation': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Manifestation', 'default': None, 'description': 'The code that was filed.'}}, 'description': 'What the tax authority answered to a filed manifestation.', 'additionalProperties': True}
reissue_invoice
Retry a rejected invoice after the data that caused the rejection was fixed. Takes the local invoice_id, not the access key: a rejected document never got one. Consumes a credit like a new issuance, so it takes an idempotency_key for the same reason issue_invoice does. An authorized invoice is corrected or cancelled, never reissued.
Destruktiv Externer Zugriff
Eingabeschema
{'type': 'object', 'title': 'reissue_invoiceArguments', 'required': ['invoice_id'], 'properties': {'invoice_id': {'type': 'string', 'title': 'Invoice Id'}, 'idempotency_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Idempotency Key', 'default': None}}}
Ausgabeschema
{'type': 'object', 'title': 'InvoiceResult', 'properties': {'id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Id', 'default': None, 'description': 'Local id. Use it for reissue and for submissions, and when a document was rejected and has no key.'}, 'status': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Status', 'default': None, 'description': 'issued, rejected or cancelled.'}, 'protocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Protocol', 'default': None, 'description': 'The authorization protocol, when granted.'}, 'access_key': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Access Key', 'default': None, 'description': "The authorizer's key. Absent while the document is not authorized."}}, 'description': 'One document, as the fiscal API describes it.', 'additionalProperties': True}
search_fiscal_codes
Find a code from a description, or page through a table. This is the tool for "what NCM is a keyboard" — the one the user actually asks. Prefer it over guessing a code from memory: the tables change, and a plausible wrong code is worse than a lookup. Leaving `kind` unset searches every classification of that country at once, which is the most expensive call here. Set it whenever the question already names one. Rows come back ordered by kind then code; there is no sort argument, and asking for one changes nothing.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'search_fiscal_codesArguments', 'properties': {'kind': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Kind', 'default': None, 'description': 'Narrows to one classification. All if unset.'}, 'term': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Term', 'default': None, 'description': 'Matches the code or the description.'}, 'limit': {'type': 'integer', 'title': 'Limit', 'default': 20, 'maximum': 100, 'minimum': 1, 'description': 'Rows per page. 20 by default.'}, 'offset': {'type': 'integer', 'title': 'Offset', 'default': 0, 'minimum': 0, 'description': 'Rows to skip. Use it to page, not to narrow — a term is cheaper than paging to find one row.'}, 'country': {'type': 'string', 'title': 'Country', 'default': 'BR', 'maxLength': 2, 'minLength': 2, 'description': 'ISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess.'}}}
Ausgabeschema
{'type': 'object', '$defs': {'FiscalReferenceItem': {'type': 'object', 'title': 'FiscalReferenceItem', 'properties': {'code': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Code', 'default': None}, 'kind': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Kind', 'default': None, 'description': 'cfop, ncm, cest, cst, csosn, ...'}, 'country': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Country', 'default': None}, 'metadata': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Metadata', 'default': None, 'description': 'Whatever the classification carries beyond a code and a description, and it differs per kind: utrib on an NCM, ncm_code on a CEST, tax_type on a CST, null on an ISS service.'}, 'description': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Description', 'default': None}}, 'description': 'One code of one classification.', 'additionalProperties': True}}, 'title': 'FiscalReferenceList', 'properties': {'data': {'type': 'array', 'items': {'$ref': '#/$defs/FiscalReferenceItem'}, 'title': 'Data'}, 'page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Page', 'default': None}, 'total': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Total', 'default': None}, 'per_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Per Page', 'default': None}, 'next_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Next Page', 'default': None}, 'prev_page': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'title': 'Prev Page', 'default': None}}, 'description': 'A page of one classification, ordered by kind then code.', 'additionalProperties': True}
validate_invoice_payload
Check invoice data against the field rules without issuing anything. Nothing is sent to the tax authority and no document is created. The SDK models check field formats, and for nfe the rules the SEFAZ refuses a document over: ncm and cfop on every item, and a complete recipient address. Worth calling before issue_invoice whenever a field was inferred rather than given. This does not replace issuing: the authorizer's cross-field and fiscal rules are only checked when the document is transmitted.
Nur Lesen Idempotent
Eingabeschema
{'type': 'object', 'title': 'validate_invoice_payloadArguments', 'required': ['document_type', 'items'], 'properties': {'items': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': True}, 'title': 'Items'}, 'document_type': {'enum': ['nfse', 'nfe'], 'type': 'string', 'title': 'Document Type'}, 'recipient_address': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'title': 'Recipient Address', 'default': None}}}
Ausgabeschema
{'type': 'object', '$defs': {'ValidationProblem': {'type': 'object', 'title': 'ValidationProblem', 'required': ['field', 'problem'], 'properties': {'field': {'type': 'string', 'title': 'Field'}, 'problem': {'type': 'string', 'title': 'Problem'}}, 'description': 'One field the SDK models refused.'}}, 'title': 'ValidationReport', 'required': ['document_type', 'valid', 'checked'], 'properties': {'valid': {'type': 'boolean', 'title': 'Valid', 'description': 'True when no field rule was broken. It does not promise the authorizer will accept the document.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/ValidationProblem'}, 'title': 'Errors'}, 'checked': {'type': 'string', 'title': 'Checked', 'description': 'What was checked, so the answer is not read as more than it is.'}, 'document_type': {'type': 'string', 'title': 'Document Type'}}, 'description': 'The result of checking a payload without issuing anything.'}
Hinzugefügt
lookup_taxpayer
17. September 2026 12:52
Hinzugefügt
list_fiscal_kinds
17. September 2026 12:52
Hinzugefügt
search_fiscal_codes
17. September 2026 12:52
Hinzugefügt
lookup_fiscal_code
17. September 2026 12:52
Hinzugefügt
manifest_received_invoice
17. September 2026 12:52
Hinzugefügt
list_received_invoices
17. September 2026 12:52
Hinzugefügt
validate_invoice_payload
17. September 2026 12:52
Hinzugefügt
get_invoice_submissions
17. September 2026 12:52
Hinzugefügt
list_invoices
17. September 2026 12:52
Hinzugefügt
invalidate_numbering
17. September 2026 12:52
Hinzugefügt
correct_invoice
17. September 2026 12:52
Hinzugefügt
reissue_invoice
17. September 2026 12:52
Hinzugefügt
get_invoice_pdf
17. September 2026 12:52
Hinzugefügt
cancel_invoice
17. September 2026 12:52
Hinzugefügt
consult_invoice
17. September 2026 12:52
Hinzugefügt
issue_invoice
17. September 2026 12:52