Skip to content
campaiDeveloper
campai.com

Booking ยท Bookings

POST/{organizationId}/{mandateId}/booking/bookings/{bookingId}/anonymize

Anonymise booking

Anonymises an event booking and its attendees using the organization, mandate and booking IDs. The booking must be cancelled or have no upcoming non-cancelled attendees. Amounts, receipts and accounting remain. An already anonymised event booking is left unchanged, and the endpoint returns no content.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have organization access.
  • The caller needs mandate.read.
  • The caller needs booking.edit.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • bookingIdidrequired
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/YOUR_BOOKING_ID/anonymize' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

No response body is specified.

What else happens

  • For an eligible booking that is not already anonymised, the endpoint anonymises its buyer details, clears payment and form data, and sets anonymizedAt.
  • It anonymises the booking's attendees and clears their contact details, membership numbers, form data and notes.
  • It replaces names and clears membership numbers on the booking's wallet passes.
  • It requests updates for wallet passes that have built output, Apple registrations or Google installation events.
  • It permanently deletes history items sourced from the booking.

Errors

Other errors

StatusErrorWhen
400Only event bookings can be anonymised.If the booking is not an event booking, the endpoint returns 400 BAD_REQUEST with key routes.booking.bookings.anonymizeBooking.onlyEvents.
400This booking still has upcoming dates. Cancel it first or wait until its dates are over.If an event booking is not already anonymised or cancelled and has an upcoming non-cancelled attendee, the endpoint returns 400 BAD_REQUEST with key routes.booking.bookings.anonymizeBooking.stillActive.
404Booking was not foundIf the booking is not found, the endpoint returns 404 NOT_FOUND with key routes.booking.bookings.noBooking.

Errors nearly every request can meet are listed under Errors.