Skip to content
campaiDeveloper
campai.com

Crm · Contacts · Statistics

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

Get member development

Returns the active members today and at the start of a period, their entries and exits in the period and in the period of the same length right before it, the active members, entries and exits per month, the active members per age group and department today and at the end of each month, the active members today in the departments nested in each department, and the next entries, exits, birthdays and anniversaries. Departments are null without read access to them

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:member.read
Also checked, depending on the request and the records it touches
  • department.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/memberDevelopment' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • summaryobject
    6 properties
    • activeinteger

      at least 0

    • activeAtStartinteger

      at least 0

    • entriesinteger

      at least 0

    • exitsinteger

      at least 0

    • previousEntriesinteger

      at least 0

    • previousExitsinteger

      at least 0

  • monthsobject[]
    6 properties
    • datestring
    • activeMembersinteger

      at least 0

    • entriesinteger

      at least 0

    • exitsinteger

      at least 0

    • ageGroupsobject of integer
    • departmentsobject of integernullable
  • ageGroupsobject[]
    4 properties
    • keystring
    • labelstring
    • agesinteger[]nullable
    • countinteger

      at least 0

  • departmentsobject[]nullable
    6 properties
    • departmentid
    • parentidnullable
    • namestring
    • colorstring
    • countinteger

      at least 0

    • nestedCountinteger

      at least 0

  • upcomingChangesobject[]
    4 properties
    • contactIdid
    • namestring
    • celebrationTypestring
      birthday anniversary exit entry
    • datestring
  • celebrationsobject[]
    5 properties
    • contactIdid
    • namestring
    • celebrationTypestring
      birthday anniversary exit entry
    • datestring
    • yearsnumber
Response200
{
  "summary": {
    "active": 0,
    "activeAtStart": 0,
    "entries": 0,
    "exits": 0,
    "previousEntries": 0,
    "previousExits": 0
  },
  "months": [
    {
      "date": "string",
      "activeMembers": 0,
      "entries": 0,
      "exits": 0,
      "ageGroups": {
        "key": 1
      },
      "departments": {
        "key": 1
      }
    }
  ],
  "ageGroups": [
    {
      "key": "string",
      "label": "string",
      "ages": [
        1
      ],
      "count": 0
    }
  ],
  "departments": [
    {
      "department": "000000000000000000000001",
      "parent": "000000000000000000000001",
      "name": "string",
      "color": "string",
      "count": 0,
      "nestedCount": 0
    }
  ],
  "upcomingChanges": [
    {
      "contactId": "000000000000000000000001",
      "name": "string",
      "celebrationType": "birthday",
      "date": "string"
    }
  ],
  "celebrations": [
    {
      "contactId": "000000000000000000000001",
      "name": "string",
      "celebrationType": "birthday",
      "date": "string",
      "years": 1
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.