Skip to content
campaiDeveloper
campai.com

Booking · Events

POST/{organizationId}/{mandateId}/booking/events/{eventId}/patterns/{patternId}/restart

Restart event pattern

Restarts a stopped repeat pattern for a course event using the supplied organization, mandate, event, pattern and from date. New dates keep the pattern’s weekdays, time and place, and reach as far ahead as the course already has dates. People who booked the whole course are added to the new dates at no extra charge. The response contains inserted, the IDs of the inserted events.

Permissions

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

Who may call it

  • Organization access is required, with mandate.read and event.edit permissions.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired
  • patternIdstringrequired

    exactly 10 characters

Body

Content-Type: application/json

  • fromstring · 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/patterns/YOUR_PATTERN_ID/restart' \
  --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

  • Attendee records can be copied to new dates or updated when event details change.
  • Whole-course booking wallet passes can have their expiry dates updated and wallet updates requested.
  • Event records can be changed or deleted as dates are regenerated.
  • Resource reservations can be inserted, updated or deleted.
  • Waitlist sequence numbers can be reserved when waitlisted attendees are copied.
  • Event tag usage can be updated for inserted dates.
  • Related todo items can be updated when event details change.
  • When events are deleted, booking.deleteEventData jobs are queued after the transaction.
  • When events are updated, booking.processEventUpdate jobs are queued after the transaction.
  • When events are deleted, a misc.deleteTodoItems job is queued to remove related todo items.
  • Related bookings can have their event date or title updated when event details change.

Errors

Other errors

StatusErrorWhen
400The repeat patterns of a canceled or deleted course can no longer be restarted.If the course is not active, the request fails with HTTP 400 and booking.event.restartEventPattern.courseNotActive.
400Only a stopped repeat pattern can be restarted.If the repeat pattern is not stopped, the request fails with HTTP 400 and booking.event.restartEventPattern.notStopped.
400The given period is in the past and can not be usedIf there is no next recurring date later than the current time, the request fails with HTTP 400 and booking.event.periodInThePast.
400The event can not repeat within the same time it still takes placeIf consecutive repeat dates are no farther apart than the event duration, the request fails with HTTP 400 and booking.event.applyEventScheduleMutation.ruleRangeLessThanPeriod.
400The dates of a course cannot overlap each other.If course dates overlap, the request can fail with HTTP 400 and booking.event.applyEventScheduleMutation.overlappingDates.
400Invalid iCalendar URLIf an iCalendar blocking calendar contains no valid event, and calendar errors are not ignored, the request fails with HTTP 400 and 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 a future, uncanceled event to be deleted has an uncanceled booking, the request fails with HTTP 400 and booking.event.eventMutation.hasBookings.
404The given event was not foundIf the event is not found in the permitted organization and mandate, the request fails with HTTP 404 and booking.event.eventNotFound.
404The repeat pattern was not found.If the event does not have the requested pattern, the request fails with HTTP 404 and booking.event.getEventCoursePattern.patternNotFound.
404The given site was not foundIf a resource’s requested site is not found, the request fails with HTTP 404 and booking.resource.siteNotFound.
404Resource was not foundIf a resource needed for an inserted or updated event is not found, the request can fail with HTTP 404 and booking.event.applyEventResourceReservationMutation.resourceNotFound.
404Event was not foundIf an event being updated cannot be found, the request fails with HTTP 404 and booking.event.applyEventResourceReservationMutation.eventNotFound.

Errors nearly every request can meet are listed under Errors.