Skip to content
campaiDeveloper
campai.com

Sales ยท Statistics

GET/{organizationId}/{mandateId}/sales/sales-countersReads only

Get sales counters

Returns how many opportunities are open and their expected value in cents, the expected value of the opportunities created from the first of this month until today and in the same days of the previous month, and how many offers are open. The open offers are null without read access to receipts

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
Also checked, depending on the request and the records it touches
  • receipt.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
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/sales-counters' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • openOpportunitiesinteger

    at least 0

  • openValuenumber

    at least 0

  • newValueThisMonthnumber

    at least 0

  • previousMonthNewValuenumber

    at least 0

  • openOffersintegernullable

    at least 0

Response200
{
  "openOpportunities": 0,
  "openValue": 0,
  "newValueThisMonth": 0,
  "previousMonthNewValue": 0,
  "openOffers": 0
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.