Skip to content
campaiDeveloper
campai.com

Sales ยท Statistics

GET/{organizationId}/{mandateId}/sales/statistics/pipelineReads only

Get pipeline

Returns the opportunities created in a period that are still open, with their count and expected value in cents in total and per phase

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • opportunity.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Query parameters

  • fromDatestringrequired
  • toDatestringrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/sales/statistics/pipeline' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • opportunityCountinteger

    at least 0

  • expectedValuenumber

    at least 0

  • stagesobject[]
    3 properties
    • stagestring
      new qualified offer negotiation
    • opportunityCountinteger

      at least 0

    • expectedValuenumber

      at least 0

Response200
{
  "opportunityCount": 0,
  "expectedValue": 0,
  "stages": [
    {
      "stage": "new",
      "opportunityCount": 0,
      "expectedValue": 0
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.