Skip to content
campaiDeveloper
campai.com

Crm · Contacts · Statistics

GET/{organizationId}/{mandateId}/crm/contacts/statistics/sponsorDevelopmentReads only

Get sponsor development

Returns the contacts of the sponsor type and how many of them were added in a period, the subscriptions of sponsors running today and at the start of the period, the plans with the most running sponsor 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, and the running sponsor subscriptions that end within the next three months, the soonest first

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
  • contact:sponsor.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/contacts/statistics/sponsorDevelopment' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • summaryobject
    5 properties
    • sponsorsinteger

      at least 0

    • newSponsorsinteger

      at least 0

    • activePackagesinteger

      at least 0

    • activePackagesAtStartinteger

      at least 0

    • renewalsinteger

      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
  • renewalsobject[]
    6 properties
    • contactIdid
    • namestring
    • planNamestring
    • endAtstring
    • intervalstringnullable
      month quarter halfYear year custom flexible
    • priceintegernullable
Response200
{
  "summary": {
    "sponsors": 0,
    "newSponsors": 0,
    "activePackages": 0,
    "activePackagesAtStart": 0,
    "renewals": 0
  },
  "plans": [
    {
      "planId": "000000000000000000000001",
      "name": "string",
      "activeCount": 1,
      "pausedCount": 0,
      "terminatingCount": 0,
      "upcomingCount": 0,
      "nextCollectAt": "string",
      "interval": "month",
      "price": 1
    }
  ],
  "renewals": [
    {
      "contactId": "000000000000000000000001",
      "name": "string",
      "planName": "string",
      "endAt": "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.