Skip to content
campaiDeveloper
campai.com

Booking ยท Events

POST/{organizationId}/{mandateId}/booking/events/{eventId}/anonymize

Anonymise event bookings

Anonymizes personal data for an event date that is over. It takes organizationId, nullable mandateId, and eventId, and returns anonymizedBookings, the number of bookings selected for anonymization. Bookings with attendees in later dates are kept; amounts, receipts, and accounting remain.

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 with mandate.read, event.edit, and booking.edit permissions.

Request

Path parameters

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

Response

200 Successful response

Content-Type: application/json

  • anonymizedBookingsinteger

    at least 0

Response200
{
  "anonymizedBookings": 0
}

What else happens

  • It anonymizes selected bookings that are not already anonymized, including buyer details, payment details, and form results.
  • It anonymizes attendees associated with the selected bookings.
  • It also anonymizes attendees of the event who have no booking.
  • It replaces names and membership numbers on wallet passes for selected bookings and requests updates for passes that have been built or added to a wallet. Pass codes remain valid.
  • It deletes history items associated with the selected bookings.
  • It deletes event interests for the event.
  • It sets the event's anonymizedAt timestamp.

Errors

Other errors

StatusErrorWhen
400Only dates that are over can be anonymised.If the event has not ended, the endpoint returns HTTP 400 with key routes.booking.events.anonymizeEvent.notOver.
404The given event was not foundIf the event is not found, the endpoint returns HTTP 404 with key booking.event.eventNotFound.

Errors nearly every request can meet are listed under Errors.