Skip to content
campaiDeveloper
campai.com

Booking · Events

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

Add event pattern

Adds a repeat pattern to the course of a specific event. The pattern repeats by the given rule from the given first date, whose time and length all its dates have, at the given place. Its dates are copies of a date of the course and reach as far ahead as the course has dates. Attendees who booked the whole course are added to the new dates at no extra charge, unless they are booked as single dates only, which needs an event that takes both.

Permissions

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

Permission checks in detail
Required permissions
  • mandate.read
  • event.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired

Body

Content-Type: application/json

  • rrulestringrequired
  • periodobjectrequired
    2 properties
    • fromstring · date-timerequired
    • tostring · date-timerequired
  • placeobjectrequirednullable
    5 properties
    • typestringrequired
      resource address online
    • resourceobject
      6 properties
      • siteidrequired
      • siteNamestringrequired

        at least 1 characters

      • siteAddressobjectrequired
        7 properties
        • countrystringrequired
        • statestring
        • zipstringrequired

          at most 10 characters

        • citystringrequired

          at most 45 characters

        • addressLinestringrequired

          at most 45 characters

        • details1string

          at most 45 characters

        • details2string

          at most 45 characters

      • resourceidrequired
      • resourceNamestringrequired
      • quantityinteger

        default 1

    • addressobject
      7 properties
      • countrystringrequired
      • statestring
      • zipstringrequired

        at most 10 characters

      • citystringrequired

        at most 45 characters

      • addressLinestringrequired

        at most 45 characters

      • details1string

        at most 45 characters

      • details2string

        at most 45 characters

    • locationobjectnullable
      2 properties
      • latitudenumberrequired

        -90–90

      • longitudenumberrequired

        -180–180

    • onlineobject
      2 properties
      • urlstring · urirequired

        at most 300 characters

      • instructionsstringrequired

        at most 400 characters

  • wholeCourseboolean

    default true

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' \
  --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"
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.