Skip to content
campaiDeveloper
campai.com

Booking · Events

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

Add event date

Adds a date outside the repeat pattern of the specified event’s course. It takes the organization, mandate, event and new period, and returns inserted. Eligible whole-course attendees are added to the new date at no extra charge.

Permissions

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

Who may call it

  • Organization access requires mandate.read and event.edit.
  • The event lookup applies the mandate filter using the caller’s organization access.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired

Body

Content-Type: application/json

  • periodobjectrequired
    2 properties
    • fromstring · date-timerequired
    • tostring · date-timerequired
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/dates' \
  --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

  • insertedid[]
Response200
{
  "inserted": [
    "000000000000000000000001"
  ]
}

What else happens

  • Eligible whole-course attendees are added to the new date at no extra charge.
  • If the course end changes, course booking wallet passes can have their expiry updated and wallet updates requested.
  • Course dates can be renumbered and their shared pattern information updated.
  • Resource reservations can be created for inserted events that use a resource.
  • When waitlisted attendees are copied, waitlist sequence numbers are reserved for the new event.
  • Tag usage is updated for the inserted dates.
  • If relevant event details are updated, associated todo items can be updated.
  • If events are deleted, booking.deleteEventData jobs are queued after the transaction.
  • If events are updated, booking.processEventUpdate jobs are queued after the transaction.
  • If events are deleted, a misc.deleteTodoItems job is queued for their todo items.
  • When applicable event updates are processed, associated bookings can have their event date or title updated.

Errors

Other errors

StatusErrorWhen
400Dates can only be added to a course that is not canceled or deleted.If the course is not active, the request returns HTTP 400 with booking.event.addEventDate.courseNotActive.
400The event cannot overlap another event in the same series.If the new period overlaps another event in the series, the request returns HTTP 400 with booking.event.validateNoEventSeriesOverlap.overlappingOccurrenceInSeries.
400Invalid iCalendar URLIf a blocking iCalendar contains no valid event and its errors are not ignored, the request returns HTTP 400 with booking.event.invalidIcalendarUrl.
400One of the events deleted in the operation cannot be deleted because it has bookings. Please cancel the events first to refund all its bookings.If an event to be deleted is in the future, is not canceled and has a non-canceled booking, the request returns HTTP 400 with booking.event.eventMutation.hasBookings.
404The given event was not foundIf the event is not found in the applicable organization and mandate, the request returns HTTP 404 with booking.event.eventNotFound.
404The given site was not foundIf a resource availability check cannot find the requested site on the resource, the request returns HTTP 404 with booking.resource.siteNotFound.
404Resource was not foundIf an inserted event refers to a resource that cannot be found, the request returns HTTP 404 with booking.event.applyEventResourceReservationMutation.resourceNotFound.
404Resource was not foundThe same HTTP 404 error can occur if a resource needed to recheck an updated event cannot be found.
404Event was not foundIf an event needed for a resource reservation update cannot be found, the request returns HTTP 404 with booking.event.applyEventResourceReservationMutation.eventNotFound.

Errors nearly every request can meet are listed under Errors.