Skip to content
campaiDeveloper
campai.com

Booking ยท Events

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

Settle event

Marks a single event date as settled or reopens it. Supply the organization, nullable mandate and event IDs, and a boolean settled value. Only dates that are over can be settled. The endpoint returns no value.

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 event.edit.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired

Body

Content-Type: application/json

  • settledbooleanrequired
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/settle' \
  --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

No response body is specified.

What else happens

  • The event's settledAt is set to the current time when settled is true, or to null when it is false.

Errors

Other errors

StatusErrorWhen
400Only dates that are over can be marked as settled.If settled is true and the event has not ended, the endpoint returns HTTP 400 with key routes.booking.events.settleEvent.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.