Skip to content
campaiDeveloper
campai.com

Crm · Contracts · Statistics

GET/{organizationId}/{mandateId}/crm/contracts/statistics/contractDevelopmentReads only

Get contract development

Returns the running subscriptions today and at the start of a period, the paused ones today, the ones ended in the period and in the period of the same length right before it, and the plans with the most running subscriptions, each with how many of them are paused or terminating, how many are still to start, the next collection date still to come, the interval and the fixed price

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
  • plan.read
  • contract.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/crm/contracts/statistics/contractDevelopment' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • summaryobject
    5 properties
    • activeinteger

      at least 0

    • activeAtStartinteger

      at least 0

    • pausedinteger

      at least 0

    • endedinteger

      at least 0

    • previousEndedinteger

      at least 0

  • plansobject[]
    9 properties
    • planIdid
    • namestring
    • activeCountinteger
    • pausedCountinteger

      at least 0

    • terminatingCountinteger

      at least 0

    • upcomingCountinteger

      at least 0

    • nextCollectAtstringnullable
    • intervalstringnullable
      month quarter halfYear year custom flexible
    • priceintegernullable
Response200
{
  "summary": {
    "active": 0,
    "activeAtStart": 0,
    "paused": 0,
    "ended": 0,
    "previousEnded": 0
  },
  "plans": [
    {
      "planId": "000000000000000000000001",
      "name": "string",
      "activeCount": 1,
      "pausedCount": 0,
      "terminatingCount": 0,
      "upcomingCount": 0,
      "nextCollectAt": "string",
      "interval": "month",
      "price": 1
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.