PipeCordocs
Referência da API

Negócios

Crie e acompanhe negócios (deals) dentro dos seus funis de venda.

Listar negócios

GET/api/v1/deals

Requer crm:read. Aceita limit, offset e query (busca por nome).

bash
curl "https://app.pipecor.com/api/v1/deals?limit=25" \
  -H "Authorization: Bearer SUA_CHAVE_DE_API"

Criar negócio

POST/api/v1/deals

Requer crm:write. Campos aceitos: name (obrigatório), pipeline_id, stage_id, estimated_value, contact_id, status, temperature, external_id e custom_fields.

bash
curl -X POST https://app.pipecor.com/api/v1/deals \
  -H "Authorization: Bearer SUA_CHAVE_DE_API" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Plano PME - Construtora Alfa",
    "pipeline_id": "PIPELINE_ID",
    "stage_id": "STAGE_ID",
    "contact_id": "CONTACT_ID",
    "estimated_value": 4800,
    "temperature": "hot"
  }'

Os identificadores de pipeline_id e stage_id vêm do endpoint de pipelines. Se omitidos, o negócio entra no pipeline padrão.

Consultar e atualizar

GET/api/v1/deals/{id}
PATCH/api/v1/deals/{id}

Consulta requer crm:read; atualização requer crm:write. Para mover o negócio de etapa, envie o novo stage_id no PATCH.

bash
curl -X PATCH https://app.pipecor.com/api/v1/deals/DEAL_ID \
  -H "Authorization: Bearer SUA_CHAVE_DE_API" \
  -H "Content-Type: application/json" \
  -d '{ "stage_id": "NOVA_ETAPA_ID" }'