PEPINO ZAPdocs
Referência da APINegocios

Lista os negocios

Ver como Markdown
GET
/v1/deals

Lista os negocios do Projeto (recorte com pipelineId, contactId ou status). O valor (value) e em reais.

Authorization

bearerAuth
AuthorizationBearer <token>

API key enviada como Authorization Bearer pzk_live_...

In: header

Query Parameters

pipelineId?string

Somente negocios deste funil.

contactId?string

Somente negocios deste contato.

status?string

incoming (fila de aceite), open (em andamento), won (ganho) ou lost (perdido).

Value in"incoming" | "open" | "won" | "lost"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/deals"
{
  "deals": [
    {
      "id": "string",
      "pipelineId": "string",
      "stageId": "string",
      "contactId": "string",
      "contactName": "string",
      "contactPhone": "string",
      "title": "string",
      "value": 0,
      "notes": "string",
      "position": 0,
      "status": "incoming",
      "lostReason": "string",
      "closedAt": "2019-08-24T14:15:22Z",
      "stageEnteredAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "assignedUserId": "string",
      "assignedName": "string",
      "conversationId": "string",
      "lastMessageText": "string",
      "lastMessageAt": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Body invalido"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key ausente ou invalida"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Projeto inativo ou sem permissao"
  }
}