Create and update tax information

Endpoint used to create or update the account's fiscal settings for invoice issuance.

This endpoint gathers both company information and the authentication data required by the municipality. Mandatory fields may vary depending on the municipality, so it is important to first query the municipal settings endpoint to identify which information must be provided.

Main request parameters

  • email - Email used by Asaas to send notifications and alerts related to invoices.

  • municipalInscription - Company's municipal registration number.

  • simplesNacional - Indicates whether the company is enrolled in the Simples Nacional tax regime.

  • culturalProjectsPromoter - Indicates whether the company is classified as a cultural incentive promoter.

  • cnae - CNAE code of the activity performed.

  • specialTaxRegime - Identifier of the special tax regime. Must be provided when required by the municipality.

  • serviceListItem - Service list item. Must be provided when required by the municipality.

  • nbsCode - NBS code of the activity. It may be required by the municipality or in specific scenarios, such as import or export services.

  • rpsSerie - RPS series used by the company.

  • rpsNumber - Next RPS number to be used. If the last invoice issued in the municipality used RPS 100, this field must be filled with 101.

  • loteNumber - Next batch number to be used, when the municipality requires batch control.

  • username - Username used to access the municipality portal.

  • password - Password used to access the municipality portal.

  • accessToken - Access token for the municipality portal, when this is the required authentication method.

  • certificateFile - Digital certificate file, when the municipality requires certificate-based authentication.

  • certificatePassword - Password for the uploaded digital certificate.

  • nationalPortalTaxCalculationRegime - Identifier of the tax calculation regime in the context of the National Portal. Should only be filled when applicable.

How to use this endpoint

The behavior of the request depends on the municipality requirements.

Examples:

  • if authenticationType is USER_AND_PASSWORD, it will usually be necessary to send username and password
  • if authenticationType is TOKEN, it will usually be necessary to send accessToken
  • if authenticationType is CERTIFICATE, it will usually be necessary to send certificateFile and certificatePassword
🚧

Attention

Mandatory fields vary according to the municipality rules of the account.

  • It is recommended to first query the municipal settings endpoint before sending this request.
  • Sending incorrect information may prevent invoice issuance.
  • Some municipalities require specific authentication methods, such as digital certificates, tokens, or username and password.

If the configuration is correct, the account will be enabled for invoice issuance.

Auxiliary fields returned by the API

Some fields returned by the municipal settings endpoint contain the suffix Help. These fields must not be sent in the request. Their purpose is to guide the correct completion of fiscal information according to the municipality rules.

  • specialTaxRegimeHelp - Explanatory text with guidance about the special tax regime required by the municipality.

  • serviceListItemHelp - Instructions about the expected format and value for the service list item.

  • digitalCertificateHelp - Guidance about the digital certificate required by the municipality, including format and requirements.

  • accessTokenHelp - Instructions on how to obtain or provide the authentication token required by the municipality.

  • municipalServiceCodeHelp - Explanation about the format and completion of the municipal service code.

  • municipalInscriptionHelp - Guidance about the municipal registration format required by the municipality.

📘

To better understand which fields are mandatory and what should be informed in each field for the integration with your municipality's city hall, query the municipal settings endpoint in List municipal settings.

Body Params
string
required

Email used by Asaas to send invoice notifications and alerts

string

Company municipal registration

boolean
required
Defaults to true

Indicates whether the company opts for the simple national system

boolean
Defaults to true

Identifies whether the company is classified as a cultural promoter

string

CNAE code

string

Special taxation regime identifier

string
string

NBS Code (Brazilian Nomenclature of Services). It must be included on the NFS-e (Electronic Service Invoice) when required by the municipal government and/or for import or export services. Check with your local government or your accounting department to determine whether this information is necessary.

string

Serial Number used by your company to issue invoices. For NFSe on the national standard, the series must follow the authentication method: Digital certificate (00001 to 49999) or Username and password (80000 to 89999). For municipal issuance, in most cities the serial number used is '1' or 'E'

int32

RPS number used on the last invoice issued by your company. If your last NF issued has an RPS equal to '100', this field must be filled in with '101'. If you have never issued invoices through your city hall's website, enter '1' in this field

int32

Batch number used on the last invoice issued by your company. If the last lot used in your city hall is '25', this field must be filled in with '26'. Only enter this field if your city hall requires the use of lots

string

User to access your city's city hall website

string

Password to access the city hall website

string

Token for access to the city hall website (If access to your city hall website is via Token)

file

File

string

Password for the digital certificate sent (If access to your city hall website through a digital certificate)

string

Identifier of the tax calculation regime. It must only be completed by companies classified as ME or EPP opting for Simples Nacional. Consult the need for this information with your city hall or accounting department.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json