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
authenticationTypeisUSER_AND_PASSWORD, it will usually be necessary to sendusernameandpassword - if
authenticationTypeisTOKEN, it will usually be necessary to sendaccessToken - if
authenticationTypeisCERTIFICATE, it will usually be necessary to sendcertificateFileandcertificatePassword
AttentionMandatory 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.
