Skip to main content
POST
/
api
/
v1
/
businesses
Criar negócio
curl --request POST \
  --url https://api.datacrazy.io/v1/api/api/v1/businesses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "leadId": "59e77f5f-7581-4f20-a05b-97cd33485019",
  "stageId": "59e77f5f-7581-4f20-a05b-97cd33485019",
  "attendantId": "59e77f5f-7581-4f20-a05b-97cd33485019",
  "externalId": "61ab2k4189lhz01"
}'
{
  "id": "e9a09677-cf00-4d84-aa12-6d78d6786555",
  "createdAt": "2025-06-18T22:18:36.666Z",
  "stageId": "e6803a51-4bd6-416b-b516-3622ff256732",
  "leadId": "c1152508-fdfd-4905-a3f4-f3850cc00bf0",
  "attendantId": "7e7da46a-a0ed-43c2-a3aa-3ac253f41b4d",
  "nextActivityId": "3d3d23a-a0ed-43c2-a3aa-3ac23433f41g01",
  "total": "70000",
  "discount": 500,
  "addition": 0,
  "shipping": 2000,
  "coupon": "CUPOM100",
  "shippingType": "Sedex",
  "status": "in_process",
  "code": 50607,
  "externalId": "f33420908-dcdc-4905-a3f4-f3850cc43bf0",
  "lastMovedAt": "2025-06-18T22:18:36.611Z",
  "statusChangedAt": "2025-06-18T22:20:14.611Z4",
  "products": [],
  "lossReasonId": "null",
  "justification": "",
  "productsCount": 2
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
leadId
string
required

ID do lead a ser vinculado ao negócio

Example:

"59e77f5f-7581-4f20-a05b-97cd33485019"

stageId
string
required

ID do estágio de pipeline no qual o negócio será criado

Example:

"59e77f5f-7581-4f20-a05b-97cd33485019"

attendantId
string

ID do atendente a ser vinculado ao negócio

Example:

"59e77f5f-7581-4f20-a05b-97cd33485019"

externalId
string

ID externo a ser vinculado ao negócio

Example:

"61ab2k4189lhz01"

Response

200 - application/json
id
string

ID do negócio.

Example:

"e9a09677-cf00-4d84-aa12-6d78d6786555"

createdAt
string<date-time>

Data de criação do negócio.

Example:

"2025-06-18T22:18:36.666Z"

stageId
string

ID do estágio atual do negócio.

Example:

"e6803a51-4bd6-416b-b516-3622ff256732"

leadId
string

ID do lead associado ao negócio.

Example:

"c1152508-fdfd-4905-a3f4-f3850cc00bf0"

attendantId
string

ID do atendente responsável pelo negócio.

Example:

"7e7da46a-a0ed-43c2-a3aa-3ac253f41b4d"

nextActivityId
string

ID da próxima atividade relacionada ao negócio.

Example:

"3d3d23a-a0ed-43c2-a3aa-3ac23433f41g01"

total
number

Valor total do negócio.

Example:

"70000"

discount
number

Valor de desconto aplicado ao negócio.

Example:

500

addition
number

Valor de acréscimos aplicados ao negócio.

Example:

0

shipping
number

Valor do frete relacionado ao negócio.

Example:

2000

coupon
string

Cupom de desconto utilizado no negócio.

Example:

"CUPOM100"

shippingType
string

Tipo de frete selecionado para o negócio.

Example:

"Sedex"

status
string

Status atual do negócio.

Example:

"in_process"

code
number

Código interno do negócio.

Example:

50607

externalId
string

ID externo vinculado ao negócio.

Example:

"f33420908-dcdc-4905-a3f4-f3850cc43bf0"

lastMovedAt
string<date-time>

Data da última movimentação do negócio.

Example:

"2025-06-18T22:18:36.611Z"

statusChangedAt
string<date-time>

Data da última alteração do status do negócio.

Example:

"2025-06-18T22:20:14.611Z4"

products
object[]

Lista de produtos associados ao negócio.

Example:
[]
lossReasonId
string

ID do motivo de perda do negócio.

Example:

null

justification
string

Justificativa associada ao negócio.

Example:

""

productsCount
number

Quantidade total de produtos no negócio.

Example:

2