Skip to main content
POST
/
companies
Create a new company
curl --request POST \
  --url https://api.example.com/companies \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Acme Corp",
  "document": "12345678000199",
  "email": "contact@acme.com",
  "address": {},
  "settings": {}
}
'
{
  "id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
  "tenantId": "e305e9a4-585e-49b8-bc88-9fba992c6326",
  "name": "Acme Corp",
  "document": "12345678000199",
  "status": "ACTIVE",
  "email": "contact@acme.com",
  "address": null,
  "settings": {},
  "taxRegime": "SIMPLES_NACIONAL",
  "costMethod": "WEIGHTED_AVERAGE",
  "createdAt": "2024-01-01T12:00:00.000Z",
  "updatedAt": "2024-01-01T12:00:00.000Z"
}
Permite que um usuário autenticado crie uma “Company”, que representa uma entidade fiscal ou filial, dentro de seu lojista (tenant).

Body

name
string
required
Razão Social ou Nome Fantasia da empresa. (ex: Acme Corp)
document
string
required
CNPJ ou CPF (somente números). Deve ser único globalmente.
email
string
Email de contato da empresa.
address
object
Endereço completo estruturado. (ex: rua, número, cidade, estado, cep)
settings
object
Configurações iniciais extras estruturadas em JSON.

Response

{
  "id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
  "tenantId": "e305e9a4-585e-49b8-bc88-9fba992c6326",
  "name": "Acme Corp",
  "document": "12345678000199",
  "status": "ACTIVE",
  "email": "contact@acme.com",
  "address": null,
  "settings": {},
  "taxRegime": "SIMPLES_NACIONAL",
  "costMethod": "WEIGHTED_AVERAGE",
  "createdAt": "2024-01-01T12:00:00.000Z",
  "updatedAt": "2024-01-01T12:00:00.000Z"
}

Body

application/json
name
string
required

Company Name

Example:

"Acme Corp"

document
string
required

CNPJ or CPF

Example:

"12345678000199"

email
string

Contact Email

Example:

"contact@acme.com"

address
object

Address Structure

settings
object

Initial Settings

Response

Company created successfully.

name
string
required

Company Name

Example:

"Acme Corp"

document
string
required

CNPJ or CPF

Example:

"12345678000199"

status
enum<string>
required

Company Status

Available options:
ACTIVE,
DISABLED,
BLOCKED,
SUSPENDED
Example:

"ACTIVE"

settings
object
required

Configuration Settings

Example:
{}
taxRegime
enum<string>
required

Tax Regime

Available options:
SIMPLES_NACIONAL,
LUCRO_PRESUMIDO,
LUCRO_REAL
Example:

"SIMPLES_NACIONAL"

costMethod
enum<string>
required

Cost Method

Available options:
REPLACEMENT,
WEIGHTED_AVERAGE
Example:

"WEIGHTED_AVERAGE"

email
string

Contact Email

Example:

"contact@acme.com"

address
object

Address Object