The Webmania® REST API issues the service invoice (NFS-e) with the city hall (prefeitura), through the system each city uses (its provider). It sends the result by notification, and it lets you look up, cancel and replace each invoice. Issuing is available for every city (list of cities in Portuguese). To start, read the Quick guide. To issue other document types, see all the APIs.
What is the NFS-e? The NFS-e (Nota Fiscal de Serviço eletrônica) is the electronic invoice for a service. Brazil has no single set of issuing rules for it: the rules depend on the provider of each city. A provider is the system a city hall uses to authorize service invoices.
Each city issues the NFS-e through a provider, such as Abrasf (a layout many cities share) or the national standard (Padrão Nacional). The provider sets the fields, the environments and the functions you can use. Check your city in City status.
Each item of rps (Recibo Provisório de Serviço, a provisional service receipt) holds the service and the service buyer (tomador) of one invoice. Depending on the provider, the response is a lote_rps or an nfse; see RPS batch and NFS-e.
Brazilian tax terms you will see. They keep their Brazilian names in the payload and on the NFS-e:
City hall (prefeitura): authorizes the NFS-e, through its own system (the provider) or the Padrão Nacional.
Padrão Nacional: the national NFS-e standard, which is replacing the city systems. Model padrao_nacional.
ISS (ISSQN): the city tax on services; each city sets its rate, between 2% and 5%. Rate in servico.impostos.iss; iss_retido says whether the buyer or an intermediary withholds it.
IBS / CBS: the new value-added taxes of the tax reform, shown separately from the price. Object ibs_cbs in servico.impostos.
CST / cClassTrib: the two codes that say how IBS and CBS apply. Fields situacao_tributaria and classificacao_tributaria of ibs_cbs.
PIS / COFINS: federal contributions on revenue, with their own CST (cst_pis_cofins, national standard only).
CNPJ / CPF: the company ID (14 digits) and the individual taxpayer ID (11 digits) of the provider and of the service buyer (tomador).
Every term in plain English: glossary of Brazilian tax terms.
Send every API request over HTTPS to the base URL https://api.webmania.com.br. The /2/ prefix means you are using version 2.0 of the API.
| URL | HTTP Verb | Function |
|---|---|---|
/2/nfse/emissao | POST | Issue an invoice |
/2/nfse/substituir | POST | Replace an invoice |
/2/nfse/manifestar | PUT | Acknowledge participation (national standard) |
/2/nfse/consulta/{identifier} | GET | Look up an invoice |
/2/nfse/status | GET | Get the status and features of the city provider |
/2/nfse/cancelar | PUT | Cancel an invoice or a scheduled issue |
Responses are JSON objects. Send Authorization: Bearer YOUR_ACCESS_TOKEN in every call, and Content-Type: application/json in calls with a body; see Authentication.
Check the HTTP status and the JSON body of every response:
200 with the error field.error, msg or message, depending on the step that refused the request.status field and the notifications.Example of an HTTP 401 response for a missing or invalid token (the message means “Restricted access. Token missing or invalid.”):
{
"error": "Acesso restrito. Token não informado ou inválido."
} How to integrate the NFS-e:
Authorization header, send GET to /2/nfse/status. The response shows whether Webmania supports the city, and gives the provider, the environments, the authentication and the functions you can use. emissao field of the status lists lote_rps when the city accepts several RPS in one batch. Prepare your integration to receive both response models, lote_rps and nfse. /2/nfse/emissao. In tests, use ambiente = 2 when the provider offers a sandbox (test environment). Store the uuid of each invoice in your system. url_notificacao. Without it, Webmania uses the notification URL set up in the company. aprovado, download the XML and PDF of the NFS-e. uuid or your own ID to check the status at any time. Every invoice gets a uuid as soon as the API accepts the issuing request. After that, it goes through the statuses below. They appear in the response, in the lookup and in the notifications:
aprovado or reprovado. While the status is processando, contingencia or agendado, follow the invoice through the notification or the lookup. Do not issue it again.| Status | What it means | What to do |
|---|---|---|
agendado | The issue was scheduled with data_agendamento and was not sent to the provider yet. | On that date, the invoice is issued automatically. To stop it, cancel the scheduled issue. |
processando | The provider has not returned the result yet: processing is asynchronous, or communication failed. Webmania checks with the provider or tries again automatically. | Wait for the result notification or look up the invoice. Do not issue it again. |
contingencia | The provider is still offline. Webmania tries again automatically until it responds. | Follow the same uuid and do not issue the invoice again. See Contingency mode. |
aprovado | The NFS-e was authorized. The xml and the PDFs become available depending on the provider; follow pdf_nfse_status. | Download the XML and PDF. If needed, cancel or replace the invoice. |
reprovado | The provider rejected the invoice; motivo holds its reason. | Fix the data shown in motivo and issue a new invoice. |
cancelado | The approved invoice was canceled or replaced by another one. When you cancel a scheduled issue, the response also returns cancelado. | Do not use this invoice. In a replacement, the new invoice has its own uuid. |
In the RPS batch, the status processado means the batch was processed. The result of each invoice is in info_nfse[].status, and each invoice has its own uuid.
Take this reference to your AI assistant, integrate the API with an official SDK, or start from the ready-made modules and examples.
Send an AI the section index of this reference: it reads the index and fetches only the sections it needs, in Markdown. The Markdown is in Portuguese; the assistant can answer in English.
Official open-source SDKs on GitHub to integrate the Webmania APIs in the language of your project. Each repository includes installation, examples and the operations it covers.
Node.js / TypeScript Available
git clone https://github.com/
Python Available
git clone https://github.com/
PHP Available
git clone https://github.com/
Perl Available
git clone https://github.com/
Go Available
git clone https://github.com/
C Available
git clone https://github.com/
C++ Available
git clone https://github.com/
Lua Available
git clone https://github.com/
Dart Available
git clone https://github.com/
R Available
git clone https://github.com/
Java Available
git clone https://github.com/
Kotlin Available
git clone https://github.com/
Scala Available
git clone https://github.com/
Clojure Available
git clone https://github.com/
Ruby Available
git clone https://github.com/
.NET (C#) Available
git clone https://github.com/
PowerShell Available
git clone https://github.com/
Elixir Available
git clone https://github.com/
Rust Available
git clone https://github.com/
Haskell Available
git clone https://github.com/
Swift Available
git clone https://github.com/
Official modules to issue invoices in one click from your online store, with no coding.
Test the REST API without writing a line of code, and speed up your integration with the official Webmania® tools.
To use the API, authenticate every request with the HTTP Authorization header, in this format:
Authorization: Bearer YOUR_ACCESS_TOKEN You find the API 2.0 Access Token in the Webmania® Panel. Include it in every request. Send the request body in JSON, with the Content-Type and Accept headers set to application/json.
Keep your access credentials safe. Never publish the Access Token in the source code of a website, app or system where others can easily read it.
For mobile apps (iOS and Android), we recommend issuing on your server (back end). The app code should only send the issuing request, and the processing should happen on your server.
The features and functions available to issue an NFS-e depend on the rules of each city's provider. A provider is the system a city hall uses to authorize service invoices. Check the status before you integrate. It tells you whether Webmania® supports (has certified) the city, and gives the provider, the environments, the authentication, the issuing models and the functions you can use.
To check the status of the city in the company address, send a GET request to the URL /2/nfse/status.
curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
https://api.webmania.com.br/2/nfse/status On success, the response returns status, modelo, versao, ambientes, autenticacao, emissao and funcoes. The fields codigo_servico and parametros_disponiveis depend on the available information. A failure can return status: false and error, without the other fields.
| What to check | Field | What it is for |
|---|---|---|
| Webmania supports the city | status | With false, Webmania® does not support the city yet. New environments are certified on request. |
| There is a test environment | ambientes | With 2 in the list, use ambiente = 2 in tests. Some providers have no sandbox (test environment). |
| How the company authenticates with the provider | autenticacao | Set up the method in the company, through the API or the Webmania® Panel. |
| How to issue | emissao | Lists nfse. When the city accepts several RPS in one batch, it also lists lote_rps; see RPS batch and NFS-e. |
| What you can do afterwards | funcoes | Look up, cancel and replace, depending on the provider. |
Response fields:
| Parameter | Type | Description |
|---|---|---|
status | boolean | Shows whether Webmania® supports (has certified) the cityNew environments are certified on request. |
modelo | string | Provider model used by the city |
versao | string | XML version of the providerAPI parameters can change with the XML version. |
ambientes | array | Environments available under the provider rules1 - ProductionNote: Some providers have no sandbox (test environment). |
autenticacao | array | Authentication available under the provider rules certificado_a1 Set up the authentication method in the company, through the API or the Webmania® Panel. Learn more |
emissao | array | Models available under the provider ruleslote_rpsNote: The issuing type and the response change with each model. Learn more |
funcoes | array | Functions available under the provider rulesconsultar |
codigo_servico | array | Service codes available to the company, based on its CNAE (economic activity code), with suggested tax rates. |
parametros_disponiveis | object | Parameters available for the model the city uses, and whether each one is required. obrigatorio - RequiredNote: The field is returned when the provider publishes this list of parameters. Which parameters exist, and which are required, depends on the provider. |
Example of an HTTP 200 response:
{
"status": true, // City supported
"modelo": "abrasf", // City provider
"versao": "2.02", // Certified version
"ambientes": [ 1, 2 ], // Environments available for issuing
"autenticacao": [ "certificado_a1" ], // Authentication method
"emissao": [ "lote_rps", "nfse" ], // Models available for issuing
"funcoes": [ "consultar", "cancelar", "substituir" ], // Available functions
"codigo_servico": [
{
"codigo": "0000", // Service code
"descricao": "Serviço 1", // Service description
"codigo_tributacao": "000000000", // City tax code of the service, when available
"aliquota_sugerida": {
"iss": 5 // Suggested ISS rate
}
},
{
"codigo": "0000", // Service code
"descricao": "Serviço 2", // Service description
"aliquota_sugerida": {
"iss": 2 // Suggested ISS rate
}
},
...
],
"parametros_disponiveis": {
"empresa.cnpj": "obrigatorio_pj", // For a company, the CNPJ is required in the company settings
"servico.valor_servicos": "obrigatorio", // The service amount is required
"tomador.cpf": "obrigatorio_pf", // For an individual, the CPF of the service buyer is required
"tomador.email": "opcional", // The email of the service buyer is optional
...
}
} Issuing returns an RPS batch (a group of provisional service receipts, Lote RPS) or the issued NFS-e. This depends on the number of RPS in the request and on the city provider. Webmania always prefers synchronous issuing, in real time, for a better experience. Prepare your integration to receive both models, lote_rps and nfse:
lote_rps or nfse model does not show, by itself, the authorization result. When the city does not accept batches, the API responds O município não permite o envio de mais de 1 RPS por requisição (the city does not allow more than 1 RPS per request).| Model | Sending | Description |
|---|---|---|
lote_rps | depends on the provider | The RPS batch response can come when you issue invoices in bulk, or when the provider uses batches even for a single invoice. The batch can be processed synchronously or asynchronously, depending on the provider. The lote_rps model does not show, by itself, the authorization result.Bulk sending: limit of 50 invoices (when available) |
nfse | depends on the processing | The response in the NFS-e model identifies a single document. The first response can show that the invoice is still processing. Confirm the authorization by the status field, the lookup and the notifications, not only by the nfse model. |
To keep your platform up to date, Webmania® sends automatic notifications for invoice results and for updates of the DANFS-e (the printed NFS-e summary), all in the same format. With them, you do not need to poll the API for each invoice: wait for the webhook and update the invoice in your system when it arrives.
The notification is a POST request with a JSON body. It goes to the URL you send in url_notificacao when you issue the invoice. Without that parameter, it goes to the notification URL saved in the company settings. The update of the city hall PDF (pdf_nfse_status = processado) is notified only to the url_notificacao sent with the issue request. When present, the atualizado_em field gives the time of the last update in ISO-8601 format. Not every notification flow includes this field.
| Notified status | When it is sent |
|---|---|
processando | May come in the issuing response, when the provider has not given the result yet. It is not the final result: wait for the next notification. |
aprovado | The NFS-e was authorized, in the issuing response or after automatic processing. |
reprovado | The NFS-e was rejected, in the issuing response or after automatic processing. The body includes the motivo (reason). |
processado | The RPS batch was processed. Each invoice comes in info_nfse, with its own status. |
cancelado | The cancellation of an authorized invoice is complete. This also applies when the invoice is replaced by another one. |
agendado), the cancellation of a scheduled issue and the change to contingencia are not notified. Automatic retries notify only the final result. In these cases, do not issue the invoice again: wait for the next notification or check the status with a lookup. If the issue request has no url_notificacao and the company has no saved URL, no notification is sent.atualizado_em (ISO-8601) to compare updates and discard older notifications. Without this field, look up the invoice to confirm its current state. Each invoice has a unique ID called the UUID. Use it to receive and identify the invoice and to update the data in your database.
What is the UUID? The UUID (Universally Unique Identifier) is a unique 36-character ID, in the 8-4-4-4-12 format, that Webmania assigns to each invoice. The RPS batch has its own UUID, and each NFS-e in info_nfse also has its own UUID. Use info_nfse[].uuid to identify an invoice inside the batch.
It is created as soon as our API receives the request successfully, that is, after it passes our validations and before anything is sent to the provider or the authorizing body. So the UUID exists whatever the status of the invoice. This applies to processando, aprovado, agendado, reprovado, cancelado and contingencia.
Once created, the UUID is permanent: it does not change on retries or resends. An NFS-e issued to replace another one is a new document and gets its own UUID, different from the UUID of the replaced invoice.
The access key is a different field from the UUID. Use the UUID in the operations that accept this ID (for example, the lookup by uuid). Use the access key in the fields that the API documents as a key (for example, manifestar and nfses_referenciadas require the access key).
The notification body follows the document model, with the fields of the issuing response (RPS batch response and NFS-e response):
| Model | When it is used | Fields |
|---|---|---|
lote_rps | Bulk issuing, or a provider that uses batches even for a single invoice. Each invoice of the batch comes in info_nfse, with its own uuid. | RPS batch |
nfse | Single document. | NFS-e |
Depending on the status and the data available, some fields may be missing from the body. The full examples are in Notification example.
Notification in the lote_rps model. Depending on the status and the data available, the body may include uuid, modelo, status, motivo, numero_lote, serie_lote, quantidade_rps, protocolo, info_nfse, log and, when available, atualizado_em.
| Parameter | Type | Description |
|---|---|---|
uuid | string | Unique ID of the RPS batchUse the UUID to find the batch the notification is about. |
modelo | string | Response modellote_rps |
status | string | Status of the RPS batchprocessando |
motivo | string | Reason for the status of the RPS batchE.g.: Lote processado com sucesso (batch processed successfully) |
numero_lote | string | RPS batch number |
serie_lote | string | RPS batch series |
quantidade_rps | number | Number of NFS-e in the RPS batch |
protocolo | string | RPS batch protocol |
info_nfse | array | List and result of every invoice in the RPS batchEach item has its own UUID and the available ID, status and file fields of the NFS-e. Not every field of the single-invoice response is included. Learn more |
log | object | Response log from the city hall |
atualizado_em | date and time | Date and time of the last update in ISO-8601 format, when included in the response |
Notification in the nfse model. Depending on the status and the data available, the body may include uuid, modelo, status, motivo, numero, codigo_verificacao, serie_rps, numero_rps, xml, pdf_nfse, pdf_nfse_status, pdf_rps, log and, when available, atualizado_em.
| Parameter | Type | Description |
|---|---|---|
uuid | string | Unique ID of the invoiceUse the UUID to find the invoice the notification is about. |
modelo | string | Response modelnfse |
status | string | Status of the invoiceprocessando |
motivo | string | Reason for the status of the invoiceE.g.: Autorizado o uso da NFS-e (use of the NFS-e authorized) |
numero | string | Invoice numberManaged automatically by the city hall. |
codigo_verificacao | string | Verification code of the invoice |
serie_rps | string | RPS series |
numero_rps | string | RPS number |
xml | string | URL of the invoice XML |
pdf_nfse | string | URL of the invoice PDFwhen the city hall provides it |
pdf_nfse_status | string | Status of the invoice PDFwhen the city hall provides it |
pdf_rps | string | URL of the PDF of the provisional receipt (RPS) of the invoice |
log | object | Response log from the city hall |
atualizado_em | date and time | Date and time of the last update in ISO-8601 format, when included in the response |
The notification is sent with the POST method, in application/json format:
-X POST \
-header "Content-type: application/json" \ Example notification for a processed RPS batch (lote_rps model):
{
"uuid": "00000000-0000-0000-0000-000000000000",
"modelo": "lote_rps",
"status": "processado",
"motivo": "Lote processado com sucesso",
"numero_lote": "0000",
"serie_lote": "A0",
"quantidade_rps": 2,
"protocolo": "000000000000000",
"info_nfse": [
{
"uuid": "00000000-0000-0000-0000-000000000000",
"modelo": "nfse",
"status": "aprovado",
"motivo": "Autorizado o uso da NFS-e",
"numero": "00",
"codigo_verificacao": "000000000",
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
"pdf_nfse_status": "processado",
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]"
},
{
"uuid": "00000000-0000-0000-0000-000000000000",
"modelo": "nfse",
"status": "aprovado",
"motivo": "Autorizado o uso da NFS-e",
"numero": "00",
"codigo_verificacao": "000000000",
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
"pdf_nfse_status": "processando",
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]"
}
],
"log": { ... },
"atualizado_em": "2024-01-01T12:00:00-03:00"
} Example notification for an authorized NFS-e (nfse model):
{
"uuid": "00000000-0000-0000-0000-000000000000",
"modelo": "nfse",
"status": "aprovado",
"motivo": "Autorizado o uso da NFS-e",
"numero": "00",
"codigo_verificacao": "000000000",
"serie_rps": "A0",
"numero_rps": 00,
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]",
"pdf_nfse_status": "indisponivel",
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]",
"log": { ... },
"atualizado_em": "2024-01-01T12:00:00-03:00"
} Issuing sends the RPS of the request to the city provider. An RPS (provisional service receipt) holds the service and the service buyer (tomador) of one invoice. The response comes in the lote_rps or nfse model, depending on the provider; see RPS batch and NFS-e. One request accepts up to 50 RPS. Sending more than one RPS works only in cities that support lote_rps.
To issue a service invoice, send a POST request to the URL /2/nfse/emissao, with a JSON body.
How to build the request:
ambiente (2 for tests, when the provider offers a sandbox), the url_notificacao and, if you want, your own control ID and the data_agendamento. rps, the servico object with discriminacao, valor_servicos and the taxes, or the classe_imposto (Tax Class) set up in the Webmania® Panel. tomador object, the data of the party that pays for the service, such as cpf and nome_completo. parametros_disponiveis field in City status. Request example:
curl -X POST \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ambiente": 1,
"rps": [...]
}' \
https://api.webmania.com.br/2/nfse/emissao Example body of a simplified issue, with a Tax Class. The values are only examples: replace the CPF, the Tax Class reference and the notification URL with the data of your integration.
{
"ambiente": 2,
"url_notificacao": "http://meudominio.com/retorno.php",
"rps": [
{
"servico": {
"valor_servicos": "15.00",
"discriminacao": "Prestação de Serviço referente ao mês X",
"classe_imposto": "REF000000"
},
"tomador": {
"cpf": "000.000.000-00",
"nome_completo": "Nome do tomador"
}
}
]
} The response is a JSON object in the lote_rps or nfse model, described in RPS batch response and NFS-e response. The fields depend on the status, the provider and the available data, and empty fields can be left out. The examples show success responses; they do not guarantee that every field is always present.
If the response returns processando or contingencia, the invoice has no final result yet. Wait for the notification, sent by POST to the url_notificacao, and do not issue it again. The statuses are in NFS-e lifecycle.
Fields at the first level of the issuing body. Fill them in for the purpose of your issue; the fields with a link open the section of each object.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
ID | string | 1-15 | Purchase order number or processing ID Tracks issuing requests by order or processing ID. Learn more (in Portuguese) | |
ambiente | number | 1 | Environment of the invoice1 - Production Whether a sandbox (test environment) exists depends on the provider of each city. Check the status to confirm. | |
rps | array | 1-50 | Data of the service and the service buyer of each invoice, up to 50 NFS-e per request. Only cities that support lote_rps accept bulk sending. Check the status to confirm. | |
url_notificacao | string | --- | Notification URL for every status update of the invoice | |
data_agendamento | date and time | --- | Sets the date and time to schedule the issue of the invoice. The date must be the same as or later than the moment of validation. Cancel a scheduled issue Format: |
In bulk issuing, or when the provider uses batches even for a single invoice, issuing returns the RPS batch (Lote RPS). It has the fields uuid, modelo, status, motivo, numero_lote, quantidade_rps, protocolo, info_nfse and log. Each invoice of the batch, with its own uuid, comes in info_nfse.
| Parameter | Type | Description |
|---|---|---|
uuid | string | Unique ID of the RPS batchUse the UUID to match the notification you receive. |
modelo | string | Response modellote_rps |
status | string | RPS batch statusprocessando |
motivo | string | Reason for the RPS batch statusE.g.: Lote processado com sucesso (batch processed successfully) |
numero_lote | string | RPS batch number |
serie_lote | string | RPS batch series |
quantidade_rps | number | Number of NFS-e in the RPS batch |
protocolo | string | RPS batch protocol |
info_nfse | array | List and response of every invoice in the RPS batchEach item has its own UUID and the available ID, status and file fields of the NFS-e. Not every field of the single-invoice response is included. Learn more |
log | object | Response log of the city hall |
Example of an HTTP 200 response in the lote_rps model:
{
"uuid": "00000000-0000-0000-0000-000000000000", // Unique ID
"modelo": "lote_rps", // Response model (nfse, lote_rps)
"status": "processado", // processando, processado, agendado, reprovado, cancelado, contingencia
"motivo": "Lote processado com sucesso", // Reason for the status
"numero_lote": "0000", // RPS batch number
"serie_lote": "A0", // RPS batch series
"quantidade_rps": 2, // Number of NFS-e in the RPS batch
"protocolo": "000000000000000", // RPS batch protocol
"info_nfse": [
{
"uuid": "00000000-0000-0000-0000-000000000000", // NFS-e UUID
"modelo": "nfse", // NFS-e model
"status": "aprovado", // NFS-e status
"motivo": "Autorizado o uso da NFS-e", // Reason for the NFS-e status
"numero": "00", // NFS-e number
"codigo_verificacao": "000000000", // NFS-e verification code
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]", // NFS-e XML
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
"pdf_nfse_status": "processado", // Status of the city hall PDF (when available)
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]", // RPS PDF of the NFS-e
}
],
"log": { ... } // Response log of the city hall
} When you send url_notificacao, Webmania sends the result by POST to that URL, in the lote_rps model. See Notifications › RPS batch.
When the response identifies a single document, issuing returns the NFS-e. It has the fields uuid, modelo, status, motivo, numero, codigo_verificacao, serie_rps, numero_rps, xml, pdf_nfse, pdf_nfse_status, pdf_rps and log.
| Parameter | Type | Description |
|---|---|---|
uuid | string | Unique ID of the invoiceUse the UUID to match the notification you receive. |
modelo | string | Response modelnfse |
status | string | Invoice statusprocessando |
motivo | string | Reason for the invoice statusE.g.: Autorizado o uso da NFS-e (use of the NFS-e authorized) |
numero | string | Invoice numberManaged automatically by the city hall. |
codigo_verificacao | string | Verification code of the invoice |
serie_rps | string | RPS series |
numero_rps | string | RPS number |
xml | string | URL of the invoice XML |
pdf_nfse | string | URL of the invoice PDFwhen the city hall provides it |
pdf_nfse_status | string | Status of the invoice PDFwhen the city hall provides it |
pdf_rps | string | URL of the PDF of the provisional receipt (RPS) of the invoice |
log | object | Response log of the city hall |
Example of an HTTP 200 response in the nfse model. The first response can return processando: confirm the authorization by the status field.
{
"uuid": "00000000-0000-0000-0000-000000000000", // NFS-e UUID
"modelo": "nfse", // NFS-e model
"status": "aprovado", // processando, aprovado, agendado, reprovado, cancelado, contingencia
"motivo": "Autorizado o uso da NFS-e", // Reason for the NFS-e status
"numero": "00", // NFS-e number
"codigo_verificacao": "000000000", // NFS-e verification code
"serie_rps": "A0", // RPS series of the NFS-e
"numero_rps": 00, // RPS number of the NFS-e
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]", // NFS-e XML
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
"pdf_nfse_status": "processado", // Status of the city hall PDF (when available)
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]", // RPS PDF of the NFS-e
"log": { ... } // Response log of the city hall
} When you send url_notificacao, Webmania sends the result by POST to that URL, in the nfse model. See Notifications › NFS-e.
The RPS (Recibo Provisório de Serviço, a provisional service receipt) holds the data of one service. Each item of the rps array, from the Invoice information table, becomes one invoice.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
servico | object | --- | Service information | |
tomador | object | --- | Service buyer information | |
construcao_civil | object | --- | Construction information |
Example of rps for bulk issuing. Replace the example values with those of your integration. Sending more than one RPS depends on provider support for lote_rps:
{
...
"rps": [
{
"servico": {
"valor_servicos": "15.00",
"discriminacao": "Prestação de Serviço referente ao mês X",
"classe_imposto": "REF000000"
},
"tomador": {
"cpf": "000.000.000-00",
"nome_completo": "Nome do tomador"
}
},
{
"servico": {
"valor_servicos": "25.00",
"discriminacao": "Prestação de Serviço referente ao mês Y",
"classe_imposto": "REF000000"
},
"tomador": {
"cpf": "000.000.000-00",
"nome_completo": "Nome do tomador"
}
}
]
} The service data goes in the servico object of each RPS (provisional service receipt), as shown in the RPS information table.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
discriminacao | string | 1-2000 | Service description | |
valor_servicos | string | 15v2 | Total amount of the services provided0.00 | |
classe_imposto | string | 5+ | Automatic tax setup: in servico.classe_imposto, send the reference of the Tax Class created in the Webmania® PanelREF0000 | |
impostos | object | --- | Tax setup in the API, for transactions that need more flexibility | |
iss_retido | number | 1 | *Required if no Tax Class is sent Whether the ISS (the city tax on services; each city sets its rate) is withheld, that is, paid by the buyer or an intermediary instead of the service provider 1 - Yes | |
responsavel_retencao_iss | number | 1 | *Required if the ISS is withheld Party that withholds the ISS 1 - Service buyer (tomador) | |
deducoes | string | 15v2 | Amount deducted from the tax base0.00 | |
desconto_incondicionado | string | 15v2 | Unconditional discount amount0.00 | |
desconto_condicionado | string | 15v2 | Conditional discount amount0.00 | |
outras_retencoes | string | 15v2 | Amount of other withholdings0.00 | |
numero_processo | string | 1-30 | Number of the court or administrative case that suspends the ISS liability (exigibilidade) | |
intermediario | object | --- | Data of the service intermediary |
Example of a service sent without a Tax Class:
The taxes go in the impostos object, inside servico.
Use the automatic tax calculation with a Tax Class set up in the Webmania® Panel. In this case, send only the classe_imposto parameter, with the reference (REF) of the Tax Class.
padrao_nacional): send servico.impostos.iss when it applies to how the service is taxed. The API accepts this rate, and the servico.tributacao_iss indicator does not replace it. When they apply, also use impostos.cst_pis_cofins and impostos.ibs_cbs.impostos.iss as the city or provider requires.To find the provider of your city, call /2/nfse/status and check the modelo field. See also the Providers section.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
servico.classe_imposto | string | 5+ | Automatic tax setup: send the Tax Class reference in servico, not inside impostos.REF0000 | |
ibs_cbs | object | --- | IBS and CBS taxation data: the new value-added taxes of the tax reform, calculated on the service and shown separately from the price | |
iss | string | <100; up to 4 decimals | ISS rate, with a dot as the decimal separator. Note: In the national standard (model padrao_nacional), the API accepts servico.impostos.iss when it applies to how the service is taxed. The servico.tributacao_iss indicator does not replace it.0.00 | |
iss_simples_nacional | string | 3v2 | ISSQN rate (Simples Nacional, partial exemption) Note: Available for the CONAM provider. 0.00 | |
reducao | string | 3v2 | Percentage reduction of the tax base Note: Available only for the national standard (model padrao_nacional).0.00identificador_beneficio_municipal is required when reducao is sent. | |
cst_pis_cofins | string | 2 | CST (tax status code) of PIS/COFINS. PIS and COFINS are federal contributions on revenue; the CBS replaces them from 2027. Note: Available only for the national standard 00 - None | |
pis | string | 3v2 | PIS rate0.00 | |
cofins | string | 3v2 | COFINS rate0.00 | |
inss | string | 3v2 | INSS rate (social security)0.00 | |
ir | string | 3v2 | IR rate (income tax)0.00 | |
csll | string | 3v2 | CSLL rate (social contribution on net profit)0.00 | |
cp | string | 3v2 | CP rate (employer social security contribution, Contribuição Patronal) Note: Available only for the national standard 0.00 |
The tax reform creates two new taxes on goods and services: IBS, shared by states and cities, and CBS, a federal tax. Showing IBS and CBS on the invoice starts first for companies under the actual profit (Lucro Real) and presumed profit (Lucro Presumido) regimes. For the other tax regimes, such as Simples Nacional (small business regime: several taxes in one monthly payment), it will come gradually, as each city enables it in its system.
For more information, see the "Tax reform" section.
To add the new taxes to your invoices, add the ibs_cbs object to rps[].servico.impostos, when the provider supports it.
The table below lists the parameters of this object. Without servico.classe_imposto, send situacao_tributaria and classificacao_tributaria whenever you send ibs_cbs. With a Tax Class, these codes can come from the Tax Class settings.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
situacao_tributaria | string | 3 | CST (tax status code) of IBS and CBS. Together with the cClassTrib, it says how IBS and CBS apply. Required when you send ibs_cbs without servico.classe_imposto. See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese. | |
classificacao_tributaria | string | 6 | cClassTrib (tax classification code) of IBS and CBS: standard rate, reduced rate, exemption and so on. Required when you send ibs_cbs without servico.classe_imposto. See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese. | |
situacao_tributaria_regular | string | 3 | CST (tax status code) of IBS and CBS under the regular regime. See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese. Required for transactions that must be taxed under the regular regime. | |
classificacao_tributaria_regular | string | 6 | cClassTrib (tax classification code) of IBS and CBS under the regular regime. See the list of CST (tax status) and cClassTrib (tax classification) codes, in Portuguese. Required when situacao_tributaria_regular is sent; send the codes that apply to the provider and the transaction. | |
ibs_estadual | object | - | State IBS taxation data | |
ibs_municipal | object | - | City IBS taxation data | |
cbs | object | - | CBS taxation data | |
credito_presumido | array | - | IBS and CBS presumed credit data | |
transferencia_credito | array | - | IBS and CBS credit transfer data |
Example of IBS and CBS taxation:
{
"rps": [
{
...
"tomador": {...},
"servico": {
"valor_servicos": "15.00",
"discriminacao": "Prestação de Serviço referente ao mês X",
...
"impostos": {
"iss": "2.00",
"ibs_cbs": {
"situacao_tributaria": "000",
"classificacao_tributaria": "000001",
"ibs_estadual": {...},
"ibs_municipal": {...},
"cbs": {...}
}
}
}
}
]
} For the state IBS taxation data, add the ibs_estadual object inside ibs_cbs.
The table below lists the parameters of this object, when the provider supports them:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
aliquota_diferimento | number or numeric string | 0–100 | Deferral percentage, from 0 to 100. Deferral postpones payment of the tax to a later stage. The precision sent to the city depends on the provider.Required when the CST = 510 | |
valor_devolvido | string | 13v2 | Amount of tax refunded |
Example of state IBS:
"ibs_estadual": {
"aliquota_diferimento": "5.00", // Deferral percentage
"valor_devolvido": "10.00" // Amount of tax refunded
} For the city IBS taxation data, add the ibs_municipal object inside ibs_cbs.
The table below lists the parameters of this object, when the provider supports them:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
aliquota_diferimento | number or numeric string | 0–100 | Deferral percentage, from 0 to 100. The precision sent to the city depends on the provider.Required when the CST = 510 | |
valor_devolvido | string | 13v2 | Amount of tax refunded0.00 |
Example of city IBS:
"ibs_municipal": {
"aliquota_diferimento": "50.00", // Deferral percentage
"valor_devolvido": "10.00" // Amount of tax refunded
} For the CBS data, add the cbs object inside ibs_cbs.
The table below lists the parameters of this object, when the provider supports them:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
aliquota_diferimento | number or numeric string | 0–100 | Deferral percentage, from 0 to 100. The precision sent to the city depends on the provider.Required when the CST = 510 | |
valor_devolvido | string | 13v2 | Amount of tax refunded0.00 |
Example of CBS:
"cbs": {
"aliquota_diferimento": "50.00", // Deferral percentage
"valor_devolvido": "10.00" // Amount of tax refunded
} A presumed credit lets the company use tax credits in specific situations. To use it, add the credito_presumido array inside the ibs_cbs field.
The table below lists the parameters you can send inside the array:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
classificacao | string | 1-2 | Presumed credit classification codeSee the classification table below | |
aliquota_ibs | string | 2v4 | Presumed credit percentage for IBS | |
aliquota_cbs | string | 2v4 | Presumed credit percentage for CBS |
| Code | Description | Applies to |
|---|---|---|
3 | Purchase of materials for recycling | IBS and CBS |
4 | Used movable goods for resale | IBS and CBS |
5 | Automotive regime - Art. 310 | CBS |
6 | Automotive regime - Art. 311 | CBS |
7 | Manaus Free Trade Zone (Zona Franca de Manaus) - Art. 444 | IBS |
10 | Manaus Free Trade Zone (Zona Franca de Manaus) - Art. 450 | CBS |
11 | Free Trade Area (Área de Livre Comércio) - Art. 462 | IBS |
13 | Free Trade Area (Área de Livre Comércio), industry - Art. 467 | CBS |
Example of a presumed credit:
"credito_presumido": {
"classificacao": "5", // Classification code
"aliquota_ibs": "0.10", // IBS percentage
"aliquota_cbs": "0.05" // CBS percentage
} When IBS and CBS credits are transferred (CST 800), add the transferencia_credito array inside the ibs_cbs field:
The table below lists the parameters you can send inside the array:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
valor_ibs | string | 13v2 | IBS amount to transfer0.00 | |
valor_cbs | string | 13v2 | CBS amount to transfer0.00 |
Example of a credit transfer:
"transferencia_credito": {
"valor_ibs": "2.50", // IBS amount to transfer
"valor_cbs": "4.00" // CBS amount to transfer
} Send the details of the service intermediary in the intermediario object, inside servico.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cpfIndividual | string | 11 | CPF, the 11-digit individual taxpayer ID000.000.000-00 | |
nome_completoIndividual | string | 2-150 | Full name | |
cnpjCompany | string | 14 | CNPJ, the 14-digit company ID (each branch has its own)00.000.000/0000-00 | |
razao_socialCompany | string | 2-150 | Legal name | |
im | string | 1-15 | Inscrição Municipal (IM), the city registration of a company that provides services and pays ISS | |
cidade | string | 1-40 | City of the intermediary. Required for the Abrasf model, version 2.04 | |
uf | string | 2 | State (UF) of the intermediary. Required for the Abrasf model, version 2.04 |
The parameters in this section belong to the tax reform. No environment of the National Portal can receive these new parameters yet. If you choose to send them, they are only validated. They do not appear in the XML of the invoice.
To learn when these fields become available, see the "Tax reform" section.
Fill in the rps[].servico.ente_governamental object when the service is provided to the direct public administration, or to its agencies (autarquias) or foundations. The table below lists the parameters of this object:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
tipo | number | 1 | Category of the government entity1 - Federal government (União) | |
classificacao | string | 1-100 | Additional classification of the entity. Required when tipo = 9 (Other). |
Already available in the sandbox (test environment) for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.
The imovel group is required when cod_indicador_operacao is 020101, 020201 or 020301 and the service is not a construction service. In all other cases, do not send the group.
The rps[].servico.imovel object accepts the formats shown below. The inscricao_imobiliaria (city property registration) can go with the CIB or with the address. When you send codigo_cib, it takes precedence over the address. To send an address, use imovel.endereco as a string or as a structured object. In the NotaControl/ISSNet provider, send the full address: the CIB alone or the property registration alone is not accepted. The examples are illustrative excerpts of the group, not complete issuing requests.
| Method | Today (production) | From Dec 7, 2026 (already in the sandbox) |
|---|---|---|
Brazilian address with CEP (postal code), in direct fields or in the endereco object | Accepted | Accepted, no change |
CIB with the city (codigo_municipio or CEP) | Accepted | Accepted, no change |
| CIB without the city and without CEP | Accepted | Not accepted: send codigo_municipio |
| Property registration only | Accepted | Not accepted: add the CIB or the address |
| Address outside Brazil | Accepted | Not accepted |
servico.imovel object)| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
endereco, numero, complemento, bairro, cep | string | - | Brazilian address of the property, in direct fields. endereco (street) up to 255 characters; numero and bairro (district) up to 60; complemento up to 156; cep with 8 digits, without a mask. | |
endereco (object) | object | - | An alternative to the direct fields: a structured address with logradouro, numero, complemento, bairro and the endereco_nacional group (cep and, optionally, codigo_municipio_ibge). See Example 2. | |
codigo_cib | string | 8 | Property identification code (CIB), with 8 alphanumeric characters, without a mask. From Dec 7, 2026, it must come with the city of the property (codigo_municipio or CEP). | |
codigo_municipio | string | 7 | IBGE city code of the property. Required when there is no Brazilian CEP (for example, a property identified by the CIB) and whenever you use unidades[]. The API never uses the city of the service provider in its place. | |
inscricao_imobiliaria | string | 1-30 | City property registration. From Dec 7, 2026, it is additional information to the CIB or the address. | |
locacao | object | - | Required for services 99.03.xx (lease, paid assignment, rental (arrendamento), easement and permission to use real estate). Not accepted for other services. See Lease. | |
ajustes[] | array | 0-1000 | Only for services 99.03.xx: amounts included in the rent that are not part of the IBS and CBS tax base. See Adjustments. | |
unidades[] | array | 1-99 | List of properties, to send more than one property on the same invoice. See Units. |
imovel.locacao object) | Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
percentual_ | decimal | 3v2 | Co-ownership share of the issuer in the property, from 0 to 100, with up to two decimal places.Ex.: "40.00" | |
valor_total_operacao | decimal | 15v2 | Total amount of the transaction, not the issuer's share. The valor_servicos must be the co-ownership share applied to this total. | |
valor_desconto_ | decimal | 15v2 | Total unconditional discount of the transaction. Required when there is a desconto_, which must be the share applied to this total. | |
valor_desconto_ | decimal | 15v2 | Total conditional discount of the transaction. Required when there is a desconto_, which must be the share applied to this total. | |
data_vencimento_ | string | 10 | Original due date.Format: YYYY-MM-DD |
Send amounts with a dot as the decimal separator, preferably as a string, without a comma or an exponent. Example: 40% of "1000.00" gives a valor_servicos of "400.00".
imovel.ajustes[] or unidades[].ajustes[]) | Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
tipo | string | 2 | Type of amount included in the rent (or equivalent) that is not part of the IBS and CBS tax base.01 - Taxes included in the rent (e.g. IPTU property tax, betterment levy)Types 01, 02 and 03 apply to NBS codes 110021000 and 110022000. Type 04 requires codigo_nbs 110021000. | |
descricao | string | 1-150 | Description of the amount. Required only for type 99. Not accepted for the other types. | |
valor | decimal | 15v2 | Total amount of the item, not the proportional share. It cannot be greater than valor_total_operacao. |
imovel.unidades[]) | Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_cib or address | - | - | Each unit has the CIB or the Brazilian address (direct fields or the endereco object), never both. | |
inscricao_imobiliaria | string | 1-30 | Additional information of the unit. | |
ajustes[] | array | 0-1000 | Adjustments of the unit, only for services 99.03.xx. Same fields as Adjustments. |
When you use unidades[], send imovel.codigo_municipio. Do not send an address, CIB, property registration or adjustments directly in imovel.
Example 1 — Brazilian address with CEP (excerpt of servico, unchanged):
{
"cod_indicador_operacao": "020301",
"valor_servicos": "150000.00",
"discriminacao": "Intermediação na venda de imóvel residencial",
"imovel": {
"endereco": "Av. Paulista",
"numero": "1000",
"complemento": "Apto 101",
"bairro": "Bela Vista",
"cep": "01310100"
}
} Example 2 — Structured address (excerpt of servico, unchanged):
{
"imovel": {
"endereco": {
"logradouro": "Av. Paulista",
"numero": "1000",
"bairro": "Bela Vista",
"endereco_nacional": {
"codigo_municipio_ibge": "3550308",
"cep": "01310100"
}
}
}
} Example 3 — CIB with the city (excerpt of servico):
{
"imovel": {
"codigo_cib": "AB12CD34",
"codigo_municipio": "3550308",
"inscricao_imobiliaria": "001234"
}
} Example 4 — Real estate lease (service 99.03.01, excerpt of servico):
{
"codigo_servico": "990301",
"codigo_nbs": "110021000",
"cod_indicador_operacao": "020201",
"valor_servicos": "400.00",
"imovel": {
"endereco": "Rua Otávio Francisco Dias",
"numero": "100",
"bairro": "Água Verde",
"cep": "80620310",
"locacao": {
"percentual_copropriedade": "40.00",
"valor_total_operacao": "1000.00"
},
"ajustes": [
{ "tipo": "03", "valor": "150.00" }
]
}
} Example 5 — More than one property on the same invoice (excerpt of servico):
{
"imovel": {
"codigo_municipio": "4106902",
"unidades": [
{
"endereco": "Rua XV de Novembro",
"numero": "100",
"bairro": "Centro",
"cep": "80020310"
},
{
"codigo_cib": "AB12CD34",
"inscricao_imobiliaria": "001234"
}
]
}
} For more details on the service fields, see the Tax reform — New fields section.
Already available in the sandbox for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.
For the lease of movable goods (service 99.04.01), send the servico.bens_moveis[] list together with servico.impostos.ibs_cbs. The list is required for this service and is not accepted for other services. Send from 1 to 1,000 goods. The fields below belong to each item:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_ncm | string | 8 | NCM of the item, the Mercosur product classification code, with exactly 8 digits. Keep the leading zeros. | |
descricao | string | 1-150 | Description of the movable good. | |
quantidade | integer | 1-999 | Quantity, as a JSON integer (not a string or a decimal). |
Example — excerpt of servico: keep the other required issuing data and use the cClassTrib (tax classification) that applies to the transaction.
{
"codigo_servico": "990401",
"valor_servicos": "100.00",
"impostos": {
"ibs_cbs": {
"situacao_tributaria": "000",
"classificacao_tributaria": "000001"
}
},
"bens_moveis": [
{
"codigo_ncm": "84713012",
"descricao": "Computador portátil",
"quantidade": 2
}
]
} Already available in the sandbox for testing. In production, the new fields of this section are rejected until Dec 7, 2026. See the summary in Changes to the national standard NFS-e.
In the national standard provider, ISSQN (ISS) deductions/reductions and reimbursements/pass-throughs move into one group, servico.ajuste_base_calculo. The deducao_reducao and reembolso_repasse groups are still accepted. They are converted automatically when there is a direct match (see the mapping table below). Do not send ajuste_base_calculo together with deducao_reducao or reembolso_repasse.
Send percentual_iss, valor_iss or documentos.
servico.ajuste_base_calculo object)| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
percentual_iss | string | 1-3v2 | Adjustment percentage of the ISSQN tax base, from 0 to 100. Do not send it together with valor_iss. | |
valor_iss | string | 15v2 | Adjustment amount of the ISSQN tax base. It cannot be greater than valor_servicos. Do not send it together with percentual_iss. | |
documentos | array | 1-1000 | Documents that support each adjustment. See the table below. |
ajuste_base_calculo.documentos[])| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
tipo | string | 1-3 | Type of adjustment.2 - Materials | |
descricao | string | 1-150 | Description of the adjustment. Required only for types 99 and 199. Not accepted for the other types. | |
valor_total | string | 15v2 | Total amount of the document. | |
valor_aplicado | string | 15v2 | Adjustment amount applied. It cannot be greater than valor_total. The sum of the documents cannot be greater than valor_servicos. | |
data_emissao | string | 10 | Issue date of the document.Format: YYYY-MM-DD | |
data_competencia | string | 10 | Accrual date (competência) of the document.Format: YYYY-MM-DD | |
dfe_nacional | object | - | Electronic tax document of the national environment (tipo_chave_dfe, chave_dfe and, for type 9, descricao_tipo_chave_dfe). | |
dfe_outro | object | - | Tax document outside the national environment (codigo_municipio_emissor, numero_documento, descricao_documento). Accepted only for an accrual period before Jan 1, 2026. | |
doc_outro | object | - | Non-tax document (numero_documento, descricao_documento). Not accepted for types 101, 103, 104 and 199, which require a tax document. | |
fornecedor | object | - | Supplier of the document, with the same fields as Referenced supplier. |
Send exactly one of dfe_nacional, dfe_outro and doc_outro in each document. Together with percentual_iss or valor_iss, the documents accept only types 101 to 105 and 199. For services 06.01 and 06.02, send only type 9 or 199.
| Today | From Dec 7, 2026 |
|---|---|
deducao_reducao.percentual / valor | percentual_iss / valor_iss |
tipo_deducao_reducao 2, 5, 6, 7, 8, 9 and 99 | Same code in tipo |
tipo_deducao_reducao 3 (external production) | tipo 103 |
tipo_deducao_reducao 1 (food and drinks/minibar) | Not accepted: discontinued type |
tipo_deducao_reducao 4 (expense reimbursement) | Not accepted: send the matching tipo in ajuste_base_calculo |
tipo_reembolso 01, 02, 03, 04 and 99 | tipo 101, 102, 103, 104 and 199 |
valor_deducao (deduction) / valor (reimbursement) | valor_aplicado |
chave_nfse / chave_nfe | dfe_nacional |
nfse_municipal, nf_nfs, doc_fiscal or doc_nao_fiscal | Not converted: send dfe_outro or doc_outro in ajuste_base_calculo |
valor_dedutivel | Not converted: send valor_total |
data_competencia (missing in deduction/reduction) | Required in each document |
Example — excerpt of servico:
{
"valor_servicos": "1000.00",
"ajuste_base_calculo": {
"documentos": [
{
"tipo": "2",
"valor_total": "300.00",
"valor_aplicado": "300.00",
"data_emissao": "2026-11-20",
"data_competencia": "2026-11-20",
"dfe_nacional": {
"tipo_chave_dfe": 2,
"chave_dfe": "41261112345678000195550010000012341000012345"
}
}
]
}
} Already available in the sandbox: reimbursements/pass-throughs move to Tax base adjustment (types 101 to 104 and 199). The reembolso_repasse group is still accepted and is converted automatically. Also send valor_total in each document. dfe_outro documents are then accepted only for an accrual period before Jan 1, 2026, and doc_outro is no longer accepted for types 01, 03, 04 and 99.
Send the rps[].servico.reembolso_repasse object for a reimbursement, pass-through or refund that is taken into account in the tax base of ISSQN, IBS and CBS. The table below lists the parameters of this object:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
documentos | array | 1-1000 | List of documents that support the reimbursement, pass-through or refund. |
This section shows the types of documents you can reference to support the reimbursement/pass-through.
Each item of rps[].servico.reembolso_repasse.documentos[] is an object with the fields below. Fill in exactly one of the dfe_nacional, dfe_outro or doc_outro groups per item.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
tipo_reembolso | number | 2 | Code of the reimbursement/pass-through type. 01 - Pass-through of real estate brokerage fees to other brokers involved in the transaction; | |
descricao | string | 1-150 | Description of the reimbursement/pass-through type. Required when tipo_reembolso = 99. | |
valor | string | 15v2 | Total amount reimbursed or passed through. | |
fornecedor_referenciado | object | - | Supplier of the referenced document. If you send it, fill in one ID and the name, as shown in the table below. | |
dfe_nacional | object | - | Electronic tax documentThe document must be available in the national data environment. | |
dfe_outro | object | - | Non-electronic tax document. | |
doc_outro | object | - | Other document. | |
data_emissao | string | 10 | Issue date of the referenced document.YYYY-MM-DD | |
data_competencia | string | 10 | Accrual date (competência) of the referenced document.YYYY-MM-DD |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cpfIndividual | string | 11 | CPF of the supplier.000.000.000-00 | |
cnpjCompany | string | 14 | CNPJ of the supplier.00.000.000/0000-00 | |
id_estrangeiroForeign person | string | 1-40 | ID of the foreign supplier.Passport number or another legal document that identifies a foreign person. | |
nome | string | 1-150 | Name or legal name of the supplier. | |
indicador_nao_nif | number | 1 | Reason why the NIF (foreign tax ID) is not sent. 0 - Not stated on the source invoice; |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
tipo_chave_dfe | number | 1 | Type of national electronic tax document (DF-e). 1 - NFS-e | |
descricao_tipo_chave_dfe | string | 1-255 | Description of the tax document type.Required when tipo_chave_dfe = 9 (Other) | |
chave_dfe | string | 1-50 | Access key of the tax document (NFS-e, NF-e, CT-e, etc.). |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_municipio_emissor | string | 7 | IBGE code of the city that issued the tax document. | |
numero_documento | string | 1-255 | Number of the tax document. | |
descricao_documento | string | 1-255 | Description of the tax document. |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
numero_documento | string | 1-255 | Number of the document. | |
descricao_documento | string | 1-255 | Description of the document. |
A deduction or reduction on the NFS-e (service invoice) applies only to cities that use the national standard (Padrão Nacional). It subtracts amounts from the tax base of the ISSQN (ISS, the city service tax). This lowers the final tax the service provider (prestador) pays.
Already available in the sandbox (test environment): deductions and reductions move to Tax base adjustment. The API still accepts the deducao_reducao group and converts it automatically. The exceptions are types 1 and 4 and the documents nfse_municipal, nf_nfs, doc_fiscal and doc_nao_fiscal. With documentos, also send valor_total and data_competencia in each document.
deducao_reducao, the API calculates the deducoes amount automatically.valor_deducao (when you use documentos) cannot be greater than valor_servicos.| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
deducao_reducao | object | --- | Object that holds the type of deduction/reduction. |
To send a deduction or reduction on the NFS-e, send only one of the options below, as you need:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
valor | string | 15v2 | Amount of the deduction/reductionUse this option when the deduction is an amount. It must be greater than or equal to zero and less than or equal to | |
percentual | string | 1-3v2 | Deduction/reduction percentage (0 to 100)Use this option when the deduction is a percentage. | |
documentos | array | 1-1000 | List of documents that support the deduction/reduction |
Deduction/reduction documents (deducao_reducao.documentos[]): each item must have only one document identifier, plus the required fields below.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
chave_nfse | string | 50 | Access key of the NFS-e (national standard) | |
chave_nfe | string | 44 | Access key of the NF-e (electronic invoice for goods) | |
nfse_municipal | object | --- | Data of a city NFS-e outside the national standard | |
nf_nfs | object | --- | Data of a non-electronic NF/NFS (paper invoice) | |
fornecedor | object | --- | Data of the supplier of the service provided | |
doc_fiscal | string | 255 | Identifier of a tax document (when none of the options above fits) | |
doc_nao_fiscal | string | 255 | Identifier of a non-tax document (when it applies) | |
tipo_deducao_reducao | number | 2 | Deduction/reduction scenario 1 - Food and beverages/minibarThe options depend on the layout the city uses. Codes 3 and 4 are not accepted in national layout 1.01 or later. | |
descricao_outras_deducoes | string | 150 | Description of other deductions.Required when tipo_deducao_reducao = 99 | |
data_emissao | date | --- | Issue date of the documentAccepts: YYYY-MM-DD or DD/MM/YYYY | |
valor_dedutivel | string | 15v2 | Total deductible amount of the document | |
valor_deducao | string | 15v2 | Amount used in the deduction/reduction of the serviceMust be ≤ valor_dedutivel |
To send the data of a city NFS-e outside the national standard, fill in the fields below:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_municipio | string | 7 | City code (IBGE city code) | |
numero | string | 1-15 | Number of the city NFS-e, digits only | |
codigo_verificacao | string | 1-9 | Verification code of the city NFS-e |
To send the data of a non-electronic NF or NFS (paper invoice), fill in the fields below:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
numero | string | 7 | Number of the NF/NFS | |
modelo | string | 1-15 | Model of the NF/NFS, digits only | |
serie | string | 1-9 | Series of the NF/NFS |
To send the data of the supplier of the service provided, fill in the fields below:
Supplier (deducao_reducao.documentos[].fornecedor): when you send this object, fill in the CPF (individual taxpayer ID), CNPJ (company ID), foreign ID or motivo_sem_nif, with the matching name. If you send address data, also fill in the street, number and neighborhood. For a Brazilian supplier, send the CEP (postal code) and the city code. For a foreign supplier, send the country code, foreign postal code, city and state/province.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cpf | string | 11 | CPF of the supplier | |
cnpj | string | 14 | CNPJ of the supplier | |
id_estrangeiro | string | 40 | ID of the supplier abroad | |
motivo_sem_nif | number | 1 | Reason for not sending a foreign ID (NIF, the foreign tax ID)0 - Not stated on the source invoice | |
razao_social | string | 1-150 | Legal company name (required when you use a CNPJ) | |
nome_completo | string | 1-150 | Full name (required when you use a CPF) | |
nome_estrangeiro | string | 1-150 | Name of the supplier abroadRequired when you send | |
caepf | string | 14 | CAEPF of the supplier, the registration of an individual employer (optional) | |
im | string | 15 | Inscrição Municipal (IM, city registration) of the supplier (optional) | |
endereco | string | 255 | Street of the supplierIf you send any address field, this one becomes required. | |
numero | string | 1-60 | Street numberRequired when you send an address. | |
complemento | string | 156 | Address line 2 | |
bairro | string | 60 | Neighborhood | |
cep | string | 8 | CEP (when the supplier is Brazilian) | |
codigo_municipio | string | 7 | IBGE city code of a Brazilian supplier | |
codigo_pais | string | 4 | Country code (when the supplier is abroad) | |
cep_exterior | string | 11 | Postal code abroad | |
cidade | string | 60 | City abroad | |
estado | string | 60 | State/province abroad | |
telefone | string | 20 | Phone number of the supplier | |
email | string | 80 | Email of the supplier |
The service buyer (tomador) is the party that pays for the service. Send the service buyer data in the tomador object of each RPS, as shown in the RPS information table.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cpfIndividual | string | 11 | CPF number (individual taxpayer ID)000.000.000-00 | |
nome_completoIndividual | string | 2-150 | Full name | |
cnpjCompany | string | 14 | CNPJ (company ID)00.000.000/0000-00 | |
razao_socialCompany | string | 2-150 | Legal company name | |
im | string | 1-15 | City registration (inscrição municipal) | |
nif | string | 1-40 | NIF (foreign tax ID) | |
endereco | string | 1-125 on input | *Required for a company Street address of the service buyer The city may apply a lower limit. | |
numero | string | 1-10 on input | *Required for a company Street number of the service buyer address Send it as a string. The city may apply a lower limit. | |
complemento | string | 1-60 on input | Address details of the service buyer (suite, floor)The city may apply a lower limit. | |
bairro | string | 1-60 on input | *Required for a company Neighborhood of the service buyer address The city may apply a lower limit. | |
cidade | string | 1-60 on input | *Required for a company City of the service buyer address The city may apply a lower limit. | |
uf | string | 2 | *Required for a company Two-letter state code (UF) of the service buyer address | |
cep | string | 8 digits | *Required for a company CEP (postal code) of the service buyer address Accepts 00000000 or 00000-000; the hyphen is removed during processing. | |
email | string | Depends on the city | Email of the service buyer, used to send the NFS-eString on input. In the Abrasf 2.04 and national standard layouts, the limit is 80 characters. | |
telefone | string | Min. 8 characters on input | Phone number of the service buyerSend the area code (DDD) and the number. Non-numeric characters are removed during processing. The maximum length depends on the city (20 digits in the Abrasf 2.04 and national standard layouts). |
When the service buyer lives outside Brazil, send the data of the foreign service buyer. Send these fields in the tomador object, as shown in the RPS information table.
Note: This table describes the foreign service buyer in the Abrasf 2.04 model. Support and limits vary with the city layout. In Simpliss Abrasf 2.03, the full address is limited to 125 characters. Do not send cpf or cnpj together with id_estrangeiro.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
nome_estrangeiro | string | 1-150 | Full name | |
id_estrangeiro | string | 1-40 | ID number (passport or another legal document) | |
endereco_completo | string | 1-255 | Full address | |
nome_pais | string | 1-40 | Country name | |
codigo_pais | string | 4 | Country code (Brazilian Central Bank, BACEN, standard) Example: United States = 2496 | |
email | string | 1-80 | Email of the service buyer, used to send the NFS-e in the Abrasf 2.04 layout |
The parameters in this section belong to the tax reform. No environment of the National Portal can receive these new parameters yet. If you choose to send them, they are only validated and do not appear in the XML of the invoice.
To learn when these fields become available, see the "Tax reform" section.
The recipient (destinatário) is the party that receives the service. The service buyer (tomador) is the party that pays for it.
In most cases, the recipient and the service buyer are the same. In that case, you do not need to send the parameter destinatario.
Example: For a technical repair service, the head office can hire and pay for the service (service buyer), while the service is provided at a branch (recipient).
Send the destinatario group when servico.indicador_destinatario=1. The tables below describe the nested structure that the national standard (Padrão Nacional) uses. Send one ID: cpf, cnpj or id_estrangeiro. The nome field and the endereco object are required when you send a recipient. Inside endereco, send logradouro, numero, bairro and exactly one of the subgroups endereco_nacional or endereco_exterior, with every field of its table. Other city layouts may use their own structure and limits.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cpfIndividual | string | 11 | CPF number (individual taxpayer ID)000.000.000-00 | |
nome | string | 1-150 | Full name or legal company name of the recipient. | |
cnpjCompany | string | 14 | CNPJ (company ID)00.000.000/0000-00 | |
id_estrangeiroForeign person | string | 1-40 | ID of the foreign recipient.Passport number or another legal document that identifies a foreign person. | |
nif | string | 1-40 | NIF (foreign tax ID) of the foreign recipient. | |
indicador_nao_nif | number | 1 | Reason why the NIF is not sent. 0 - Not stated on the source invoice; | |
endereco | object | - | Address of the recipient, as a nested object. See the tables below. | |
email | string | 1-80 | Email of the recipient, used to send the NFS-e | |
telefone | string | 6-20 digits | Phone number of the recipientNon-numeric characters are removed during processing. |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
logradouro | string | 1-255 | Street of the recipient address. | |
numero | string | 1-60 | Street number of the recipient address. | |
complemento | string | Up to 156 | Address details of the recipient (suite, floor). | |
bairro | string | 1-60 | Neighborhood of the recipient address. | |
endereco_nacional | object | - | Group for a Brazilian address of the recipient. | |
endereco_exterior | object | - | Group for a foreign address of the recipient. |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_municipio_ibge | string | 7 | IBGE city code. 7 digits.Example: São Paulo = 3550308 | |
cep | string | 8 | CEP (postal code) of the address. 8 digits, no mask.Example: 01310100 |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_pais | string | 2 | Country code in the national standard: two-letter ISO code, in uppercase.Example: United States = US. Do not use the four-digit BACEN code in this subgroup. | |
codigo_postal | string | 1-11 | Postal code of the foreign address. | |
cidade | string | 1-60 | City of the foreign address. | |
estado_provincia | string | 1-60 | State or province of the foreign address. |
Send the construction data when the service is related to a construction project. Send these fields in the construcao_civil object, as shown in the RPS information table. The parameters vary with the standard of the provider (the system the city hall uses to authorize NFS-e). The tables below list the parameters for the Abrasf, Padrão Nacional (national standard), Sigissweb and São Paulo (RTC) models.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_obra | string | 1-15 | Construction project code. Optional in the Abrasf 2.01 and 2.04 layouts | |
art | string | 1-15 | Code of the ART (technical responsibility record, Anotação de Responsabilidade Técnica) |
For the national standard, send inscricao_imobiliaria_fiscal, codigo_obra or the full address of the project (endereco, numero, bairro and cep). In the national standard layout, the XML uses the property tax registration first, then the project code, and the address last. Send the option you want to use. In the NotaControl (ISSNet) city layout, the full address is required even with a property tax registration. The codigo_obra field is not included in the XML of that layout.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
inscricao_imobiliaria_fiscal | string | 1-30 | Property tax registration (inscrição imobiliária fiscal)Code the city hall gives to identify the project or to collect IPTU (city property tax) | |
codigo_obra | string | 1-30 | ID number of the construction projectCNO (national construction registry, Cadastro Nacional de Obras) or CEI (specific INSS registration, Cadastro Específico do INSS) | |
endereco | string | 1-255 | Street of the project address | |
numero | string | 1-60 | Street number of the project address | |
complemento | string | 1-156 | Address details of the project (suite, floor) | |
bairro | string | 1-60 | Neighborhood of the project address | |
cep | string | 8 | CEP (postal code) of the project address |
For Sigissweb, these parameters are required: cno, nome, cep, numero.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cno | string | 1-12 | CNO (national construction registry) | |
nome | string | 1-60 | Name of the project | |
endereco | string | 1-125 | Address of the project | |
cep | string | 8 | CEP (postal code) of the project | |
numero | string | 1-10 | Street number of the project address | |
bairro | string | 1-60 | Neighborhood of the project | |
cidade | string | 1-60 | City of the project | |
uf | string | 2 | State (UF) of the project | |
complemento | string | 1-60 | Address details of the project | |
inscricao_imobiliaria | string | 1-30 | Property tax registration of the project | |
exterior | string | 1 | Whether the project is outside Brazil1 - Yes |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_obra | string | 1-12 | Project code (CEI/CNO) | |
matricula_obra | string | 1-12 | Project registration number (matrícula da obra) | |
numero_encapsulamento | string | 1-12 | Encapsulation number (número de encapsulamento) | |
uf_local_obra | string | 2 | State (UF) where the project is locatedRequired when cidade_local_obra is sent. | |
cidade_local_obra | string | 1-40 | City where the project is locatedRequired when uf_local_obra is sent. |
Event activities are services provided at artistic, cultural, sports and similar events. In the national standard, event activity data is required for the services of item 12 of the service list (code 12.XX.XX). From Dec 7, 2026, it is also required for subitem 17.10. With other providers, the requirement depends on the layout. Send these fields in the atividades_evento object in the national standard and in SigissWeb. In São Paulo (RTC), use the atividade_evento object (singular). The parameters and when they are required vary with the provider. In the national standard, send identificacao or the full address of the event (endereco, numero, bairro and cep). If you send both, the XML uses the ID.
Already available in the sandbox (test environment): subitem 17.10 now requires atividades_evento. In subitems 12.13 and 17.10, you can send the city of the event in atividades_evento.codigo_municipio. See the summary in Changes to the national standard NFS-e.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
descricao_evento | string | 1-255 | Name and description of the artistic, cultural, sports or other event. | |
data_inicio | string | 10 | Start date of the event activityFormat: YYYY-MM-DD | |
data_final | string | 10 | End date of the event activityFormat: YYYY-MM-DD | |
identificacao | string | 1-30 | ID of the event activity. Required if you do not send the address where the event activity takes place. Event ID code set by the city tax administration | |
endereco | string | 1-255 | Street of the event activity address | |
numero | string | 1-60 | Street number of the event activity address | |
complemento | string | 1-156 | Address details of the event activity location (suite, floor) | |
bairro | string | 1-60 | Neighborhood of the event activity address | |
cep | string | 8 | CEP (postal code) of the event activity address | |
codigo_municipio | string | 7 | IBGE code of the city where the event takes place. Accepted only for subitems 12.13 and 17.10. It must differ from the city where the service is provided. Available in the sandbox; in production from Dec 7, 2026. |
In SigissWeb, descricao_evento, data_inicio and data_final are required when you send atividades_evento. The other fields of the table above are optional with this provider. It does not require the ID or the full address, as the national standard does. These parameters are also available:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
cidade | string | 1-60 | City of the event activity location | |
uf | string | 2 | State (UF) of the event activity city | |
uf_prestacao | string | 2 | State (UF) where the event service is provided | |
pais | string | 1-60 | Country of the event activity location | |
exterior | string | 1 | Whether the event is outside Brazil1 - Yes |
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
descricao_evento | string | 1-255 | Name and description of the event | |
data_inicio | string | 10 | Start date of the eventFormat: YYYY-MM-DD | |
data_final | string | 10 | End date of the eventFormat: YYYY-MM-DD | |
endereco | string | 1-50 | Street of the event location | |
numero | string | 1-10 | Street number of the event address | |
complemento | string | 1-30 | Address details of the event (suite, floor) | |
bairro | string | 1-30 | Neighborhood of the event location | |
cep | string | 7-8 | CEP (postal code) of the event locationIf you do not send it, use codigo_pais + cep_exterior + cidade + estado. | |
codigo_pais | string | 4 | Country code (Brazilian Central Bank, BACEN)Required when cep is not sent. | |
cep_exterior | string | 1-11 | Postal code of the foreign addressRequired when cep is not sent. | |
cidade | string | 1-60 | City of the foreign addressRequired when cep is not sent. | |
estado | string | 1-60 | State or province of the foreign addressRequired when cep is not sent. |
A provider (provedor) is the system a city hall uses to authorize service invoices (NFS-e). Each provider may ask for extra fields in the servico object, on top of the fields in RPS information. Find your city's provider in the modelo field of City status. Then check below which fields each provider accepts or requires.
For the Prescon and Pública providers, open the status and check the ambientes, autenticacao, emissao and funcoes fields:
login_senha, with the city registration (Inscrição Municipal) and the city hall password. In Vinhedo, it is token, provided by the city hall. Only the production environment exists, and each request sends a single RPS. In Ubatuba, cancellation is not available.certificado_a1, and emissao includes lote_rps, which allows batch sending. The sandbox (test environment) is available only in Joinville. There, natureza_operacao accepts values from 1 to 7. The API converts them to the city's code based on the company's tax regime, the ISS withholding, the city where the service is provided and a foreign service buyer.The Abrasf XML model is the one most cities use to issue service invoices. It is available in versions 1.00, 2.00, 2.01, 2.02, 2.03 and 2.04. The table below lists the specific fields of each version of this model:
| Parameter | Required | Version | Type | Size | Description |
|---|---|---|---|---|---|
codigo_servico | All versions | string | Varies by city | Service code required by the city. The format varies by version and provider.Example: 00.00. In layout 2.04, some cities require the 6-digit national code. | |
codigo_cnae | All versions | string | 7 | CNAE code (economic activity code) | |
codigo_tributacao_municipio | All versions | string | 1-20 | City tax code | |
uf_local_prestacao | All versions | string | 2 | State (UF) where the service is provided | |
cidade_local_prestacao | All versions | string | 1-20 | City where the service is provided | |
natureza_operacao | 1.00 | number | 1 | Natureza da operação (nature of the transaction) code 1 - Taxed in the city | |
exigibilidade_iss | 2.00 or later | number | 1 | ISS liability (exigibilidade); ISS is the city tax on services 1 - Payable | |
data_competencia | 2.00 or later | string | 10 | Accrual date (data de competência) Format: YYYY-MM-DD | |
numero_processo | 2.00 or later | string | 1-30 | Number of the court or administrative proceeding that suspends the ISS liability | |
local_incidencia | 2.00 or later | number | 1 | Place of taxation 1 - City of the service provider | |
codigo_nbs | 2.03 and 2.04 | string | 1-9 | NBS code (Brazilian Nomenclature of Services) | |
informacoes_complementares | 2.04 | string | 1-2000 | Additional information about the service provided. | |
itens | 2.04 | array | --- | Service items available only for Uberlândia, MG |
Send the item information in the itens object, as shown in the Abrasf provider table.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
descricao | string | 1-255 | Item description | |
quantidade | string | Up to 15 characters | Item quantity. The limit includes the decimal separator and the 2 decimal places after normalization.00.00 | |
valor_unitario | string | Up to 15 characters | Item unit price. The limit includes the decimal separator and the 2 or 4 decimal places after normalization, depending on the city.00.00 | |
item_tributavel | string | 1 | Whether the item is taxable 1 - Yes |
Specific issuing fields in the cities served by the Cecam provider, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_cnae | string | 7 | CNAE code | |
codigo_servico | string | 3-5 | Service code0000 | |
local_prestacao | string | 1 | Place where the service is provided 1 - Service provider's head office | |
cep_local_prestacao | string | 8 digits | CEP (postal code) of the place where the service is provided. When sent, it must have 8 digits after the formatting is removed.Optional in the API validation. Check what the city requires for services provided outside it. |
Specific issuing fields in the cities served by the Conam provider, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
operacao_onerosa | number | 1 | Whether the transaction is paid (onerosa) 1 - YESWhen the service is not paid, send 2 (NO) explicitly. Sending the wrong value, or leaving out the field for a truly free service, can cause a tax problem with the city. | |
codigo_tributacao_municipio | string | 1-9 | City tax code1 to 9 digits. | |
codigo_nbs | string | 9 | NBS code (Brazilian Nomenclature of Services)Exactly 9 digits. | |
uf_local_prestacao | string | 2 | State (UF) where the service is providedRequired when impostos.ibs_cbs is sent and the service buyer/recipient has no state/city. | |
cidade_local_prestacao | string | 1-20 | City where the service is providedRequired when impostos.ibs_cbs is sent and the service buyer/recipient has no state/city. |
Specific issuing fields in the cities served by the DSF provider, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_cnae | string | 7 or 9 | CNAE code: 9 digits for Campinas (SP) and 7 for the other cities served by this layout. | |
tipo_operacao | string | 1 | Transaction type A - No deduction | |
tipo_tributacao | string | 1 | Taxation type C - Exempt from ISS |
Specific issuing fields in the Equiplano provider, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Parent parameter | Description |
|---|---|---|---|---|---|
codigo_servico | string | 4-6 | servico | Service code"00.00" | |
justificativa_deducoes | string | 1-255 | servico | Reason for the deduction amount. Required when the document has a deduction amount. | |
descricao_impostos | string | 1-500 | impostos | Description of the tax amounts applied to the document. | |
ie | string | 1-20 | tomador | IE (Inscrição Estadual, state registration) of the service buyer (tomador). |
| Parameter | Required | Type | Size | Parent parameter | Description |
|---|---|---|---|---|---|
pais | string | 1-500 | tomador | Name of the country where the foreign buyer lives. |
Specific issuing fields in the city of Florianópolis, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
cfps | string | 4 | Service tax code (CFPS, Código Fiscal de Prestação de Serviços) | |
id_cnae | string | 3 or more | ID code of the service provided Note: the CNAE ID is not the same as the CNAE code. Check the table published by the city to find the CNAE ID that matches the service provided. | |
situacao_tributaria | string | 1-2 | CST (Código de Situação Tributária, tax status code) 0 - Fully taxed |
Specific issuing fields in the cities served by the Governa provider, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_cnae | string | 7-9 | Service code0000000 | |
regime_recolhimento | string | 2 | Tax payment regime code 00 - Regular activity (movimento) | |
forma_recolhimento | string | 2 | Tax payment method code 00 - Normal |
Specific issuing fields in the cities served by the IPM provider, on top of the fields in RPS information:
impostos.iss (city taxation). | Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 5 | Service code00.00 | |
situacao_tributaria | string | 1-2 | CST (Código de Situação Tributária, tax status code). When it is left out, the API uses 0. 0 - Fully taxed | |
natureza_operacao | string | 1 | Natureza da operação (nature of the transaction) code 1 - Taxed in the service provider's city |
Specific issuing fields in the city of Fortaleza, CE, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
pis_cofins_retido | number | 1 | Withholding of PIS/COFINS (federal revenue taxes) 0 - PIS/COFINS/CSLL not withheld | |
impostos.cst_pis_cofins | string | 2 | Tax status code (CST) of PIS/COFINS 00 - None |
Specific issuing fields in the city of Osasco, on top of the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 3-5 | Service code00.00 | |
endereco_local_prestacao | string | 9 | Address of the place where the service is providedRequired for construction services. | |
cep_local_prestacao | string | 9 | CEP of the place where the service is providedRequired for construction services. | |
cidade_local_prestacao | string | 9 | City where the service is providedRequired for construction services. | |
uf_local_prestacao | string | 9 | State (UF) where the service is providedRequired for construction services. |
The national standard (Padrão Nacional) is one national NFS-e system that is replacing the systems of each city hall. These are the fields specific to issuing in the cities that joined it, in addition to the fields in RPS information:
padrao_nacional), servico.tributacao_iss sets how ISSQN (the city service tax, ISS) applies. It does not replace the rate in servico.impostos.iss, which the API accepts when you send it. The IBS/CBS fields cover different taxes. | Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 6 | Service code00.00.00 | |
codigo_tributacao_municipio | string | 3 or 3-9 | City tax code. It usually has 3 characters. The NotaControl Padrão Nacional provider accepts 3 to 9. Required for IMA Padrão Nacional and for NotaControl in Brasília/DF and Goiânia/GO. Values made only of zeros are ignored. | |
identificador_beneficio_municipal | string | 14 | Identifier of the city tax benefit, with 14 digits. Required when you send servico.impostos.reducao. | |
tributacao_iss | number | 1 | How ISSQN applies to the service provided 1 - Taxable transaction | |
tipo_imunidade | number | 1 | Type of ISSQN immunity. Only for the Immunity case 0 - Immunity (type not stated on the original invoice) | |
pis_cofins_retido | number | 1 | Withholding of PIS/COFINS (federal revenue taxes) 0 - PIS/COFINS/CSLL not withheld | |
data_competencia | string | 10 | Accrual date (competência) Format: YYYY-MM-DD | |
codigo_nbs | string | 9 | NBS code (Brazilian Nomenclature of Services), with 9 digits. | |
codigo_interno | string | 1-20 | Internal code of the taxpayer, with 1 to 20 alphanumeric characters. | |
aliquota_tributos_aproximados | number | 0-100 | Rate of the approximate taxes for Simples Nacional (small business regime). | |
uf_local_prestacao | string | 2 | State (UF) where the service is provided. Required when you send cidade_local_prestacao. | |
cidade_local_prestacao | string | 1-25 | City where the service is provided. Required when you send uf_local_prestacao. | |
informacoes_complementares | string | 1-2000 | Additional information about the service provided. | |
deducao_reducao | object | --- | Object for the deduction/reduction of the tax base |
For cities on the padrao_nacional model, you can send the fields below in servico when the transaction involves foreign trade.
Already available in the sandbox (test environment) for testing. In production, the API rejects the new fields of this section until Dec 7, 2026, and valor_servico_moeda stays required until that date. See the summary in Changes to the national standard NFS-e.
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
modo_prestacao | number | 1 | Mode of supply. 0 - Unknown (type not stated on the original invoice) | |
vinculo_prestacao | number | 1 | Relationship between the parties in the transaction. 0 - No relationship with the service buyer/service provider | |
tipo_moeda | string | 3 | Currency of the commercial transaction.E.g.: 840 (USD), 978 (EUR) | |
valor_servico_moeda | number | 15v2 | Amount of the service in the currency set in tipo_moeda. Required in production until Dec 7, 2026. From that date, and already in the sandbox, you may keep sending it, but it is no longer used.0.00 | |
mecanismo_apoio_comex_prestador | string | 2 | Foreign trade support or promotion program used by the service provider (prestador). 00 - Unknown (type not stated on the original invoice) | |
mecanismo_apoio_comex_tomador | string | 2 | Foreign trade support or promotion program used by the service buyer (tomador). 00 - Unknown (type not stated on the original invoice) | |
movimento_temporario_bens | number | 1 | Link of the transaction to a temporary movement of goods. 0 - Unknown (type not stated on the original invoice) | |
numero_duimp | string | 15 | Number of the Single Import Declaration (DUIMP). Required when movimento_temporario_bens = 2. Do not send it when the value is 1. | |
numero_due | string | 14 | Number of the Single Export Declaration (DU-E). Required when movimento_temporario_bens = 3. Do not send it when the value is 1. | |
numero_fatura | string | 1-20 | Number of the commercial invoice, digits only. | |
valor_fatura | number | 15v2 | Amount of the commercial invoice. | |
numero_contrato_cambio | string | 1-20 | Number of the foreign exchange contract, digits only. | |
mdic | number | 1 | Share the NFS-e information with the Foreign Trade Secretariat (MDIC). 0 - Do not send to MDIC |
Foreign trade example (servico), accepted in production and in the sandbox:
{
"modo_prestacao": 1,
"vinculo_prestacao": 2,
"tipo_moeda": "840",
"valor_servico_moeda": "1250.00",
"mecanismo_apoio_comex_prestador": "01",
"mecanismo_apoio_comex_tomador": "10",
"movimento_temporario_bens": 1,
"mdic": 1
} Example with a DU-E, a commercial invoice and a foreign exchange contract (servico), accepted in the sandbox and, from Dec 7, 2026, in production:
{
"modo_prestacao": 1,
"vinculo_prestacao": 2,
"tipo_moeda": "840",
"mecanismo_apoio_comex_prestador": "01",
"mecanismo_apoio_comex_tomador": "10",
"movimento_temporario_bens": 3,
"numero_due": "26BR0000012345",
"numero_fatura": "123456",
"valor_fatura": "1250.00",
"numero_contrato_cambio": "987654",
"mdic": 1
} Fields specific to issuing in the city of São Paulo, in addition to the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 4-5 digits | City service code, normalized to digits00000 | |
tipo_tributacao | string | 1 | Taxation type of the service T – Taxed in São Paulo Default: T – Taxed in São Paulo | |
data_competencia | string | 10 | Accrual date (competência) Format: YYYY-MM-DD | |
valor_inicial_cobrado | string | 13v2 | Initial amount charged for the service (RTC, the consumption tax reform layout), with up to 13 integer digits and 2 decimals.Optional. In the RTC layout, it takes precedence over valor_final_cobrado when sent. | |
valor_final_cobrado | string | 13v2 | Final amount charged for the service (RTC), with up to 13 integer digits and 2 decimals.Optional. In the RTC layout, if you omit both charged amounts, the API uses valor_servicos as valor_final_cobrado. | |
valor_multa | string | 13v2 | Fine applied to the service (RTC)0.00 | |
valor_juros | string | 13v2 | Interest applied to the service (RTC)0.00 | |
valor_ipi | string | 13v2 | IPI amount (RTC; IPI is the federal tax on manufactured and imported goods), with up to 13 integer digits and 2 decimals.0.00In the RTC layout, the API uses zero when you omit it. | |
pagamento_parcelado_antecipado | number | 1 | Installment or advance payment indicator (RTC) 1 - Yes | |
pis_cofins_retido | number | 1 | Withholding of PIS/COFINS. Optional in both versions of the São Paulo layout. This provider does not accept codes 1 and 2. 0 - PIS/COFINS/CSLL not withheld | |
ncm | string | 8 | NCM code (product code) (RTC)00000000 | |
codigo_pais_prestacao | string | 1-4 | Numeric code of the country where the service is provided (BACEN, Central Bank list) (RTC). Accepted only for exports (tipo_tributacao = P). The API requires a location for taxation outside São Paulo. When you send the state (UF) and the city together, they take precedence over this code. | |
uf_local_prestacao | string | 2 | State (UF) where the service is provided (RTC)Required when you send cidade_local_prestacao. | |
cidade_local_prestacao | string | 1-40 | City where the service is provided (RTC)Required when you send uf_local_prestacao. | |
valor_recebido | string | 13v2 | Total amount received in R$ for the service provided. A positive value is allowed only for services under subitems 10.08, 33.01 or 17.11 of the city register. It must be greater than or equal to valor_servicos and cannot coexist with positive deducoes. Zero is treated as not sent. | |
carga_tributaria | string | 3v2 | Tax burden percentage0.00 | |
fonte_carga_tributaria | string | 1-10 | Source of the tax burden figureIBPT |
Fields specific to issuing with the SIGISS provider, in addition to the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 3-4 | Service code0000 | |
tributacao | number | 1 | Taxation type 1 - Taxed at the service provider |
Fields specific to issuing with the Sigissweb provider, in addition to the fields in RPS information:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
codigo_nbs | string | 9 | NBS code (Brazilian Nomenclature of Services)Required for the city of Valinhos-SP |
Besides the intermediary parameters, you can also send the following parameters when issuing:
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
ie | string | 1-20 | IE (Inscrição Estadual, state registration) of the intermediary | |
uf | string | 2 | State (UF) of the intermediary | |
endereco | string | 1-60 | Street address of the intermediary | |
cep | string | 8 | CEP (postal code) of the intermediary | |
cidade | string | 1-40 | City of the intermediary | |
bairro | string | 1-40 | Neighborhood of the intermediary | |
numero | string | 1-10 | Street number of the intermediary address | |
complemento | string | 1-60 | Address complement of the intermediary |
Fields specific to issuing with the Thema provider, in addition to the fields in RPS information:
| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
codigo_servico | string | 5 | Service code00.00 | |
codigo_cnae | string | 7 | CNAE code (economic activity code) | |
codigo_tributacao_municipio | string | 1-20 | City tax code | |
uf_local_prestacao | string | 2 | State (UF) where the service is provided | |
cidade_local_prestacao | string | 1-20 | City where the service is provided | |
natureza_operacao | number | 1-2 | Natureza da operação (nature of the transaction) code Services provided in the city: |
The tax reform creates IBS (Imposto sobre Bens e Serviços, the state and city goods and services tax) and CBS (Contribuição sobre Bens e Serviços, the federal goods and services tax). Both now appear on the NFS-e (service invoice), next to ISS (the city service tax). This section shows how to adapt your integration: what to send for each provider, the new fields and the changes to the national standard NFS-e (Padrão Nacional).
In practice, how you adapt your integration depends mainly on the provider of your city: the system the city hall uses to authorize NFS-e. It is shown in the field modelo of the endpoint /2/nfse/status.
modelo = padrao_nacional: send impostos.iss when it applies to the taxation of the service. The API accepts the rate, and the indicator servico.tributacao_iss does not replace it. Use the national standard fields in servico (e.g. tributacao_iss, consumidor_final, cod_indicador_operacao). In the taxes, include cst_pis_cofins (when applicable) and ibs_cbs.impostos.iss as the city requires. The new tax reform fields may be optional or unavailable. See the Providers section and the API response and errors.Key difference: impostos.iss is the ISS rate (a city tax). servico.tributacao_iss is the ISSQN (the full name of ISS) taxation indicator in the national standard.
Partial example - national standard (the rate impostos.iss must follow the applicable taxation):
{
"ambiente": 1,
"rps": [
{
"servico": {
"valor_servicos": "15.00",
"discriminacao": "Prestação de Serviço referente ao mês X",
"finalidade": 0,
"tributacao_iss": 1,
"consumidor_final": 1,
"cod_indicador_operacao": "100501",
"codigo_servico": "01.05.01",
"codigo_nbs": "115021000",
"natureza_operacao": 1,
"iss_retido": 2,
"impostos": {
"cst_pis_cofins": "00",
"ibs_cbs": {
"situacao_tributaria": "000",
"classificacao_tributaria": "000001"
}
}
},
"tomador": {...}
}
]
} Example - city provider (e.g. IPM) (send impostos.iss):
{
"ambiente": 1,
"rps": [
{
"servico": {
"valor_servicos": "15.00",
"discriminacao": "Prestação de Serviço referente ao mês X",
"codigo_servico": "01.05",
"natureza_operacao": 1,
"iss_retido": 2,
"impostos": {
"iss": "5.00"
}
},
"tomador": {...}
}
]
} | Tax regime | When filling in becomes mandatory |
|---|---|
| Lucro Real / Presumido (actual / presumed profit) | Required from January 1, 2026. |
| Simples Nacional / MEI (small business regime / individual micro-entrepreneur) | Mandatory only from 2027. |
The tax reform added new fields to the NFS-e issuing layout. The table below lists them:
To calculate IBS and CBS automatically, send situacao_tributaria and classificacao_tributaria in the object servico.impostos.ibs_cbs. You can also use a classe_imposto (Tax Class) that provides this data.
For more information and every available parameter, see the IBS/CBS section.
Whether the new fields are required or accepted can vary by city and provider. If your city does not use the national standard, see the Providers section and the response of the endpoint /2/nfse/status.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
finalidade | number | 1 | Purpose of the NFS-e issue. In the RTC validation (the rules of the consumption tax reform), the API sets this field automatically to 0 - Normal. The values 1 and 2 do not select a replacement or a complement.0 - Regular NFS-eSee Upcoming changes (preview). | |
tipo_operacao | number | 1 | Operation type. Optional, and allowed only for government purchases or for these services of the federal service list (LC 116/2003): 10.05; 15.09; 17.12; 25.05. With the São Paulo provider, the API checks the city codes and may fill in 1 automatically when it applies. In the national standard, types 2 and 3 require nfses_referenciadas.1 - Supply with later payment | |
consumidor_final | number | 1 | Indicates an operation for personal use or consumption0 - No | |
cod_indicador_operacao | string | 6 | Operation indicator code of the supply. See the spreadsheet (in Portuguese). | |
indicador_zfm_alc | number | 1 | Manaus Free Trade Zone / Free Trade Areas indicator (Zona Franca de Manaus / Áreas de Livre Comércio). When 1, cod_indicador_operacao must be one of the codes of Annex VI (NT 007).0 - No | |
indicador_destinatario | number | 1 | When 1, the group destinatario at the RPS level is required. See Recipient.0 - No | |
imovel | object | - | Real estate (property) information group. Required when cod_indicador_operacao starts with 02 (real estate operations: 020101, 020201, 020301) and the service is NOT construction. See Real estate. Changes in the national standard from Dec 7, 2026. | |
outras_informacoes | string | 1-2000 | Additional information of the invoice — tax reform. | |
condicao_pagamento | object | - | Payment terms at the RPS level, if the provider supports them. Subfields: condicao (string), qtd_parcela (int), parcelas[] (array of objects with data_vencimento and valor). | |
nfses_referenciadas | array | 0-99 | List of referenced NFS-e (send the access key). In the national standard, it is required when tipo_operacao is 2 or 3, and it references the NFS-e of the original operation. It is also used to issue a replacement or complementary invoice. | |
ente_governamental | object | - | Identifies the public entities that take part, when applicable. | |
destinatario | object | - | Recipient of the operation at the RPS level. Required when servico.indicador_destinatario = 1. Do not send it when the indicator is 0. | |
reembolso_repasse | object | - | Reimbursement/pass-through information that counts in the tax base of ISSQN, IBS and CBS. In the national standard, from Dec 7, 2026, see Tax base adjustment. |
From Dec 7, 2026, invoices issued through the Padrão Nacional provider follow new rules. The sandbox (homologação, the test environment) already has them, so you can test your integration before that date. The changes apply only to the national standard provider; other city providers are not affected. To find your city's provider, see the field modelo of the endpoint /2/nfse/status and the section Providers › National standard.
The same JSON you send today is still accepted, and the API adapts it to the new invoice format. You only need to adjust your integration if you:
| Change | Sandbox | Production |
|---|---|---|
| Real estate, movable goods, tax base adjustment, new service codes and operation indicator codes, foreign trade and event activities | Available for testing | From Dec 7, 2026 |
| Upcoming changes (Simples Nacional, credit/debit invoices, donations, linked payments and others) | Not accepted by the national standard yet | No date set |
Until Dec 7, 2026, in production, the API rejects the new fields (imovel.locacao, imovel.unidades[], servico.bens_moveis[], servico.ajuste_base_calculo and the new foreign trade and event fields) and the new service codes. Use them only in the sandbox until that date.
| Your situation | What to do from Dec 7, 2026 | Details |
|---|---|---|
| NFS-e without a property, without deduction/reimbursement and without the new codes | Nothing. Keep sending it as you do today. | - |
| Property with a Brazilian address and a CEP (postal code) | Nothing. Still accepted; the API finds the city from the CEP. | Real estate |
| Property identified by the CIB (Brazilian real estate registry code) | Also send imovel.codigo_municipio when there is no CEP. | Real estate |
| Property identified only by its city property registration (inscrição imobiliária) | No longer accepted. Add the CIB (with the city) or the Brazilian address; the registration becomes complementary. | Real estate |
| Property with an address abroad | No longer accepted. The national standard does not accept a property outside Brazil. | Real estate |
| Lease, paid assignment or leasing of real estate (99.03.xx) | Send imovel.locacao with the co-ownership percentage and the total amount of the operation. | Lease |
| More than one property on the same invoice | Use the list imovel.unidades[]. | Units |
| Lease of movable goods (99.04.01) | Send servico.bens_moveis[] together with impostos.ibs_cbs. | Movable goods |
Deduction/reduction or reimbursement/pass-through with documentos | Send valor_total in each document (and data_competencia for a deduction/reduction). Deduction types 1 and 4, and city or non-tax documents, must go in the group ajuste_base_calculo. | Tax base adjustment |
Deduction/reduction by percentual or valor | Nothing. Still accepted and converted automatically. | Tax base adjustment |
| Foreign trade with an import or export declaration, a commercial invoice or a foreign exchange contract | Send numero_duimp or numero_due according to movimento_temporario_bens. When they exist, also send numero_fatura, valor_fatura and numero_contrato_cambio. numero_di and numero_re are no longer used. | Foreign trade |
| Services of subitem 17.10 (events) | Send atividades_evento. In subitems 12.13 and 17.10, you can send the city of the event in atividades_evento.codigo_municipio. | Events |
Example — property identified only by the CIB: today
{
"imovel": {
"codigo_cib": "12345678"
}
} From Dec 7, 2026, also send the city of the property:
{
"imovel": {
"codigo_cib": "12345678",
"codigo_municipio": "3550308"
}
} Example — property identified only by its city property registration: today
{
"imovel": {
"inscricao_imobiliaria": "001234"
}
} From Dec 7, 2026, add the Brazilian address (or the CIB with the city):
{
"imovel": {
"inscricao_imobiliaria": "001234",
"endereco": "Av. Paulista",
"numero": "1000",
"bairro": "Bela Vista",
"cep": "01310100"
}
} Available in the sandbox and, from Dec 7, 2026, in production.
| Code | Description | Note |
|---|---|---|
99.02.01 | Operations with intangible goods not classified in earlier items | - |
99.03.01 | Lease of real estate | Requires imovel.locacao |
99.03.02 | Paid assignment of real estate | |
99.03.03 | Leasing (arrendamento) of real estate | |
99.03.04 | Easement, or assignment of use or of space, of real estate (when not subject to ISSQN) | |
99.03.05 | Permission of use or right of way over real estate (when not subject to ISSQN) | |
99.04.01 | Lease of movable goods | Requires servico.bens_moveis[] |
Code 99.05.01 (condominium operations) is not available yet.
New values accepted in cod_indicador_operacao, available in the sandbox and, from Dec 7, 2026, in production. The current codes remain valid.
| Code | Description |
|---|---|
010202 | Purchase of a motor vehicle at a government auction of seized or abandoned goods, or at a court auction |
020102 | Operation with real estate, or with intangible movable goods (including rights), related to real estate with special characteristics (BICE) |
020202 | Service provided physically on real estate with special characteristics (BICE) |
020401 | Lease, sublease, leasing, right of way or permission of use of railways, highways, poles, cables, ducts and conduits of any kind (when subject to ISSQN) |
For the CSTs (situacao_tributaria) 400, 410, 620, 800, 810, 811 and 820, do not send cod_indicador_operacao, credito_presumido, situacao_tributaria_regular, classificacao_tributaria_regular or aliquota_diferimento. From Dec 7, 2026, these fields are rejected for these statuses.
Available in the sandbox and, from Dec 7, 2026, in production. The other foreign trade fields stay as they are today (see Providers › National standard › Foreign trade).
servico| Parameter | Type | Size | Description |
|---|---|---|---|
numero_duimp | string | 15 | Number of the Single Import Declaration (DUIMP). Required when movimento_temporario_bens = 2. |
numero_due | string | 14 | Number of the Single Export Declaration (DU-E). Required when movimento_temporario_bens = 3. |
numero_fatura | string | 1-20 | Commercial invoice number, digits only. |
valor_fatura | decimal | 15v2 | Commercial invoice amount. |
numero_contrato_cambio | string | 1-20 | Foreign exchange contract number, digits only. |
modo_prestacao = 5 | number | 1 | New value of the service delivery mode.5 - Consumption in Brazil and abroad at the same time |
ajuste_base_calculo. | string | 13v2 | Adjustment of the IBS and CBS tax base on exports (tributacao_iss = 3). Accepts a negative sign.E.g.: "-150.00" |
Until Dec 7, 2026, in production, the API rejects these fields and the whole group ajuste_base_calculo, and valor_servico_moeda is still required. From that date, and already in the sandbox, you may keep sending valor_servico_moeda, but it is no longer used.
Available in the sandbox and, from Dec 7, 2026, in production.
rps[].atividades_evento| Parameter | Type | Size | Description |
|---|---|---|---|
codigo_municipio | string | 7 | IBGE code of the city where the event takes place, in rps[].atividades_evento. Accepted only in subitems 12.13 and 17.10. It must differ from the city where the service is provided. |
Subitem 17.10 now requires atividades_evento, like item 12. | |||
Use the fields below to plan your integration. Names and rules may still change before release; we will let you know when they are available. The column If sent today shows what the API currently does if you send the field.
servico| Parameter | Type | Size | Description | If sent today |
|---|---|---|---|---|
regime_apuracao_ibscbs_sn | number | 1 | IBS and CBS calculation regime of a service provider (prestador) under Simples Nacional (ME/EPP, micro and small companies).1 - IBS and CBS calculated under Simples NacionalAfter the national standard confirms the rules, this field will probably move to the company settings, with no need to send it on each invoice. | Ignored |
The calculation regime will be required for service providers under Simples Nacional (ME/EPP). It will not be accepted for an MEI (individual micro-entrepreneur) or for a company outside Simples Nacional.
servico| Parameter | Type | Size | Description | If sent today |
|---|---|---|---|---|
finalidade = 1 or 2 | number | 1 | Issue of an adjustment invoice.1 - Credit NFS-e | Ignored (treated as 0) |
tipo_credito | number | 1-2 | Type of the credit NFS-e, required with finalidade 1.01 - Fines and interest | Ignored |
tipo_debito | number | 1-2 | Type of the debit NFS-e, required with finalidade 2.01 - Credit transfer to cooperatives | Ignored |
impostos.ibs_cbs.ajuste | object | - | IBS (valor_ibs) and CBS (valor_cbs) amounts of the adjustment, with up to two decimal places. Required for debit types 01, 02, 03 and 05 and for credit type 05; not accepted for the other types. | Ignored |
servico| Parameter | Type | Size | Description | If sent today |
|---|---|---|---|---|
indicador_doacao | number | 1 | Indicates a donation. Required with the cClassTrib codes 410003 and 410026.1 - Donation | Ignored |
impostos.ibs_cbs.estorno_credito | object | - | Reversal of IBS (valor_ibs) and CBS (valor_cbs) credit on a donation. Required only with the classification 410026 and indicador_doacao 1. Each amount must be lower than valor_servicos. | Ignored |
servico.pagamentos_vinculados[] (1 to 99 items, requires impostos.ibs_cbs)| Parameter | Type | Size | Description | If sent today |
|---|---|---|---|---|
n_pag | integer | 1-999 | Payment number, unique in the list. | Ignored |
id_transacao | string | 2-35 | Transaction identifier, unique in the list. | |
tp_meio_pagamento | string | 2 | Payment method (Pix is the instant payment system of the Brazilian Central Bank).15 - Boleto (bank payment slip) | |
cnpj_recebedor | string | 14 | CNPJ (company ID) of the payee, with valid check digits. | |
cnpj_base_psp | string | 8 | Root of the CNPJ of the payment institution, alphanumeric. |
| Change | Description | Today |
|---|---|---|
| PIS/COFINS withholding | When pis_cofins_retido is not sent, it will become 0 (PIS/COFINS/CSLL not withheld) or 8 (only CSLL withheld, when there is CSLL). PIS and COFINS are federal revenue taxes; CSLL is a federal tax on profit. A value you send is still respected. | If missing, treated as 2 (PIS/COFINS not withheld) |
| Real estate lease adjustments | The limit of adjustments per property (imovel.ajustes[] and unidades[].ajustes[]) will drop from 1,000 to 10. | Limit of 1,000 |
The São Paulo provider will accept the groups for tax base adjustment, foreign trade, donation, credit reversal and linked payments, with the same parameters as the national standard. It will also accept the country where the service result occurs. To find the city's provider, see the field modelo of the endpoint /2/nfse/status.
As with the national standard, the rules below are for planning your integration and may change before release; we will let you know when they are available. Until then, if you send these fields for São Paulo, the API ignores them and issues the invoice as it does today.
When the change is released, São Paulo will accept the groups of this section built for the national standard, subject only to the 6 São Paulo restrictions. The other invoice fields, such as codigo_servico, still follow the rules of the São Paulo provider. The only new parameter exclusive to São Paulo is codigo_pais_resultado.
| Change | Sandbox | Production |
|---|---|---|
| Tax base adjustment, foreign trade, donation, credit reversal, linked payments and country where the service result occurs | Not accepted by São Paulo yet | No date set |
After the release, the API will choose the group by the issue date of the invoice. Invoices issued up to Nov 30, 2026 stay in the reimbursement/pass-through group. They accept only the reimbursement types 101, 102, 103, 104 and 199, or 01, 02, 03, 04 and 99 in tipo_reembolso. Invoices issued from Dec 1, 2026 use the tax base adjustment group, with every type.
For most invoices in São Paulo, nothing will change: the JSON you send today will still be accepted. When the change is released, you will need to adjust your integration if you:
valor_total in each document (the API does not calculate this total from the applied amount) and the supplier name (fornecedor.nome or fornecedor_referenciado.nome) with up to 75 characters;impostos.ibs_cbs.classificacao_tributaria: also send classificacao_tributaria_regular;The rules of this subsection and the next ones will apply after the release.
servico.impostos.ibs_cbs; without this group, the API will reject the request. If a request with several RPS uses these fields, every RPS must be issued with IBS/CBS."10.50" or 10. For cents, use a string with a dot and up to two decimal places. JSON decimal numbers are not accepted.Each group below is documented in the national standard section, with the full list of fields, types and sizes. In São Paulo, the parameter names will be the same.
| Group | Parameters | Where to see the fields |
|---|---|---|
| Tax base adjustment | servico.ajuste_base_calculo.documentos[] | Tax base adjustment |
| Reimbursement/pass-through (current form) | servico.reembolso_repasse.documentos[]Still accepted. For invoices issued from Dec 1, 2026, it is converted automatically to the tax base adjustment. Up to Nov 30, 2026, it stays in the reimbursement/pass-through group. | Reimbursement/Pass-through |
| Foreign trade | modo_prestacao, vinculo_prestacao, tipo_moeda, valor_servico_moeda, mecanismo_apoio_comex_prestador, mecanismo_apoio_comex_tomador, movimento_temporario_bens and mdic, in servico | Foreign trade |
| Foreign trade (new fields) | numero_duimp, numero_due, numero_fatura, numero_contrato_cambio, valor_fatura and ajuste_base_calculo., in servico | Upcoming changes * |
| Donation and credit reversal | servico.indicador_doacao and servico.impostos.ibs_cbs.estorno_credito | Upcoming changes * |
| Linked payments | servico.pagamentos_vinculados[] | Upcoming changes * |
| Country where the service result occurs | servico.codigo_pais_resultado | Country where the service result occurs |
* Groups that are also in the national standard preview. In São Paulo, until they are released, the API ignores them.
The São Paulo city hall receives the invoice in its own layout and shares it with the national environment. This layout imposes only the restrictions below. On every other point, the national standard documentation applies. The fields are in servico, unless another path is shown.
| Parameter | In São Paulo |
|---|---|
ajuste_base_calculo.ajuste_base_calculo. | Not accepted. Send the adjustment through documentos. |
ajuste_base_calculo.reembolso_repasse. | Up to 75 characters (150 in the national standard). |
numero_faturanumero_contrato_ | Exactly 20 digits. The API does not pad the numbers with zeros. |
pagamentos_vinculados[]. | Only digits and uppercase letters, from 2 to 35 characters. The API does not convert lowercase letters. |
ajuste_base_calculo. | Does not accept a negative value. |
impostos.ibs_cbs. | Required when classificacao_ starts with 550. |
São Paulo will accept the groups of this section built for the national standard and within the restrictions above. In São Paulo, the API will not require the extra validations of the national standard; the city hall is responsible for them:
indicador_doacao accepts 0 or 1, and impostos.ibs_cbs.estorno_credito can be sent with any cClassTrib;mdic and valor_servico_moeda are optional (valor_servico_moeda is not sent to the city hall); modo_prestacao also accepts 5, and vinculo_prestacao also accepts 9;descricao is optional outside types 99 and 199, dfe_outro has no tax period restriction, doc_outro is accepted in every type and, for invoices issued from Dec 1, 2026, data_emissao and data_competencia are optional.| Parameter | Required | Type | Size | Description |
|---|---|---|---|---|
servico. | string | 1-4 digits | Numeric BACEN (Central Bank of Brazil) code of the country where the result of the service occurred. Optional. The API converts the code to the two-letter country code and rejects codes of countries that do not exist.E.g.: 2496 (United States), 6076 (Portugal), 639 (Argentina) |
Part of servico with one reimbursement document and the country where the service result occurs. The amounts are strings, and valor_total is sent. Also send the group impostos.ibs_cbs, left out of the example.
{
"valor_servicos": "1000.00",
"codigo_pais_resultado": "2496",
"ajuste_base_calculo": {
"documentos": [
{
"tipo": "199",
"descricao": "Reembolso de despesas pagas por conta do cliente",
"valor_total": "300.00",
"valor_aplicado": "300.00",
"data_emissao": "2026-11-20",
"data_competencia": "2026-11-20",
"dfe_nacional": {
"tipo_chave_dfe": 2,
"chave_dfe": "41261112345678000195550010000012341000012343"
}
}
]
}
} You can also send the same document in the current form, in reembolso_repasse.documentos[], with tipo_reembolso 99 and valor instead of tipo and valor_aplicado; the API converts it.
The XML and the PDF of each document are at the URLs returned in the response, in the lookup and in the notification. For security, Webmania restricts access to these files.
The tax document is protected with a password. It opens only after you confirm the CPF/CNPJ (tax ID) of the document recipient, or with one of the access methods below: Access credentials, Token, Issuing IP or Webmania® Panel.
Ways to access the files:
| Authentication | Access allowed | Password required? | Description |
|---|---|---|---|
Access credentials | ✅ | No | Send the company's access credentials in the request HEADER to access every tax document issued by the company. Authorization: Bearer YOUR_ACCESS_TOKEN |
Token | ✅ | No | Send the encrypted token in the URL to open the tax document for 24 hours without a password. Ideal for sharing a link.?token=[TOKEN]The token is not available for tax documents without a recipient. |
Issuing IP | ✅ | No | When you issue an invoice, the IP address of the computer or server is permanently registered as authorized. That IP can access every tax document issued by the companies it has access to. IPs authorized automatically |
Webmania® Panel | ✅ | No | When you log in to the Webmania® Panel, you can access every tax document issued by the companies of your account. Access lasts while you are logged in to the Webmania® Panel.Access while you are logged in |
No authentication | ❌ | Yes | When the URL is opened publicly, without authentication, the tax documents are protected with a password. To open them, enter the CPF/CNPJ of the document recipient (numbers only, no punctuation).PDF = password-protected PDF fileAccess without authentication is not available for tax documents without a recipient. |
To download the files to your server, use the Access credentials. To give your customer a link without a password, use the Token.
With the company's access credentials in the request header, you can download every tax document issued by the company.
To download a file, send a GET request to the URL of the XML or the PDF, with the credentials in the header. Example with the PDF:
curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
https://api.webmania.com.br/nfse/00000000-0000-0000-0000-000000000000The response is the file itself, as application/pdf or text/xml.
The token opens the XML and the PDF without a password for 24 hours, so you can share the link with your customer safely.
To share the file, generate the token encrypted with AES-256-CBC and send it in the token parameter of the file URL:
https://api.webmania.com.br/nfse/00000000-0000-0000-0000-000000000000?token=[TOKEN]The step-by-step guide to generate the token, with functions in PHP, Python, Java, C# and Ruby, is on the Webmania GitHub (in Portuguese): https://github.com/webmaniabr/DFeToken.
The lookup returns the current status of an NFS-e (service invoice), even while it is processando or contingencia. Use the notifications to follow your invoices day to day. Use the lookup to check one invoice when you need to.
To look up an invoice, send a GET request to /2/nfse/consulta/{identifier}. Replace {identifier} with the uuid or the ID (order number or processing ID) of the invoice.
curl -X GET \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
https://api.webmania.com.br/2/nfse/consulta/43eace5c-8008-4f6c-b830-b6d52d7ff90c The response follows the model and the state of the document. Empty fields may be left out. The NFS-e data, the PDFs and the log depend on the provider and on the processing. The response may include uuid, status, motivo, chave (access key of the NFS-e, when available), numero, codigo_verificacao, serie_rps, numero_rps, pdf_rps, pdf_nfse, pdf_nfse_status, xml and log.
Example HTTP 200 response for a single authorized invoice (not a batch):
{
"uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
"modelo": "nfse", // Invoice model (nfse, lote_rps)
"status": "aprovado", // Example state; during processing, the value can be processando
"motivo": "Autorizado o uso da NFS-e", // Reason for the status
"chave": "[chave_de_acesso]", // Access key of the NFS-e (when available)
"numero": "25000", // NFS-e number
"codigo_verificacao": "SFH-046", // Verification code of the NFS-e
"serie_rps": "A1", // RPS series
"numero_rps": "2000", // RPS number
"pdf_rps": "https://api.webmania.com.br/darps/[uuid]",
"pdf_nfse": "https://api.webmania.com.br/nfse/[uuid]", // City hall PDF of the NFS-e (when available)
"pdf_nfse_status": "processado", // processado, processando, indisponivel (when available)
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"log": {...}, // Response log from the city hall
"atualizado_em": "2024-01-01T12:00:00-03:00" // Time of the last status change
} Cancellation voids an authorized NFS-e at the city hall. It also stops a scheduled issue (agendamento: an invoice set to be issued on a later date) before it is sent. It is available for documents with the status agendado or aprovado. To issue a new invoice in place of an authorized one, use the replacement function below instead.
To cancel an invoice or a scheduled issue, send a PUT request to /2/nfse/cancelar with the uuid or the codigo_verificacao of the document. Send an ID that is not empty. If you send both, the codigo_verificacao takes precedence to find the document.
| Situation | What to send | What happens |
|---|---|---|
Scheduled issue (agendado) | The ID. The motivo (reason) is not required. | The scheduled issue is stopped. No cancellation request goes to the city hall. |
Authorized invoice (aprovado) | The ID and the motivo. The justificativa (justification) is optional. | A regular cancellation depends on the eligibility of the certificate, the city and the environment. |
| Simplified invoice | The ID. You may leave out motivo and justificativa. | It follows its own flow, with default values for the fields left out. It does not widen the reasons accepted in this request. |
In the initial validation, motivo and justificativa are optional. When you send them, they must follow the values and limits in the table below. Errors in this validation return HTTP 200 with the error field. Passing the validation or getting HTTP 200 does not prove the tax cancellation: check the status in the response body and the final status of the document.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
uuid | string | 36 | UUID of the NFS-e, with exactly 36 characters. Required when codigo_verificacao is missing or empty. | |
codigo_verificacao | string | - | Verification code of the NFS-e. Required when uuid is missing or empty. The validation sets no specific size limit; use the non-empty ID of the document. It takes precedence when you send both IDs. | |
motivo | number or string | 1 | Reason for the cancellation. Optional in the initial validation. Required for the regular cancellation of an authorized invoice. Not needed when you cancel only a scheduled issue. When sent, it accepts only the values below, as a number or a numeric string. The simplified flow has its own restrictions and does not widen these values. 1 - Issuing error | |
justificativa | string | 15-255 | Justification for the cancellation. Optional in the initial validation. When sent, it must have 15 to 255 characters. The specific requirements of the city or the provider still apply. |
Example request for the regular cancellation of an authorized invoice (replace the UUID and the token with those of your integration):
curl -X PUT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c",
"motivo": 1
}' \
https://api.webmania.com.br/2/nfse/cancelar Example HTTP 200 response for a completed cancellation. The actual response depends on the state of the document and on the processing result. When the cancellation of an authorized invoice is complete, Webmania also sends the notification cancelado. The cancellation of a scheduled issue is not notified.
{
"uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
"status": "cancelado",
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"log": {...} // Response log from the city hall
} Replacement (substituição) issues a new NFS-e in place of an invoice that was already issued, for example to fix an issuing error. The new invoice is a new document, with its own UUID. The response identifies the replaced invoice in nfse_substituida. The replaced invoice changes to cancelado, and Webmania sends its notification. This function depends on the provider: check that the funcoes field in City status includes substituir.
To replace an invoice, send a POST request to /2/nfse/substituir with the ambiente, the codigo_verificacao or the national chave (access key) of the invoice to replace, the motivo and the rps array of the new invoice.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
ambiente | number | 1 | Environment of the replacement issue. 1 - Production | |
codigo_verificacao | string | 1 or more | Verification code of the invoice to replace. Required when chave is not sent. | |
motivo | number | 1-2 | Reason for the replacement 1 - Issuing error | |
rps | array | 1-50 | Array of RPS objects for the replacement, subject to the restrictions of the provider. Each item must contain the data of the new NFS-e. | |
chave | string | 50 | National access key of the NFS-e to replace. Required when codigo_verificacao is not sent. | |
justificativa | string | 15-255 | Justification for the replacement. Required when motivo = 99. |
Example replacement request:
curl -X POST \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ambiente": 1,
"codigo_verificacao": "XXX-XXX",
"motivo": 1,
"rps": [
{
...
}
]
}' \
https://api.webmania.com.br/2/nfse/substituir Example HTTP 200 response for an authorized replacement:
{
"uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
"status": "aprovado",
"numero": "340",
"codigo_verificacao": "XXX-XXX",
"serie_rps": "A2",
"numero_rps": "99",
"nfse_substituida": {
"uuid": "8f54e040-4344-4169-a9e7-daacd35bcfb1",
"numero": "95",
"codigo_verificacao": "XXX-XXX",
},
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"log": {...} // Response log from the city hall
} Acknowledgment (manifestação) is available only in the national standard (Padrão Nacional). It lets the service buyer (tomador) or the intermediary confirm or reject their participation in an NFS-e issued against them. It depends on the eligibility of the city and of the certificate for the national standard.
To acknowledge participation, send a PUT request to /2/nfse/manifestar with the parameters in the table below.
ambiente, chave, manifestador and evento.motivo_rejeicao is required only with evento = 2.justificativa_rejeicao is required whenever motivo_rejeicao = 9, even if you send that reason with evento = 1.Even on a confirmation, the current processing still reads both rejection fields, and it has not been confirmed that the request succeeds when either of them is left out. Errors in the initial validation return HTTP 200 with the error field. Passing the validation or getting HTTP 200 does not prove that the tax event was recorded: check the response body and the final result.
| Parameter | NFS-e | Type | Size | Description |
|---|---|---|---|---|
ambiente | number or string | 1 | Environment where the NFS-e was issued. Accepts the values below as a number or a numeric string. 1 - Production | |
chave | string | 50 | National access key of the NFS-e you acknowledge. This field does not accept a UUID. | |
manifestador | number or string | 1 | Role of the party that acknowledges the NFS-e. Accepts the values below as a number or a numeric string. 1 - Service buyer | |
evento | number or string | 1 | Type of acknowledgment event. Accepts the values below as a number or a numeric string. 1 - Confirmation | |
motivo_rejeicao | number or string | 1 | Reason for rejecting participation in the NFS-e. Required only when evento = 2 (rejection). When sent with any event, it accepts only the values below, as a number or a numeric string. 1 - Duplicate NFS-e | |
justificativa_rejeicao | string | 15-255 | Justification for rejecting participation in the NFS-e. Required when motivo_rejeicao = 9 (Other), even if you send that reason with evento = 1. In other cases it is optional. When sent, it must have 15 to 255 characters. |
Example confirmation request by the service buyer, in the sandbox (test environment): manifestador: 1 identifies the service buyer, and evento: 1 requests the confirmation. The validation accepts the request without the rejection fields. Replace the key and the token with those of your integration.
curl -X PUT \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ambiente": 2,
"chave": "00000000000000000000000000000000000000000000000000",
"manifestador": 1,
"evento": 1
}' \
https://api.webmania.com.br/2/nfse/manifestar Example HTTP 200 response for an approved acknowledgment. It does not prove that the request above, without the rejection fields, was processed successfully. Check the actual result returned by the API:
{
"uuid": "43eace5c-8008-4f6c-b830-b6d52d7ff90c", // Unique ID
"modelo": "manifestacao_nfse",
"status": "aprovado",
"motivo": "Manifestação aprovada com sucesso.",
"chave": "00000000000000000000000000000000000000000000000000",
"xml": "https://api.webmania.com.br/xmlnfse/[uuid]",
"log": {...} // Response log
} The service invoice can be issued synchronously or asynchronously, depending on the city provider. A batch with several RPS can also be processed synchronously when the provider offers that mode. The nfse or lote_rps model does not guarantee immediate authorization.
Webmania® detects automatically when the provider has not returned the result yet or is offline. It follows the invoice until the result, and your application does not need to send anything again:
| Situation | Status | What Webmania does |
|---|---|---|
| The provider received the invoice, but processes it asynchronously or has not returned the result yet | processando | Checks with the provider at increasing intervals until it gets the result. |
| Communication with the provider failed during sending | processando | Tries to send it again automatically. |
| The provider is still offline after the first attempts | contingencia | Keeps the invoice in contingency mode and keeps trying automatically until the provider responds. |
processando or contingencia, follow the invoice through the lookup or the notification, without resending the same request.The final result, aprovado or reprovado, arrives by notification and is available in the lookup. While the status is processando or contingencia, wait for the result before you send the same request again.
The Webmania® API runs on Amazon AWS, the global leader in cloud computing, in the us-east-1 region (US East), with a point of presence in sa-east-1 (São Paulo). The entry point is anycast and highly available: from anywhere in the world, your request goes to the server closest to you.
The same entry IPs serve the whole world. Your request goes to the server closest to you, with no setup on your side.
us-east-1 (US East) and sa-east-1 (São Paulo). Keep your infrastructure close to one of them for a shorter response time.
Fixed IPs for inbound and outbound traffic: allow them in your firewall and check the source of the notifications you receive.
13.248.145.9076.223.17.24034.196.69.3844.219.142.86The Webmania® API limits the number of requests per second to keep every integration stable and fast. Each limit is counted per second, separately for each HTTP method and each endpoint.
Reading: lookups and lists.
Creating: issuing and other submissions. See the specific limits below.
Changing and removing resources.
Some endpoints have a lower limit, which applies instead of the method's limit:
| Request | Limit | Reason |
|---|---|---|
| Issuing in the sandbox (homologação) | 1 request per second | Test environment for your integration. |
Need a higher request volume? Contact us and we will review it.
A request over the limit is refused with HTTP 429 (Too Many Requests) before it is processed. Nothing is issued, changed or canceled, and you can safely resend the same request.
| Header | Example | Description |
|---|---|---|
Retry-After | 1 | Seconds to wait before you resend the request. If the response does not include this header, wait 1 second. |
Example of an HTTP 429 response. The API sends the message in Portuguese; it means “Request limit reached. Try again in a few seconds.”:
{
"error": "Limite de requisições atingido. Tente novamente em alguns segundos."
}
429, not by the text of the error field: the message can change from one endpoint to another.Retry-After header, or 1 second if the header is missing.Receive the API results at your notification URL instead of polling in a loop. When a result arrives, update your database and download the PDF and the XML.
Spread your requests through a queue that respects the per-second limit of each method, instead of sending everything at once.
The endpoints require valid access credentials in the request header. Sending them incorrectly is treated as misuse of the API.
By default, the firewall blocks servers in regions with a high rate of attacks or a poor reputation. If a GET to https://webmania.com.br/api/ or https://api.webmania.com.br returns 403 Forbidden by mistake, contact us and we will allow your IP.
Foreign trade in the national standard (Padrão Nacional): valor_servico_moeda is back in the documentation, required in production until December 7, 2026. The main example now works in production and in the sandbox; the example with DU-E, commercial invoice and foreign exchange contract is now separate.
Changed sections: provedores-padrao-nacional-comercio-exterior, mudancas-nfse-padrao-nacional
Foreign trade (DUIMP, DU-E, commercial invoice, foreign exchange contract and service mode 5) and the city of the event now apply in the national standard: already in the sandbox, and in production from December 7, 2026, the new date of all the provider's changes. valor_servico_moeda, numero_di and numero_re are removed from the documentation.
Changed sections: mudancas-nfse-padrao-nacional, provedores-padrao-nacional-comercio-exterior, informacoes-atividades-eventos
Documented the upcoming changes to the São Paulo NFS-e, not released yet: tax base adjustment, foreign trade, donation, credit reversal, linked payments and country of the service result, with the same parameters as the national standard.
Changed section: mudancas-nfse-sao-paulo-rtc
The nfses_referenciadas parameter now states that it is required in the national standard when tipo_operacao is 2 or 3, and the description of tipo_operacao mentions this requirement.
Changed section: reforma-tributaria-nfse
The processing section now has a flowchart from the request to the final result, and it explains the contingencia status when the provider is unavailable.
Changed section: processamento
The documentation is now LLM-ready: copy the page or each section as Markdown, a section index and llms.txt.