Skip to main content
POST
Issue a tax document
Issuance is asynchronous. The request answers 204 as soon as the tax provider has accepted the document, which is created with the status WAITINGFORAUTHORIZATION and later moves to AUTHORIZED or DENIED. Find it in List tax documents: each item carries the externalId you sent, and you can download its PDF and XML with Download a tax document once it is AUTHORIZED. Send externalId together with externalParentId (both or neither) to make the request safe to retry: while a document with that externalId exists and is not DENIED or CANCELED, issuing another one answers 409 TAX_DOCUMENT_ALREADY_ISSUED. Treat that answer as “already issued”, not as a failure. After a DENIED or CANCELED document you can issue again with the same externalId. The service code, CNAE and LC 116 item you omit are taken from the configuration of your tax issuer for the environment you choose. The NFSe is issued for totalValue with the ISS rate registered for your tax issuer; issRate, deductions, discounts, the place of service and the tax amounts you send are recorded with the document. Use TEST to issue homologation documents, which have no fiscal value. Every amount is in reais. If the tax provider rejects the request, the error is returned with the provider’s error code and a status of 400, 409, 422 or 502.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of the organization that issues the tax document.

Format: UUID

Body

application/json
environment
enum<string>
required

LIVE issues a real document. TEST issues a homologation document, which has no fiscal value. It also selects which configuration of your tax issuer fills in what you omit.

Available options:
LIVE,
TEST
Example:

"TEST"

competenceDate
string<date-time>
required

Competence date of the document: the date the service refers to. An ISO 8601 date or date-time.

Example:

"2026-10-01T00:00:00.000Z"

taxDocumentCustomer
object
required

The customer (service taker) of the document.

type
enum<string>

Type of the document. NFSE is the only type, and the default.

Available options:
NFSE
Example:

"NFSE"

operationNature
string

Nature of the operation. It is stored with the document, but it is not printed on it.

Example:

"Prestação de Serviços"

deductions
number

Deductions, in reais (150.5 is R$ 150.50). Recorded with the document; the NFSe is issued for totalValue.

Example:

0

discounts
number

Discounts, in reais (150.5 is R$ 150.50). Recorded with the document; the NFSe is issued for totalValue.

Example:

0

totalValue
number

Total value of the document, in reais (1500.5 is R$ 1,500.50).

Example:

1500.5

observation
string

Free text printed on the document.

Example:

"Referente ao contrato 1234"

externalId
string<uuid>

Your own ID for what this document bills (an invoice, for example), a UUID v4. Send it together with externalParentId. While a document with this externalId exists and is not DENIED or CANCELED, issuing another one answers 409 TAX_DOCUMENT_ALREADY_ISSUED, so you can safely retry a request whose answer you lost. Each tax document you list carries it back as externalId.

Format: UUID (version 4)

Example:

"6f1b7c52-8a4e-4d3f-9c21-b0e5a7d84c19"

externalParentId
enum<string>

What externalId refers to: INVOICE or INVOICE_STATEMENT. Required when you send externalId, and not accepted without it.

Available options:
INVOICE,
INVOICE_STATEMENT
Example:

"INVOICE"

taxDocumentServiceProperty
object

The service the document bills. Send it: the state, the city, the description and the municipal description of the service have no default. The optional fields below fall back to your tax issuer's configuration for the environment.

Response

No Content. The operation succeeded and the response has no body.