Skip to content
campaiDeveloper
campai.com

Booking · Bookings

POST/{organizationId}/{mandateId}/booking/bookings/export

Export bookings

Exports bookings for a given mandate

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

Body

Content-Type: application/json

  • typestring
    event resource
  • contactIdid
  • searchTermstring
  • userFilterstringnullable

    A stringified json object representing a property filter

  • formatstringrequired
    csv xlsx
  • formatOptionsobject
    1 property
    • xlsxobject
      2 properties
      • arrayFormatstring
        line comma columns
      • unmergedGroupHeaderboolean
  • propertyPathsstring[]

    1–1000 items · each at least 1 characters

  • selectionobject
    2 properties
    • excludeIdsid[]

      1–1000 items

    • idsid[]

      1–1000 items

  • sortobject of string
    asc desc
    Keys: one of 64 values or 1 pattern
    _id mandate type bookingNumber buyer.type buyer.name buyer.nameNormalized buyer.nameSort buyer.email buyer.phone buyer.address.country buyer.address.state buyer.address.zip buyer.address.city buyer.address.addressLine buyer.address.details1 buyer.address.details2 buyer.userId buyer.account buyer.contact.name buyer.contact.type buyer.contact.nameNormalized buyer.contact.nameSort buyer.contact.contact buyer.contact.image.resource buyer.contact.image.fileName buyer.contact.image.contentType buyer.contact.image.fileSizeBytes buyer.contact.user.name buyer.contact.user.type buyer.contact.user.userId buyer.contact.user.image.resource buyer.contact.user.image.fileName buyer.contact.user.image.contentType buyer.contact.user.image.fileSizeBytes buyer.payment.paymentMethod buyer.payment.sepaDirectDebit.iban buyer.payment.sepaDirectDebit.bic buyer.payment.online.paymentIntent buyer.payment.online.provider buyer.payment.online.paymentMode buyer.payment.online.onlineDebitCollection buyer.personName buyer.receiptMode receipts formResult.schema totalPrice totalPoints usedPunchCardNumbers discountCode status paymentStatus cancelations records createdAt event.event event.eventTitle event.eventDate event.seriesId event.qrPasses event.refundPolicies event.invitationCode resource.resources resource.resourceNames

    pattern ^formResult\.data\.[\s\S]{0,}$

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/bookings/export' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

object

Response200
{
  "state": "empty"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.