Skip to content
campaiDeveloper
campai.com

Crm · Contacts · Statistics

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

Get contact type overview

Returns how many contacts of a type are active today and were active on the same date last month, with their entries, exits and active count per month of the given period. Members, employees and contributors use their own start and end dates. The other types have no end date, so their entries are the contacts created in a month, and tracksExits is false

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:<contactType>.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Query parameters

  • contactTypestringrequired
    member address customer sponsor contributor employee supplier
  • 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/typeOverview' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • activeinteger

    at least 0

  • previousMonthActiveinteger

    at least 0

  • tracksExitsboolean
  • monthsobject[]
    4 properties
    • datestring
    • entriesinteger

      at least 0

    • exitsinteger

      at least 0

    • activeMembersinteger

      at least 0

Response200
{
  "active": 0,
  "previousMonthActive": 0,
  "tracksExits": true,
  "months": [
    {
      "date": "string",
      "entries": 0,
      "exits": 0,
      "activeMembers": 0
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.