Skip to content
campaiDeveloper
campai.com

Booking ยท Bookings

GET/{organizationId}/{mandateId}/booking/booking-trendReads only

Get booking trend

Returns how many bookings of each type were made per month of the given period, and their amount in cents. Months without bookings of a type and canceled bookings are left out

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
  • booking.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/booking/booking-trend' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • entriesobject[]
    4 properties
    • monthstring
    • typestring
      event resource
    • countinteger

      at least 0

    • amountnumber

      at least 0

Response200
{
  "entries": [
    {
      "month": "string",
      "type": "event",
      "count": 0,
      "amount": 0
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.