Swagger UI openapi.json openapi.yaml

No models match.

Model

Account

accounts

A user account on the platform — the human who logs in via email/password and owns one or more Businesses.

Represents a person authenticated through the access service. Holds personal data (name, email, phone, locale), authentication state (has-password, is-validated) and is the root of permission grants for every Business the user belongs to.

Attributes 17
FieldTypeInfo
email string
name string
phone-number string | null
phone-country string | null
tax-number string | null
locale string pt-BR | en
has-password boolean
is-validated boolean
mobile-token string | null
birthday string | null
extra object | null
source string | null
terms object | null
personal-data object | null
account-type string | null personal | shared | admin | sales | accounting
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
businesses Business has_many
Used by endpoints 2
Model

AccountFiscalEntity

account-fiscal-entities

Resource of type AccountFiscalEntity.

Attributes 21
FieldTypeInfo
name string
email string | null
address string | null
status string waiting_setup | waiting_update | failed | active | inactive
document-type string
tax-number string
tax-country string
tax-data object | null
emission-status string | null active | inactive | missing_setup | missing_auth | missing_validation
certificate-expiration-date string | null
das-paid-by string | null
status-pass-govs string none | validating | succeeded | failed
status-pass-invoices string none | validating | succeeded | failed
status-certificate string none | validating | succeeded | failed
has-pass-gov boolean
has-pass-invoices boolean
has-certificate boolean
created-at string
updated-at string
created-by string | null
updated-by string | null
Relationships 1
NameTypeKindInfo
account Account has_one
Used by endpoints 4
Model

AccountType

account-types

Resource of type AccountType.

Attributes 1
FieldTypeInfo
name string
Embedded Object

Address

embedded

Physical address with country, state, city, neighborhood, street, number, zipcode, and complement.

Used as an embedded object in FiscalEntity schemas (e.g. address field on ProfessionalFiscalEntity, BusinessFiscalEntity). Fields: country (2-letter ISO), state, city, neighborhood, street, street-number, zipcode, complement. The Go struct is SimpleAddress from go-common/models/address.go.

Attributes 8
FieldTypeInfo
country string
state string
city string
neighborhood string
street string
street-number string
zipcode string
complement string
Model

Business

businesses

A salon or beauty business owned by an Account — the tenant boundary identified by the ilm-business header.

Represents a salon, studio, or independent professional registered as a tenant. Almost every other resource (Professionals, Invoices, Schedules, Fiscal Entities) is scoped to a Business. The numeric id appears in the ilm-business header and in nested URLs like /businesses/{businessId}/….

Attributes 12
FieldTypeInfo
name string
trading-name string | null
document string
document-type string cnpj
brand string required
culture string required
locale string pt-BR
timezone string required
permalink string | null
country-iso string required
immutable
created-at string
updated-at string
Relationships 6
NameTypeKindInfo
account Account has_one
category BusinessCategory has_one
week-schedule WeekSchedule has_one
professionals Professional has_many
professional-categories ProfessionalCategory has_many
settings BusinessSetting has_many
Used by endpoints 4
Model

BusinessCategory

business-categories

Resource of type BusinessCategory.

Attributes 2
FieldTypeInfo
name string
professional-categories array<object>
Used by endpoints 4
Model

BusinessFiscalEntity

business-fiscal-entities

The fiscal entity (CNPJ/CPF) owned by a Business — the issuer of invoices on the salon's behalf.

A SellerFiscalEntity scoped to a Business. Holds the salon's CNPJ, address, MEI registration data, digital certificate, and PassGov credentials used to talk to government services. The certificate_expiration_date attribute is sourced from the linked fiscal-entity-certificates.expiration_date row (single source of truth — updated automatically on certificate upload, absent when no active certificate is on file).

Attributes 20
FieldTypeInfo
name string
email string | null
address Address
countrystring
statestring
citystring
neighborhoodstring
streetstring
street-numberstring
zipcodestring
complementstring
status string waiting_setup | waiting_update | failed | active | inactive
document-type string
tax-number string
tax-country string
tax-data TaxData
fantasy-namestring
enterprise-typestring
enterprise-namestring
enterprise-tax-system TaxSystem
countrystring
is-meiboolean
is-simplesboolean
is-simples-intervalsarray<object>
situacao-cadastralobject
is-simples-start-datestring
is-simples-end-datestring
phone-countrystring
phone-numberstring
extra ExtraData
cnaestring
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-namestring
municipal-jurisdictionstring
cnaestring
rules TaxRules
uses-descricao-servicoboolean
uses-item-lista-servicoboolean
uses-codigo-servico-municipalboolean
uses-regime-especial-tributacaoboolean
serie-nfestring
codigo-nbsstring
aliquota-issnumber
razao-socialstring
nome-fantasiastring
codigo-ibge-ufstring
sequencial-nfestring
tipo-autenticacaointeger
codigo-ibge-cidadestring
inscricao-estadualstring
telefone-comercialstring
inscricao-municipalstring
sequencial-lote-nfestring
item-lista-servico-lcstring
municipal-jurisdictionstring
codigo-servico-municipalstring
optante-simples-nacionalboolean
codigo-tributacao-nacionalstring
regime-especial-tributacaostring
regime-especial-tributacao-labelstring
emission-status string active | inactive | missing_setup | missing_auth | missing_validation
certificate-expiration-date string | null
status-pass-govs string none | validating | succeeded | failed
status-pass-invoices string none | validating | succeeded | failed
status-certificate string none | validating | succeeded | failed
has-pass-gov boolean
has-pass-invoices boolean
has-certificate boolean
created-at string
updated-at string
created-by string | null
updated-by string | null
Relationships 1
NameTypeKindInfo
business Business has_one
Used by endpoints 3
Model

BusinessRequest

business-requests

A workflow envelope for asynchronous business operations (contract creation, batch invoice emission, contract termination, …).

Wraps multi-step operations whose progress is tracked separately from a normal CRUD response. Known kinds: new_contract, new_contract_pdf, professional_invoice_emission, terminate_contract. Status flows: draft → open → closed (with processing/waiting in between) and a side canceled branch. The data JSON payload is validated against the kind-specific schema in Schemas::BusinessRequestSchemas (e.g. TERMINATE_CONTRACT for termination requests). For terminate_contract, an optional data.pdf_url field can carry a signed distrato PDF at create time; alternatively, a top-level termination_pdf_url can be sent in the status-update payload when transitioning the request to closed — this writes to ProfessionalContract.termination_pdf_url directly, bypassing the data immutability guard.

Attributes 12
FieldTypeInfo
type string new_contract | new_contract_pdf | terminate_contract | professional_invoice_emission
status string draft | open | processing | waiting | closed | cancel_requested | canceled | errored
data object immutable (after draft/open)
artifacts object | null
created-at string
created-by string | null
updated-at string
updated-by string | null
submitted-at string | null
submitted-by string | null
canceled-at string | null
canceled-by string | null
Relationships 1
NameTypeKindInfo
business Business has_one required
Used by endpoints 7
Model

BusinessSetting

business-settings

Resource of type BusinessSetting.

Attributes 3
FieldTypeInfo
group-name string notifications
name string
value string required
Relationships 1
NameTypeKindInfo
business Business has_one
Used by endpoints 4
Embedded Object

CnaeItem

embedded

A CNAE (Classificação Nacional de Atividades Econômicas) code and description.

Embedded within ExtraData.all-cnae. Each item pairs a CNAE code with its human-readable description. CNAE codes classify the economic activities of the business.

Attributes 2
FieldTypeInfo
cnae string
description string
Model

ExternalAppToken

external-app-tokens

An API key for external app integrations — scoped access without user credentials.

Allows third-party systems to call the API using a static key instead of user JWTs. The gateway validates the key, generates a short-lived external-app JWT, and caches it for 5 minutes. Managed by admins via /external-app-tokens CRUD.

Attributes 5
FieldTypeInfo
name string
key string
scopes array<string> array of permission strings
expires-at string | null
created-at string
Used by endpoints 4
Embedded Object

ExtraData

embedded

Additional fiscal entity data — CNAE list and partner info.

Embedded within TaxData. Contains the primary CNAE code, the full list of CNAE items (all-cnae), the main partner name, and the municipal jurisdiction code.

Attributes 4
FieldTypeInfo
cnae string
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-name string
municipal-jurisdiction string
Model

FiscalEntityMeiCcmei

fiscal-entity-mei-ccmeis

Cartão CNPJ do MEI (CCMEI) — MEI card document for a fiscal entity.

Stores the CCMEI (MEI card) document data for a fiscal entity. The CCMEI is an official document proving MEI registration. Status tracks the document state; details and extra contain the government response data. Linked to a parent MEI entity.

Attributes 4
FieldTypeInfo
updated-at string required
status string
details object
extra object
Relationships 1
NameTypeKindInfo
fiscal-entity-mei FiscalEntityMei has_one
Embedded Object

InvoiceItem

embedded

A line item within a ProfessionalInvoice — description, quantity, unit value, and total.

Embedded within ProfessionalInvoice.items. Each item has: description (string), quantity (integer), unit-value-cents (integer, in centavos), total-value-cents (integer, in centavos). The sum of all items' total-value-cents should equal the invoice's total-value-cents.

Attributes 4
FieldTypeInfo
description string
quantity integer
unit-value-cents integer
total-value-cents integer
Model

PaymentsRecipient

billing-recipients

Resource of type PaymentsRecipient.

Attributes 5
FieldTypeInfo
bank-account object | null
providers object | null
pix-info object | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
business Business has_one
Used by endpoints 2
Model

Permission

permissions

Resource of type Permission.

Attributes 1
FieldTypeInfo
name string
Model

PersonalDocument

personal-documents

An identity or supporting document attached to a Professional or Account.

Stores uploaded identity documents (RG, CNH, CPF, address proof, etc.) required for compliance checks, contract approval, or fiscal entity registration. Each document has a type, file URL, and validation status.

Attributes 8
FieldTypeInfo
document-type string rg | cnh | cpf | address_proof | other
data object | null
front-url string | null
back-url string | null
foreign-type string | null
foreign-id string | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
account Account has_one
Used by endpoints 7
Model

Phone

phones

Resource of type Phone.

Attributes 2
FieldTypeInfo
country string
number string
Model

PinCred

pin-creds

Resource of type PinCred.

Attributes 1
FieldTypeInfo
pin string
Model

Professional

professionals

A beauty professional (hairdresser, manicurist, esthetician, …) working under a Business.

A worker who renders services and may issue invoices through the platform. Linked to a ProfessionalContract with the Business and to a ProfessionalFiscalEntity (their MEI / CNPJ) used for invoice emission.

Attributes 19
FieldTypeInfo
name string
initials string | null
email string format: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
phone-number string | null format: /^[0-9]+$/
phone-country string | null format: /^[0-9]+(-[0-9]+)?$/
phone-composed string | null
individual-tax-number string | null
birth-date string | null format: YYYY-MM-DD
address object | null
gender string | null
marital-status string | null
rg string | null
issuing-organization string | null
shipping-date string | null
national-identification-data object | null
is-active boolean
category-key string | null
created-at string
updated-at string
Relationships 4
NameTypeKindInfo
account Account has_one
business Business has_one
category ProfessionalCategory has_one
permissions-group permissions-groups has_one
Used by endpoints 4
Model

ProfessionalCategory

professional-categories

Resource of type ProfessionalCategory.

Attributes 7
FieldTypeInfo
name string
color string | null
translation-key string | null
sort-weight integer | null
is-locked boolean | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
permissions-group permissions-groups has_one
Used by endpoints 4
Model

ProfessionalContract

professional-contracts

The contractual relationship between a Business and a Professional.

Tracks the agreement that authorizes a Professional to operate under a Business. Status flows: fillingapproved → (active) → terminated. Two PDF slots: pdf_url for the signed contract (set by new_contract_pdf) and termination_pdf_url for the signed distrato (set by terminate_contract — either at create time via data.pdf_url, or at the status→closed transition via a top-level termination_pdf_url field). When terminate_contract is created with data.pdf_url, the contract is driven directly approvedterminated (skipping termination_requested) and the BusinessRequest goes directly to closed (skipping open) — mirrors the new_contract_pdf flow. The termination_pdf_url column can only be set while the contract is in termination_requested or terminated and is locked once populated; further attempts error with 422 TerminationPdfUrlAlreadySet.

Attributes 9
FieldTypeInfo
status string filling | in_approval | approved | termination_requested | terminated | canceled
required
contract-status string filling | in_approval | approved | termination_requested | terminated | canceled
pdf-url string | null format: URI (http/https)
termination-pdf-url string | null format: URI (http/https)
termination-business-request-id string | null
partnership-start-date string | null
partnership-end-date string | null
created-at string
updated-at string
Relationships 3
NameTypeKindInfo
business Business has_one required
professional Professional has_one required
business-request BusinessRequest has_one
Used by endpoints 11
Model

ProfessionalFiscalEntity

professional-fiscal-entities

The fiscal entity (CPF/CNPJ, usually a MEI) belonging to a Professional — the issuer of their invoices.

A SellerFiscalEntity owned by a Professional. Stores CNPJ (when MEI), CPF, digital certificate, MEI registration data, and PassGov credentials needed to query Receita Federal services on the Professional's behalf. The certificate_expiration_date attribute is sourced from the linked fiscal-entity-certificates.expiration_date row (single source of truth — updated automatically on certificate upload, absent when no active certificate is on file).

Attributes 21
FieldTypeInfo
name string
email string | null
address Address
countrystring
statestring
citystring
neighborhoodstring
streetstring
street-numberstring
zipcodestring
complementstring
status string waiting_setup | waiting_update | failed | active | inactive
document-type string
tax-number string
tax-country string
tax-data TaxData
fantasy-namestring
enterprise-typestring
enterprise-namestring
enterprise-tax-system TaxSystem
countrystring
is-meiboolean
is-simplesboolean
is-simples-intervalsarray<object>
situacao-cadastralobject
is-simples-start-datestring
is-simples-end-datestring
phone-countrystring
phone-numberstring
extra ExtraData
cnaestring
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-namestring
municipal-jurisdictionstring
cnaestring
rules TaxRules
uses-descricao-servicoboolean
uses-item-lista-servicoboolean
uses-codigo-servico-municipalboolean
uses-regime-especial-tributacaoboolean
serie-nfestring
codigo-nbsstring
aliquota-issnumber
razao-socialstring
nome-fantasiastring
codigo-ibge-ufstring
sequencial-nfestring
tipo-autenticacaointeger
codigo-ibge-cidadestring
inscricao-estadualstring
telefone-comercialstring
inscricao-municipalstring
sequencial-lote-nfestring
item-lista-servico-lcstring
municipal-jurisdictionstring
codigo-servico-municipalstring
optante-simples-nacionalboolean
codigo-tributacao-nacionalstring
regime-especial-tributacaostring
regime-especial-tributacao-labelstring
emission-status string active | inactive | missing_setup | missing_auth | missing_validation
certificate-expiration-date string | null
das-paid-by string | null
status-pass-govs string none | validating | succeeded | failed
status-pass-invoices string none | validating | succeeded | failed
status-certificate string none | validating | succeeded | failed
has-pass-gov boolean
has-pass-invoices boolean
has-certificate boolean
created-at string
updated-at string
created-by string | null
updated-by string | null
Relationships 1
NameTypeKindInfo
professional Professional has_one
Used by endpoints 5
Model

ProfessionalInvoice

professional-invoices

A NFS-e (electronic service invoice) issued for services rendered by a Professional.

Represents a Brazilian electronic service invoice (NFS-e) emitted through the eNotas integration on behalf of a Professional. Lifecycle: pending → requested → succeeded | failed. Cancellation lifecycle: pending-cancelation → requested-cancelation → canceled | failed-cancelation.

Attributes 19
FieldTypeInfo
invoice-type string | null services | products
items array<object> required
array of { description, quantity, unit_value_cents, total_value_cents }
buyer-id string | null
buyer-type string | null business | external
buyer-data object | null
status string pending | requested | succeeded | failed
cancel-status string | null none | requested | canceled | cancel_failed
status-reason string | null
cancel-reason string | null
emission-date string | null
fiscal-date string | null
nfse-url string | null
total-value-cents integer | null
source string | null
invoice-id string | null
created-at string
updated-at string
created-by string | null
updated-by string | null
Relationships 4
NameTypeKindInfo
business Business has_one
professional Professional has_one
professional-fiscal-entity ProfessionalFiscalEntity has_one
business-request BusinessRequest has_one
Used by endpoints 12
Model

ProfessionalService

professional-services

Resource of type ProfessionalService.

Attributes 4
FieldTypeInfo
services array<object> required
non-empty array of { service_category, professional_percentage, establishment_percentage }
pay-periodicity string | null monthly | bi_weekly | weekly | daily
created-at string
updated-at string
Relationships 2
NameTypeKindInfo
business Business has_one required
professional Professional has_one required
Used by endpoints 4
Model

Representative

representatives

The legal representative (Person) registered for a Business.

Stores the responsible person's identification (name, CPF, contact). Required by eNotas / Serpro when issuing invoices on the Business's behalf.

Attributes 21
FieldTypeInfo
name string required
surname string required
gender string required
email string format: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i
required
contact string format: /^([1-9]\d)?[ -]?9\d{4}[-\s]?\d{4}$/
required
cpf string format: /^\d{3}\.?\d{3}\.?\d{3}-?\d{2}$/
required
rg string format: /^(\d{1,2}\.?)(\d{3}\.?)(\d{3})(-?[0-9Xx])$/
required
issuing-organization string required
shipping-date string required
address-postal string format: /^\d{8}$/
required
address-street string required
address-neighborhood string | null
address-number string required
address-complement string required
address-city string required
address-state string required
marital-status string required
birthday string required
business-id string | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
businesses Business has_many
Used by endpoints 5
Model

Resource

resources

An uploaded blob (PDF, image, certificate) referenced from other resources by id.

Generic file upload. The response returns an id used to attach the blob to other resources (e.g. contract PDFs, certificate files).

Attributes 5
FieldTypeInfo
url string
content-type string
filename string
byte-size integer
created-at string
Used by endpoints 1
Model

ServiceCategory

service-categories

Resource of type ServiceCategory.

Attributes 3
FieldTypeInfo
translation-key string required
level integer required
service-category-id string required
Model

Session

sessions

An authenticated session — credentials traded for a short-lived JWT bearer token.

Created via POST /sessions with email/password. The response carries the bearer token used in Authorization: Bearer … for every subsequent call. Sessions can be listed and revoked.

Attributes 4
FieldTypeInfo
token string
email string
type string email
created-at string
Embedded Object

TaxData

embedded

Tax and fiscal configuration data for a seller fiscal entity — enterprise info, tax system, rules, and municipal parameters.

Embedded object on SellerFiscalEntity and BusinessFiscalEntity containing the fiscal entity's tax registration data: enterprise type/name, tax system (MEI/Simples Nacional status), CNAE codes, municipal jurisdiction, ISS aliquota, and regime especial tributacao. The enterprise-tax-system sub-object tracks MEI and Simples Nacional status with optional date intervals. The rules sub-object indicates which fields are active for this entity (e.g. whether descricao_servico or item_lista_servico are used). The extra sub-object contains CNAE list and partner info. Sourced from InfoSimples and updated on revalidation.

Attributes 29
FieldTypeInfo
fantasy-name string
enterprise-type string
enterprise-name string
enterprise-tax-system TaxSystem
countrystring
is-meiboolean
is-simplesboolean
is-simples-intervalsarray<object>
situacao-cadastralobject
is-simples-start-datestring
is-simples-end-datestring
phone-country string
phone-number string
extra ExtraData
cnaestring
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-namestring
municipal-jurisdictionstring
cnae string
rules TaxRules
uses-descricao-servicoboolean
uses-item-lista-servicoboolean
uses-codigo-servico-municipalboolean
uses-regime-especial-tributacaoboolean
serie-nfe string
codigo-nbs string
aliquota-iss number
razao-social string
nome-fantasia string
codigo-ibge-uf string
sequencial-nfe string
tipo-autenticacao integer
codigo-ibge-cidade string
inscricao-estadual string
telefone-comercial string
inscricao-municipal string
sequencial-lote-nfe string
item-lista-servico-lc string
municipal-jurisdiction string
codigo-servico-municipal string
optante-simples-nacional boolean
codigo-tributacao-nacional string
regime-especial-tributacao string
regime-especial-tributacao-label string
Embedded Object

TaxRules

embedded

Flags indicating which tax fields are active for a fiscal entity.

Embedded within TaxData. Boolean flags that control which fields are relevant for this entity's tax regime: uses-descricao-servico, uses-item-lista-servico, uses-codigo-servico-municipal, uses-regime-especial-tributacao. These flags drive form visibility in the UI.

Attributes 4
FieldTypeInfo
uses-descricao-servico boolean
uses-item-lista-servico boolean
uses-codigo-servico-municipal boolean
uses-regime-especial-tributacao boolean
Embedded Object

TaxSystem

embedded

MEI and Simples Nacional tax regime status for a fiscal entity.

Embedded within TaxData. Tracks whether the entity is MEI (is-mei), enrolled in Simples Nacional (is-simples), and the date intervals for Simples participation (is-simples-intervals). The situacao-cadastral object holds the Receita Federal cadastral situation.

Attributes 7
FieldTypeInfo
country string
is-mei boolean
is-simples boolean
is-simples-intervals array<object>
situacao-cadastral object
is-simples-start-date string
is-simples-end-date string
Model

WeekSchedule

week-schedules

Weekly working hours for a Business or Professional.

Holds the recurring weekly availability used by booking flows: open/close time per weekday, breaks, and exceptions.

Attributes 3
FieldTypeInfo
time-intervals array<array> array of [day, open, close] tuples
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
business Business has_one
Used by endpoints 3
Internal Model

BuyerFiscalEntity

buyer-fiscal-entities

A customer fiscal entity (CPF/CNPJ) — the receiver named on invoices issued by Professionals.

Stores the tax data required to address an NFS-e to a customer (individual or company). Reused across many ProfessionalInvoices.

Attributes 8
FieldTypeInfo
tax-number string
tax-type string cpf
name string
email string | null
phone string | null
address Address
countrystring
statestring
citystring
neighborhoodstring
streetstring
street-numberstring
zipcodestring
complementstring
created-at string
updated-at string
Used by endpoints 4
Internal Model

Das

fiscal-entity-dases

A monthly DAS (Documento de Arrecadação do Simples Nacional) record for a MEI.

The monthly tax payment slip mandatory for MEI companies. Fetched from Serpro/InfoSimples for each month of the year. Status indicates whether the DAS has been paid, is overdue, or is pending fetch. The PATCH endpoint requests an update from the government source.

Attributes 7
FieldTypeInfo
competence string | null
due-date string | null
amount-cents integer | null
status string not-requested | requested | not-mei | failed | waiting-payment | paid | missing | errored | in-active-debt
barcode string | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
fiscal-entity ProfessionalFiscalEntity has_one
Used by endpoints 4
Internal Model

Diagnosis

fiscal-entity-diagnoses

A fiscal compliance diagnostic result for a MEI FiscalEntity.

Captures the result of querying Receita Federal / government services for pending issues (debts, certificate problems, registration inconsistencies) that would block NFS-e emission. A diagnosis is triggered on demand and may contain multiple issue entries.

Attributes 5
FieldTypeInfo
status string processing | succeeded | failed | errored | not_applicable
result object | null
checked-at string | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
fiscal-entity ProfessionalFiscalEntity has_one
Used by endpoints 9
Internal Model

EmissionValidation

emission-validations

The result of a test-invoice emission validation attempt for a seller fiscal entity.

Returned by the emission validation endpoints (POST/GET /invoices-emission/validate, POST /validate-emission, GET /validation-status). Each record represents one validation attempt: a zero-value test NFS-e is emitted through eNotas, and the callback updates the status to succeeded or failed. The status field is the last entry of the internal statuses audit trail (nonevalidatingsucceeded / failed). author and author_type identify who requested the validation, captured from the request context. authentication_type records which credential was used (pass_only, token, user_and_pass, or certificate). canceled_at is set when the test invoice is queued for cancellation after a successful validation. is_valid reflects whether the seller fiscal entity is currently emission-validated. The invoice relationship points to the test invoice created for this validation.

Attributes 11
FieldTypeInfo
status string none | validating | succeeded | failed
author string | null
author-type string | null
authentication-type string | null pass_only | token | user_and_pass | certificate
attempted-at string
completed-at string | null
canceled-at string | null
invoice-status string | null
error object | null
municipal-data object | null
is-valid boolean
Relationships 1
NameTypeKindInfo
invoice Invoice has_one
Used by endpoints 8
Internal Model

FiscalEntityCertificate

fiscal-entity-certificates

Digital certificate (PKCS#12) stored for a FiscalEntity, used to authenticate with the NFS-e issuing portal.

Stores the PKCS#12 (.pfx) digital certificate bytes (in S3) and the encrypted password. PATCH .../certificate/validate downloads the .pfx from S3, decrypts the password, and tests the certificate against the external revenue API. Validation runs automatically when a new file or password is saved. Setting password: "" deactivates the certificate, clears the stored password and S3 key, and resets validation_status to none. The upload endpoints require a non-empty password.

Attributes 11
FieldTypeInfo
expiration-date string | null
status string active | inactive
validation-status string none | validating | succeeded | failed
validation-errors array<string>
validation-at string | null
validation-by-id string | null
s3-key string required
created-at string
created-by string | null
updated-at string
updated-by string | null
Relationships 2
NameTypeKindInfo
business Business has_one
professional Professional has_one
Used by endpoints 13
Internal Model

FiscalEntityMei

fiscal-entity-meis

MEI (Microempreendedor Individual) registration data for a fiscal entity — CNPJ details, CCMEI number, and compliance status.

Stores the MEI-specific registration data for a fiscal entity including CNPJ details (situation, update timestamp), CCMEI number and situation, and overall MEI status. Linked to a parent fiscal entity. The CNPJ and CCMEI sub-objects track the raw government data and when it was last refreshed.

Attributes 4
FieldTypeInfo
tax-number string
cnpj object
ccmei object
status string
Relationships 1
NameTypeKindInfo
fiscal-entity SellerFiscalEntity has_one
Used by endpoints 2
Internal Model

FiscalEntityMeiCnd

fiscal-entity-mei-cnds

Certidão Negativa de Débitos (CND) — tax clearance certificate for a MEI fiscal entity.

Stores the CND (negative tax certificate) for a MEI fiscal entity. The CND confirms the entity has no outstanding tax debts. Status tracks the validation state; details and extra contain the government response data. Linked to a parent MEI entity.

Attributes 4
FieldTypeInfo
updated-at string required
status string
details object
extra object
Relationships 1
NameTypeKindInfo
fiscal-entity-mei FiscalEntityMei has_one
Used by endpoints 2
Internal Model

FiscalEntityMeiDasn

fiscal-entity-mei-dasns

Declaração Anual do Simples Nacional (DASN) — annual MEI revenue declaration.

Stores the annual DASN declaration for a MEI fiscal entity. The DASN is the yearly revenue declaration required for MEI companies. Status tracks the declaration state. Linked to an account and a fiscal entity.

Attributes 1
FieldTypeInfo
status string
Relationships 2
NameTypeKindInfo
account Account has_one
fiscal-entity SellerFiscalEntity has_one
Used by endpoints 2
Internal Model

FiscalEntityRequest

fiscal-entity-requests

A request record for fiscal entity operations (CNPJ validation, document uploads, government service queries).

Tracks asynchronous fiscal entity operations such as CNPJ validation, document fetch, or government service queries. Each request has a category, processing status, and optional error details. Linked to a parent fiscal entity.

Attributes 7
FieldTypeInfo
category string
details object
process-status string
status string
error-status string | null
created-at string required
updated-at string required
Relationships 1
NameTypeKindInfo
fiscal-entity SellerFiscalEntity has_one
Used by endpoints 4
Internal Model

FiscalEntityRevenue

fiscal-entity-revenues

Monthly fiscal entity gross revenue record used for annual limits tracking.

Stores the declared monthly revenue for a seller fiscal entity. For MEI entities, the annual limit is R$81k/year (sum of current year). For non-MEI entities, the limit is platform-configurable and uses trailing-12-month calculation. The PATCH endpoint triggers an asynchronous refresh from the revenue provider. When refresh is in flight, the record data JSONB may carry a revenue_job_id (string) pointing to the async job on the external revenue API; on completion the poller removes the field and writes the final succeeded/errored status.

Attributes 6
FieldTypeInfo
month string | null
gross-amount number | null
tax-number string | null
tax-country string | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
professional Professional has_one
Used by endpoints 2
Internal Model

FiscalEntityRevenueResume

fiscal-entity-revenue-resumes

Revenue resume aggregated per fiscal entity across a business.

Returned by GET /professional-fiscal-entities/revenue, GET /businesses/{businessId}/revenue, and GET /fiscal-entities/revenue (proxied from the accounting service). One entry per seller fiscal entity of the business, with the sum of succeeded monthly revenue records for the relevant period (yearly for MEI, trailing 12 months for non-MEI). The api_status reflects the aggregated health of the underlying monthly records (errored > processing > succeeded). The total_revenue_status compares actual total revenue against the annual limit (ok/nok). The projected_revenue_status projects current revenue forward using two configurable thresholds (ok/warning_low/warning_high). The calculation_type distinguishes yearly (MEI, calendar-year sum) from trailing (non-MEI, rolling 12-month sum). Errored and processing months are listed in errored_months and processing_months respectively. A last_updated_at field (RFC 3339) reflects the most recent update timestamp across all underlying revenue records. The response is JSON:API with a fiscal-entity relationship.

Attributes 6
FieldTypeInfo
year integer | null
total-gross-amount number | null
total-months integer | null
limit-amount number | null
created-at string
updated-at string
Relationships 1
NameTypeKindInfo
fiscal-entity ProfessionalFiscalEntity has_one
Used by endpoints 3
Internal Model

Invoice

invoices

An invoice record managed by the accounting service — tracks NFS-e emission, tax breakdown, and provider status.

The accounting-side invoice record created when a ProfessionalInvoice is emitted. Stores tax breakdown (IRRF, PIS, COFINS, CSLL, ISS), NFS-e number/verification code, and the external provider status. Linked to a SellerFiscalEntity (issuer) and BuyerFiscalEntity (receiver). Status follows the accounting service lifecycle: pending → requested → succeeded | failed. Cancellation: pending-cancelation → requested-cancelation → canceled | failed-cancelation.

Attributes 18
FieldTypeInfo
competency-date string
nfse-number string | null
nfse-verification-code string | null
nfse-url string | null
amount-cents integer
tax-irrf-cents integer
tax-pis-cents integer
tax-cofins-cents integer
tax-csll-cents integer
tax-iss-cents integer
status string pending | requested | succeeded | failed
cancel-status string | null none | requested | canceled | cancel_failed
provider-id string | null
provider-status string | null
emission-date string | null
fiscal-date string | null
created-at string
updated-at string
Relationships 2
NameTypeKindInfo
seller-fiscal-entity seller-fiscal-entities has_one
buyer-fiscal-entity BuyerFiscalEntity has_one
Used by endpoints 9
Internal Model

PassGov

fiscal-entity-pass-govs

Gov.br credentials (CPF + password) stored for automated government service access.

Stores the gov.br login used to query Receita Federal on the FiscalEntity's behalf — e.g., to fetch DAS, diagnoses, and CND documents. Credentials are encrypted at rest. PATCH .../pass-gov/validate tests the credentials live against the government portal and updates validation_status. On PATCH .../pass-gov, sending password: "" clears the stored password, sets status to inactive and validation_status to none. The create endpoint requires a non-empty password. Validation runs automatically when credentials are saved or updated.

Attributes 11
FieldTypeInfo
cpf string
password string
status string active | inactive
validation-status string none | validating | succeeded | failed
validation-errors array<string>
validation-at string | null
validation-by-id string | null
created-at string
created-by string | null
updated-at string
updated-by string | null
Relationships 2
NameTypeKindInfo
business Business has_one
professional Professional has_one
Used by endpoints 15
Internal Model

PassInvoice

fiscal-entity-pass-invoices

Prefeitura NFS-e portal credentials for a FiscalEntity.

Stores the login/password for the municipal NFS-e issuing system (prefeitura). Required when the municipality does not support direct integration via eNotas and invoices must be issued through the city portal. Managed separately from PassGov. PATCH .../pass-invoices/validate tests the credentials live against the external revenue API and updates validation_status. On PATCH .../pass-invoices, sending password: "" clears the stored password, sets status to inactive and validation_status to none. The create endpoint requires a non-empty password. Validation runs automatically when credentials are saved or updated.

Attributes 13
FieldTypeInfo
authentication-type string pass_only | token | user_and_pass
username string | null
login string
password string
status string active | inactive
validation-status string none | validating | succeeded | failed
validation-errors array<string>
validation-at string | null
validation-by-id string | null
created-at string
created-by string | null
updated-at string
updated-by string | null
Relationships 2
NameTypeKindInfo
business Business has_one
professional Professional has_one
Used by endpoints 15
Internal Model

SellerFiscalEntity

fiscal-entities

A seller fiscal entity (CPF/CNPJ) in the accounting service — the issuer of invoices.

Represents a fiscal entity registered in the accounting service for invoice emission. Stores tax number, address, certificate expiration, MEI registration, and emission status. Linked to an Account and optionally to a parent fiscal entity and MEI data. The certificate_expiration_date is sourced from the linked fiscal-entity-certificates.expiration_date row. The emission_status tracks whether the entity can emit invoices (missing_setupmissing_authmissing_validationactive | inactive); missing_auth means the eNotas company account exists but no credentials have been sent yet. The status_pass_govs, status_pass_invoices, and status_certificate fields expose the current state of linked credentials and certificates.

Attributes 26
FieldTypeInfo
name string
email string | null
address Address
countrystring
statestring
citystring
neighborhoodstring
streetstring
street-numberstring
zipcodestring
complementstring
status string
emission-status string
certificate-expiration-date string | null
das-paid-by integer | null
status-pass-govs string
status-pass-invoices string
status-certificate string
has-pass-gov boolean
has-pass-invoices boolean
has-certificate boolean
document-type string
tax-number string
tax-country string
tax-data TaxData
fantasy-namestring
enterprise-typestring
enterprise-namestring
enterprise-tax-system TaxSystem
countrystring
is-meiboolean
is-simplesboolean
is-simples-intervalsarray<object>
situacao-cadastralobject
is-simples-start-datestring
is-simples-end-datestring
phone-countrystring
phone-numberstring
extra ExtraData
cnaestring
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-namestring
municipal-jurisdictionstring
cnaestring
rules TaxRules
uses-descricao-servicoboolean
uses-item-lista-servicoboolean
uses-codigo-servico-municipalboolean
uses-regime-especial-tributacaoboolean
serie-nfestring
codigo-nbsstring
aliquota-issnumber
razao-socialstring
nome-fantasiastring
codigo-ibge-ufstring
sequencial-nfestring
tipo-autenticacaointeger
codigo-ibge-cidadestring
inscricao-estadualstring
telefone-comercialstring
inscricao-municipalstring
sequencial-lote-nfestring
item-lista-servico-lcstring
municipal-jurisdictionstring
codigo-servico-municipalstring
optante-simples-nacionalboolean
codigo-tributacao-nacionalstring
regime-especial-tributacaostring
regime-especial-tributacao-labelstring
extra ExtraData
cnaestring
all-cnae[] array<CnaeItem>
cnaestring
descriptionstring
main-partner-namestring
municipal-jurisdictionstring
emission-validated-at string | null
last-emission-validation EmissionValidation
idstring
typestring
attributesobject
relationshipsobject
foreign-id integer | null
foreign-type string | null
created-at string required
created-by integer | null
updated-at string required
updated-by integer | null
Relationships 3
NameTypeKindInfo
parent-fiscal-entity SellerFiscalEntity has_one
account Account has_one
fiscal-entity-mei FiscalEntityMei has_one
Used by endpoints 4