Skip to main content

kobana billing companies

Commands of kobana billing companies. Every global option (Global options) applies here.

CommandHTTPDescription
companies fiscalGET /v1/companies/{id}/fiscalGet fiscal profile
companies fiscal updatePATCH /v1/companies/{id}/fiscalUpdate fiscal profile
companies fiscal-profileGET /v1/companies/{id}/fiscal-profileGet fiscal profile (alias)
companies fiscal-profile updatePATCH /v1/companies/{id}/fiscal-profileUpdate fiscal profile (alias)
companies matrizGET /v1/companies/matrizList head office companies
companies listGET /v1/companiesList companies
companies createPOST /v1/companiesCreate company
companies updatePUT /v1/companiesUpsert company
companies getGET /v1/companies/{id}Get company
companies deleteDELETE /v1/companies/{id}Delete company
companies deactivatePOST /v1/companies/{id}/deactivateDeactivate company
companies reactivatePOST /v1/companies/{id}/reactivateReactivate company
companies set-defaultPOST /v1/companies/{id}/set-defaultSet default company

companies fiscal​

Get fiscal profile

kobana billing companies fiscal [ID] [OPTIONS] [COMMAND]

GET /v1/companies/{id}/fiscal

Returns the company's fiscal profile, or null when it has not been configured yet.

Path arguments: id

Responses

HTTPDescription
200Company fiscal profile (or null).
404Resource not found in the current organization.

companies fiscal update​

Update fiscal profile

kobana billing companies fiscal update [ID] [OPTIONS]

PATCH /v1/companies/{id}/fiscal

Creates or updates (upsert) the company fiscal profile. Includes taxation regime, rates (ISS, PIS, COFINS, CSLL, IRPJ) and CBS/IBS settings.

Path arguments: id

Request body

NameTypeRequiredDescription
taxation_regimestringyesTaxation regime: simple_national, presumed_profit, real_profit or mei. Values: simple_national, presumed_profit, real_profit, mei.
simples_annexstringnoSimples Nacional annex: annex_iii, annex_iv or annex_v. Values: annex_iii, annex_iv, annex_v.
rbt12numbernoGross revenue accumulated over the last 12 months, in BRL (float, up to 4 decimal places).
factor_rnumbernoFactor R (payroll Γ· revenue), used for Simples Nacional bracket classification.
cpp_inside_dasbooleannoWhether CPP (employer social security contribution) is bundled into DAS.
presumption_ratenumbernoPresumption rate (presumed profit), as decimal (e.g.: 0.32).
iss_municipalitystringnoMunicipality where ISS is levied.
iss_ratenumbernoISS rate, as decimal.
pis_ratenumbernoPIS rate, as decimal.
cofins_ratenumbernoCOFINS rate, as decimal.
csll_ratenumbernoCSLL rate, as decimal.
irpj_ratenumbernoIRPJ rate, as decimal.
cbs_ibs_enabledbooleannoEnables the CBS/IBS fields (Brazilian tax reform).
cbs_ratenumbernoCBS rate, as decimal.
ibs_ratenumbernoIBS rate, as decimal.
cbs_ibs_modestringnoCBS/IBS calculation mode: informative (display only) or compositive (composes the price). Values: informative, compositive.

More fields and nested objects: kobana schema billing.companies.fiscal.update.

Responses

HTTPDescription
200Fiscal profile updated.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

companies fiscal-profile​

Get fiscal profile (alias)

kobana billing companies fiscal-profile [ID] [OPTIONS] [COMMAND]

GET /v1/companies/{id}/fiscal-profile

Alias of GET /companies/{id}/fiscal β€” same representation and behaviour.

Path arguments: id

Responses

HTTPDescription
200Company fiscal profile (or null).
404Resource not found in the current organization.

companies fiscal-profile update​

Update fiscal profile (alias)

kobana billing companies fiscal-profile update [ID] [OPTIONS]

PATCH /v1/companies/{id}/fiscal-profile

Alias of PATCH /companies/{id}/fiscal β€” same representation and behaviour.

Path arguments: id

Request body

NameTypeRequiredDescription
taxation_regimestringyesTaxation regime: simple_national, presumed_profit, real_profit or mei. Values: simple_national, presumed_profit, real_profit, mei.
simples_annexstringnoSimples Nacional annex: annex_iii, annex_iv or annex_v. Values: annex_iii, annex_iv, annex_v.
rbt12numbernoGross revenue accumulated over the last 12 months, in BRL (float, up to 4 decimal places).
factor_rnumbernoFactor R (payroll Γ· revenue), used for Simples Nacional bracket classification.
cpp_inside_dasbooleannoWhether CPP (employer social security contribution) is bundled into DAS.
presumption_ratenumbernoPresumption rate (presumed profit), as decimal (e.g.: 0.32).
iss_municipalitystringnoMunicipality where ISS is levied.
iss_ratenumbernoISS rate, as decimal.
pis_ratenumbernoPIS rate, as decimal.
cofins_ratenumbernoCOFINS rate, as decimal.
csll_ratenumbernoCSLL rate, as decimal.
irpj_ratenumbernoIRPJ rate, as decimal.
cbs_ibs_enabledbooleannoEnables the CBS/IBS fields (Brazilian tax reform).
cbs_ratenumbernoCBS rate, as decimal.
ibs_ratenumbernoIBS rate, as decimal.
cbs_ibs_modestringnoCBS/IBS calculation mode: informative (display only) or compositive (composes the price). Values: informative, compositive.

More fields and nested objects: kobana schema billing.companies.fiscal-profile.update.

Responses

HTTPDescription
200Fiscal profile updated.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

companies matriz​

List head office companies

kobana billing companies matriz [OPTIONS]

GET /v1/companies/matriz

Lists the active head office companies (without parent_company_id) of the organization. Useful when selecting the parent company before creating a branch. Only CNPJ companies appear here.

Responses

HTTPDescription
200List of head office companies.
404Resource not found in the current organization.

companies list​

List companies

kobana billing companies list [OPTIONS]

GET /v1/companies

Returns a paginated list of the current organization's companies (head offices and branches).

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
person_idstringnoFilter by associated person UUID.
person_document_numberstringnoFilter by person CPF/CNPJ (exact match).
person_name_containsstringnoFilter by person name (partial search, case-insensitive).
statusstringnoFilter by status: active or inactive. Values: active, inactive.
searchstringnoFree-text search by name, legal name, email or document number.
is_defaultstringnoFilter only the company flagged as the organization default. Values: true, false.
parent_company_idstringnoFilter branches by head office. Use the head office UUID to list its branches.
email_layout_idstringnoFilter companies by the UUID of the associated email layout.
created_afterstringnoStart of creation date range (YYYY-MM-DD).
created_beforestringnoEnd of creation date range (YYYY-MM-DD).

Responses

HTTPDescription
200Paginated list of companies.
404Resource not found in the current organization.

companies create​

Create company

kobana billing companies create [OPTIONS]

POST /v1/companies

Creates a company (head office or branch). To create a branch, provide parent_company_id β€” the CNPJ must share the same prefix as the head office. Only CNPJ companies can have branches. The first company created in the organization is flagged as is_default automatically.

Request body

NameTypeRequiredDescription
namestringyesTrade name of the company.
document_typestringyesDocument type: cpf or cnpj. Only cnpj can have branches. Values: cpf, cnpj.
document_numberstringyesCPF or CNPJ (with or without mask β€” will be normalized to digits only).
emailstring (email)yesPrimary company email.
parent_company_idstring (uuid)noHead office UUID when creating a branch. Omit to create a head office.
external_idstringnoIdentifier in your external system, for idempotency/sync.
legal_namestringnoLegal name.
phonestringnoPrimary company phone. When provided, it is added to the phones array.
addressesarray<object>noList of company addresses.
emailsarray<object>noList of additional emails. If omitted, the primary email is used.
phonesarray<object>noList of company phones.
websitesarray<object>noList of company websites.
is_defaultbooleannoWhen true, sets this company as the organization default. Only head offices can be default.
custom_metadataobjectnoCustom metadata (free-form key/value).

More fields and nested objects: kobana schema billing.companies.create.

Responses

HTTPDescription
201Company created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

companies update​

Upsert company

kobana billing companies update [OPTIONS]

PUT /v1/companies

Takes the same body as POST, plus id and public_id, and dedups on id, public_id, external_id and the resource's natural keys, in that order, stopping at the first key that finds a record. A match is updated and returns 200; otherwise the record is created and returns 201. The POST's required fields are required only when no record is found, and updates are partial: absent fields keep their stored value.

Request body

NameTypeRequiredDescription
parent_company_idstring (uuid)noHead office UUID when creating a branch. Omit to create a head office.
namestringnoTrade name of the company.
external_idstringnoIdentifier in your external system, for idempotency/sync.
legal_namestringnoLegal name.
document_typestringnoDocument type: cpf or cnpj. Only cnpj can have branches. Values: cpf, cnpj.
document_numberstringnoCPF or CNPJ (with or without mask β€” will be normalized to digits only).
emailstring (email)noPrimary company email.
phonestringnoPrimary company phone. When provided, it is added to the phones array.
addressesarray<object>noList of company addresses.
emailsarray<object>noList of additional emails. If omitted, the primary email is used.
phonesarray<object>noList of company phones.
websitesarray<object>noList of company websites.
is_defaultbooleannoWhen true, sets this company as the organization default. Only head offices can be default.
custom_metadataobjectnoCustom metadata (free-form key/value).
idstring (uuid)noRecord UUID. Used only to locate it β€” never written.
public_idstring (uuid)noPublic UUID of the record, used to locate it.

More fields and nested objects: kobana schema billing.companies.update.

Responses

HTTPDescription
200Record updated.
201Record created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

companies get​

Get company

kobana billing companies get [ID] [OPTIONS]

GET /v1/companies/{id}

Path arguments: id

Responses

HTTPDescription
200Company detail.
404Resource not found in the current organization.

companies delete​

Delete company

kobana billing companies delete [ID] [OPTIONS]

DELETE /v1/companies/{id}

Deletes the company (soft delete: deleted_at β€” it disappears from every read; issued invoices and NFS-e keep citing it). Requires the delete access level. The only active company, or one with active or trialing subscriptions, cannot be deleted. Until October 2026 this route only deactivated the company β€” deactivating is POST /v1/companies/{id}/deactivate, reversible.

Path arguments: id

Responses

HTTPDescription
200Company deleted.
404Resource not found in the current organization.
422Request body failed validation.

companies deactivate​

Deactivate company

kobana billing companies deactivate [ID] [OPTIONS]

POST /v1/companies/{id}/deactivate

Deactivates the company. Cannot deactivate the only active company, nor a company that has active or trialing subscriptions. If the deactivated company was the default, another active company is promoted automatically.

Path arguments: id

Responses

HTTPDescription
200Company deactivated.
404Resource not found in the current organization.
422Request body failed validation.

companies reactivate​

Reactivate company

kobana billing companies reactivate [ID] [OPTIONS]

POST /v1/companies/{id}/reactivate

Reactivates a previously deactivated company. Returns 422 when the company is already active.

Path arguments: id

Responses

HTTPDescription
200Company reactivated.
404Resource not found in the current organization.
422Request body failed validation.

companies set-default​

Set default company

kobana billing companies set-default [ID] [OPTIONS]

POST /v1/companies/{id}/set-default

Marks the company as the organization's default. The previous default is unset in the same transaction.

Path arguments: id

Responses

HTTPDescription
200Company set as default.
404Resource not found in the current organization.