Core APIs
Companies
7 endpoints
/api/company/createRegister a new issuing company
Registers an issuing company under a distributor (b2b) account. Use this endpoint when company data is already available. For automatic extraction from the digital certificate, use /api/company/v2/create.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Distributor token (b2b — the account must have isb2b=true) |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| Identification | ||
| cnpj * | string | Issuing company CNPJ |
| name * | string | Company name |
| ie * | string | State Registration (Inscrição Estadual) |
| invoice_type * | string | Tax regime (e.g., "simples_nacional", "normal") |
| unit * | string | Unit type |
| string | Company email | |
| Address | ||
| cep * | string | ZIP code |
| address * | string | Street address |
| house_number * | string | Address number |
| town * | string | Neighborhood |
| city * | string | City |
| state * | string | UF (state abbreviation) |
| Digital certificate | ||
| cert_content * | string | Contents of the A1 certificate file (.pfx/.p12), Base64-encoded |
| cert_file | string | Deprecated — rejected from 2026-09-01. Certificate HTTPS URL |
| cert_pwd * | string | Certificate password |
| Numbering and settings | ||
| serie * | int | NF-e series |
| number * | int | Initial number for numbering |
| Transport (MDF-e / CT-e / DC-e) | ||
| serie_mdfe | int | MDF-e series |
| number_mdfe | int | MDF-e starting number (where numbering begins) |
| serie_cte | int | CT-e series |
| number_cte | int | CT-e starting number (where numbering begins) |
| serie_dce | int | DC-e series |
| number_dce | int | DC-e starting number (where numbering begins) |
| Communication (NFCom) | ||
| serie_nfcom | int | NFCom series |
| number_nfcom | int | NFCom starting number (where numbering begins) |
| Energy (NF3e) | ||
| serie_nf3e | int | NF3e series |
| number_nf3e | int | NF3e starting number (where numbering begins) |
| is_create_category_template | boolean | Auto-create default tax categories. Default: true |
* Required field.
/api/company/v2/createRegister company by certificate
Simplified version of /api/company/create: the API validates the digital certificate and automatically extracts company name, IE, address and other data via internal lookup. Only cnpj, cert_content and cert_pwd are required.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Distributor token (b2b — the account must have isb2b=true) |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| cnpj * | string | Issuing company CNPJ |
| cert_content * | string | Contents of the A1 certificate file (.pfx/.p12), Base64-encoded |
| cert_file | string | Deprecated — rejected from 2026-09-01. Certificate HTTPS URL |
| cert_pwd * | string | Certificate password |
| is_create_category_template | boolean | Auto-create default tax categories. Default: true |
* Required field.
/api/company/editEdit company data
Updates issuing company data. Send only the fields you want to change — all except company_id are optional. CNPJ is immutable: sending it returns an error. When cep is updated, the system automatically resolves stateCode and ibge. When cert_content and cert_pwd come together, the certificate is validated before being saved.
The company is created with the NF-e configuration (via /api/company/create). To enable the other documents, complete the setup here: this endpoint also accepts the NFC-e, NFS-e, MDF-e, CT-e and DC-e fields (see the sections below). Send only the fields for the document(s) the company will issue.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Body
| Field | Type | Description |
|---|---|---|
| company_id * | string | ID of the company to edit |
| name | string | Company name |
| invoice_type | string | Tax regime |
| ie | string | State Registration |
| unit | string | Unit type |
| string | ||
| cep | string | ZIP code (auto-updates stateCode and ibge) |
| address | string | Street address |
| house_number | string | Number |
| town | string | Neighborhood |
| city | string | City |
| state | string | UF |
| cert_content | string | Contents of the A1 certificate file (.pfx/.p12), Base64-encoded |
| cert_file | string | Deprecated — rejected from 2026-09-01. Certificate HTTPS URL |
| cert_pwd | string | New certificate password |
| serie | int | New NF-e series |
| number | int | New initial number |
| alias | string | Trade name |
| telefone | string | Phone |
| complemento | string | Address complement |
| NFC-e | ||
| csc_id | string | CSC (Taxpayer Security Code) ID at the tax authority |
| csc | string | CSC token (shared secret with the tax authority) |
| serie_nfce | int | NFC-e series |
| number_nfce | int | Initial NFC-e number |
| NFS-e | ||
| im | string | Municipal registration (Inscrição Municipal) |
| codigo_municipio_nfse | string | IBGE code of the issuing municipality |
| codigo_servico_nfse | string | Default service code (LC 116) |
| cnae_nfse | string | Default activity CNAE |
| serie_nfse | int | Initial NFS-e series |
| number_nfse | int | Initial NFS-e number |
| regime_especial_tributacao | int | Special tax regime code |
| optante_simples_nacional | bool | Opting in to Simples Nacional |
| Transport (MDF-e / CT-e / DC-e) | ||
| serie_mdfe | int | MDF-e series |
| number_mdfe | int | MDF-e starting number (where numbering begins) |
| serie_cte | int | CT-e series |
| number_cte | int | CT-e starting number (where numbering begins) |
| serie_dce | int | DC-e series |
| number_dce | int | DC-e starting number (where numbering begins) |
| Communication (NFCom) | ||
| serie_nfcom | int | NFCom series |
| number_nfcom | int | NFCom starting number (where numbering begins) |
| Energy (NF3e) | ||
| serie_nf3e | int | NF3e series |
| number_nf3e | int | NF3e starting number (where numbering begins) |
* Required field. Sending cnpj returns an error. All other fields are optional — send only the ones you want to change.
/api/company/get_listList distributor companies
Lists issuing companies tied to the distributor (b2b) account, with pagination. Parameters via query string.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Distributor token (b2b — the account must have isb2b=true) |
| sign | string | MD5 signature (path includes the query string) |
| timestamp | string | Unix timestamp in seconds |
Query string
| Parameter | Type | Description |
|---|---|---|
| page * | int | Page number (≥ 1) |
| page_size * | int | Page size (1–20) |
* Required field.
/api/company/get_detailDetails of the authenticated company
Returns the complete data of the company identified by the token header, including the list of registered tax categories. Accepts no body or query string.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
/api/company/get_cep_detailLook up address by CEP
Resolves a Brazilian CEP (ZIP code) returning UF, IBGE municipality code and address data. Useful for filling in company and customer addresses. Requires a distributor (b2b) account.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Distributor token (b2b — the account must have isb2b=true) |
| sign | string | MD5 signature (path includes the query string) |
| timestamp | string | Unix timestamp in seconds |
Query string
| Parameter | Type | Description |
|---|---|---|
| cep * | string | Brazilian CEP (8 digits, with or without dash) |
* Required field.
/api/company/get_export_invoice_month_filesList monthly export files
Returns the list of monthly export files that have already been generated for the company in the current year (timezone America/Sao_Paulo). Each month can have up to 4 files: 1 Excel spreadsheet (status Success only) + 3 XMLs (one per status Success, Canceled and Voided). Only files actually exported appear in the response — use /api/invoice/get_xml to generate new ones.
Required headers
| Header | Type | Description |
|---|---|---|
| token | string | Company token |
| sign | string | MD5 signature |
| timestamp | string | Unix timestamp in seconds |
Response
| Field | Type | Description |
|---|---|---|
| files[] | array | List of available files |
| files[].url | string | File URL on OSS |
| files[].year | int | Period year |
| files[].month | string | Month (1–12) |
| files[].type | string | File type: "xlsx" or "xml" |
| files[].status | string | Status of the invoices in the file: "Success", "Canceled" or "Voided" |
| files[].create | datetime | When the file was generated |