Pular para o conteúdo
BetaDocumentação em validação contínua. Comportamento descrito pode divergir do servidor — abra um chamado no app se algo não bater.
/deals

Deals

Negócios em pipelines. Cada deal pertence a um pipeline + stage, tem valor monetário e pode estar ligado a uma pessoa (`primaryPersonId`) e/ou empresa (`primaryCompanyId`).

  • Mover entre stages exige `stageId` do mesmo `pipelineId`.
  • Stage do tipo `lost` exige `lostReasonId` no PATCH.
  • Currency padrão BRL; outras moedas precisam estar habilitadas no workspace.
  • Webhooks: deal.created, deal.updated, deal.stage_changed, deal.won, deal.lost.

Endpoints

Clique em qualquer linha pra ir direto à reference detalhada.

Reference

GET/deals

Listar deals

Apenas paginação na v1 atual; filtros por pipeline, stage e owner virão em versões futuras.

Query parameters

pageinteger
Número da página (1-indexado).
pageSizeinteger
Itens por página. Máximo 100.

Responses

  • 200OK.

Resposta 200

pageintegerrequired
pageSizeintegerrequired
totalintegerrequired
hasMorebooleanrequired
dataarray<Deal>required
curl https://api.usemix.app/api/v1/deals \
  -H "Authorization: Bearer manu_seu_token_aqui"
GET/deals/{id}

Buscar deal

Path parameters

idstring<uuid>required
Identificador único do recurso.

Responses

  • 200OK.

Resposta 200

idstring<uuid>required
tenantIdstring<uuid>required
titlestringrequired
valuenumber<double>required
currencystringrequired
pipelineIdstring<uuid>required
stageIdstring<uuid>required
ownerIdstring<uuid>
expectedCloseDatestring<date>
primaryPersonIdstring<uuid>
primaryCompanyIdstring<uuid>
lostReasonIdstring<uuid>
Obrigatório quando o stage é do tipo 'lost'.
closedAtstring<date-time>
tagsarray<string>
customFieldsobject
Campos customizados do workspace, expostos como leitura.
createdAtstring<date-time>required
updatedAtstring<date-time>required
curl https://api.usemix.app/api/v1/deals/<id> \
  -H "Authorization: Bearer manu_seu_token_aqui"
POST/deals

Criar deal

Cria um novo deal no pipeline+stage informados. Currency padrão BRL.

Request body

titlestringrequired
valuenumber<double>required
currencystring
pipelineIdstring<uuid>required
stageIdstring<uuid>required
ownerIdstring<uuid>
expectedCloseDatestring<date>
primaryPersonIdstring<uuid>
primaryCompanyIdstring<uuid>

Responses

  • 201Criado.
  • 422Regra de negócio violada.

Resposta 201

idstring<uuid>required
tenantIdstring<uuid>required
titlestringrequired
valuenumber<double>required
currencystringrequired
pipelineIdstring<uuid>required
stageIdstring<uuid>required
ownerIdstring<uuid>
expectedCloseDatestring<date>
primaryPersonIdstring<uuid>
primaryCompanyIdstring<uuid>
lostReasonIdstring<uuid>
Obrigatório quando o stage é do tipo 'lost'.
closedAtstring<date-time>
tagsarray<string>
customFieldsobject
Campos customizados do workspace, expostos como leitura.
createdAtstring<date-time>required
updatedAtstring<date-time>required
curl -X POST https://api.usemix.app/api/v1/deals \
  -H "Authorization: Bearer manu_seu_token_aqui" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "value": 0,
  "currency": "BRL",
  "pipelineId": "00000000-0000-0000-0000-000000000000",
  "stageId": "00000000-0000-0000-0000-000000000000",
  "ownerId": "00000000-0000-0000-0000-000000000000",
  "expectedCloseDate": "2026-05-03",
  "primaryPersonId": "00000000-0000-0000-0000-000000000000",
  "primaryCompanyId": "00000000-0000-0000-0000-000000000000"
}'
PATCH/deals/{id}

Atualizar deal

Mover entre stages, alterar valor, owner, datas. Mover pra stage 'lost' exige `lostReasonId`.

Path parameters

idstring<uuid>required
Identificador único do recurso.

Request body

titlestring
valuenumber<double>
currencystring
stageIdstring<uuid>
Mover entre stages do mesmo pipeline.
ownerIdstring<uuid>
expectedCloseDatestring<date>
primaryPersonIdstring<uuid>
primaryCompanyIdstring<uuid>
lostReasonIdstring<uuid>

Responses

  • 200OK.
  • 422Regra de negócio.

Resposta 200

idstring<uuid>required
tenantIdstring<uuid>required
titlestringrequired
valuenumber<double>required
currencystringrequired
pipelineIdstring<uuid>required
stageIdstring<uuid>required
ownerIdstring<uuid>
expectedCloseDatestring<date>
primaryPersonIdstring<uuid>
primaryCompanyIdstring<uuid>
lostReasonIdstring<uuid>
Obrigatório quando o stage é do tipo 'lost'.
closedAtstring<date-time>
tagsarray<string>
customFieldsobject
Campos customizados do workspace, expostos como leitura.
createdAtstring<date-time>required
updatedAtstring<date-time>required
curl -X PATCH https://api.usemix.app/api/v1/deals/<id> \
  -H "Authorization: Bearer manu_seu_token_aqui" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "value": 0,
  "currency": "string",
  "stageId": "00000000-0000-0000-0000-000000000000",
  "ownerId": "00000000-0000-0000-0000-000000000000",
  "expectedCloseDate": "2026-05-03",
  "primaryPersonId": "00000000-0000-0000-0000-000000000000",
  "primaryCompanyId": "00000000-0000-0000-0000-000000000000",
  "lostReasonId": "00000000-0000-0000-0000-000000000000"
}'
DELETE/deals/{id}

Apagar deal

Path parameters

idstring<uuid>required
Identificador único do recurso.

Responses

  • 204Apagado.
curl -X DELETE https://api.usemix.app/api/v1/deals/<id> \
  -H "Authorization: Bearer manu_seu_token_aqui"

Relacionados

A gente usa cookies pra entender o que funciona e o que não funciona aqui. Sem terceiros — dado fica conosco. Política.