Skip to main content
POST
Issue tax documents in batch
Send a multipart/form-data request whose file part is a CSV file: comma-separated, with a header row and one row per tax document to issue. The header names are case-sensitive and the column order does not matter. The column names are exactly as listed, including the spelling of customerstateDocument, customerphoneNumber and addressNeighborhood. Any other column is rejected, and so is a row that misses a required column. Every tax document is issued with fixed values. The customer is registered as a company, the service is provided in Uberlândia (MG), and its description is “LICENCIAMENTO DE SOFTWARE - SAAS”. The document records an ISS rate of 2% (the NFSe itself is issued with the ISS rate registered for your tax issuer), not withheld at source. The municipal service description is “Licenciamento ou cessão de direito de uso de programas de computação.”, the operation nature is “Prestação de Serviços”, and there are no deductions, no discounts and no observation. The municipal service code, the service list item, the CNAE and the tax configuration come from your tax issuer’s configuration for the row’s environment. The whole upload is validated first: if any row is invalid nothing is issued, and fields points at the row by its position, where invoices[0] is the first row after the header. When the upload is valid, the response only means the rows were accepted. Each row is then issued in the background, so a row can still fail later; a row whose statement already has an active tax document is skipped, which makes it safe to upload the same file again. A row the tax provider rejects for invalid data is skipped as well: fix its data and upload it again.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of the organization.

Format: UUID

Body

multipart/form-data
file
file
required

The CSV file, with a header row and one row per tax document to issue. The columns are listed in the operation description. Required, not empty, at most 4 MB; its file name must end in .csv, or its content type be text/csv, application/vnd.ms-excel or text/plain.

Response

Successful response

Acknowledgement that a CSV batch was accepted. Each row is processed in the background.

message
string
required

Confirms what was requested. It only means the rows were accepted, not that every document was already issued or cancelled.

Example:

"Batch issuance requested."

count
number
required

Number of CSV rows accepted for processing.

Example:

25