Skip to main content
An activity is a booking of one of the restaurant’s activity products (a hammam, a massage, a guided visit…) at a day and time, for a number of people. Activities booked together by the same guest share a cart_id: one customer, one hotel room, one payment page. Reading requires ACTIVITIES_READ; booking and changing require ACTIVITIES_WRITE; cancelling, ACTIVITIES_CANCEL.

Products and slots

Before booking, read what the restaurant sells. These calls need the restaurant’s activities module (403 FEATURE_NOT_ENABLED otherwise).
  • GET /activity-products and GET /activity-products/{id} (CATALOG_ACTIVITIES_READ): each product with its terms — duration, slot grid (interval_minutes, opening_times), days, seasons, booking window (min_days_in_advance, max_days_in_advance), confirmation (MANUAL is a request the restaurant accepts), per_cover (units per person, or one formula for the whole group) — its payment terms, the questions the portal asks (fields, answered under their key, field-0, field-1…), its variants with their price in minor units, and its add-ons (extras).
  • GET /activity-availability?product_id=…&from=…&to=… (AVAILABILITY_READ): up to 31 days. Each day says why it is closed (closed_reason: WEEKDAY, SEASON, TOO_SOON, TOO_FAR) or lists its slots: time, start_at, bookable, blocked (and block_message), remaining units — per variant in variants when the capacity is counted per variant; variants sharing a bucket_id draw on one capacity. A slot that has begun is not listed, nor a time the clock skips when summer time starts. Units are resources (cabins, places), not guests.
  • GET /activity-staff (ACTIVITIES_READ_SENSITIVE): the staff an activity can be assigned to.
Audience. By default you read what the booking portal offers. Pass prescriber_id to read it as that prescriber sees it (its exclusive offers included); an unknown or archived prescriber is refused (422). audience=all adds the internal and exclusive offers and requires ACTIVITIES_FORCE_INSERT. A product the audience cannot see answers 404. The API stays open when the booking portal is closed: to stop a partner, revoke its key.

Book activities

POST /activity-carts (ACTIVITIES_WRITE) books one or more activities for one guest; POST /activity-carts/{id}/activities adds one to a cart; GET /activity-carts/{id} reads it back. The guest is booked as on the booking portal — the day, the slot and the capacity are checked, a product the restaurant approves becomes a request (PENDING) — but the portal does not have to be open.
  • Lines: product_id, start_at (one of the start_at of /activity-availability; an instant the restaurant’s clock does not show is refused), party_size (what the units cover: units × covers_per_unit, or within the formula’s covers when per_cover is false), variants, extras, the answers to the product’s questions in metadata under their key, assigned_staff_id, and your external_id.
  • Money: payment: "none" (default) leaves everything to pay on site. payment: "paid_elsewhere" with external_payment_reference records each line paid to you at the catalog price, add-ons included (provider PARTNER, your reference in payments[].external_reference); it needs PAYMENTS_WRITE, and bypass_approval on a product the restaurant approves. The restaurant’s statistics count that money apart. payment: "payment_link" leaves the lines owed online for the guest to pay on the booking portal: the activity awaits its payment (CONFIRMED_PENDING_PAYMENT) and the cart gives payment_url (with ACTIVITIES_READ_SENSITIVE). The link goes to the guest unless you set send_payment_link or send_client_notifications to false; a restaurant with no online payment refuses it (422, no_online_payment). A product the restaurant approves stays a request, payable once accepted. An unpaid line expires at the product’s deadline and cancels its activity.
  • Messages: send_client_notifications (default true) sends the confirmation or the request now and the reminder the day before; false when you tell the guest yourself. The team is told as for an online booking, unless send_staff_notifications: false (ACTIVITIES_FORCE_INSERT).
  • Forcing: bypass_availability takes a full slot, a time off the grid or a closed day — never one gone by (ACTIVITIES_FORCE_INSERT); bypass_approval confirms a product to approve (ACTIVITIES_FORCE_CONFIRM); audience: "all" books internal and exclusive offers (ACTIVITIES_FORCE_INSERT).
  • Retries: with external_id, the same body sent again answers the cart (200 instead of 201); another body under the same reference is refused (409, details.existing_id). Without it, a retry books again.
  • Refusals: 422 VALIDATION_ERROR with details.reason (capacity, slot, day, party, fields, approval, blacklisted…) and details.line, the line it is about.
POST /activity-availability/check (AVAILABILITY_READ) runs every check on the same body and books nothing; nothing is held.

Change and cancel

What a call leaves out stays as it is.
  • PATCH /activities/{id} (ACTIVITIES_WRITE) moves the activity (start_at), changes who runs it (assigned_staff_id, null to take them off), answers (metadata: each answer sent replaces its own; a required question cannot be emptied), comment and tags, and records whether the guest came (presence: SHOWED_UP, NO_SHOW, or CONFIRMED to undo either). A move is checked as a booking is, and bypass_availability forces it the same way (ACTIVITIES_FORCE_INSERT); the payment deadlines follow the new slot. A no-show undone takes its place back only if it is still free. Only a request or a booking moves (409 otherwise). party_size does not change.
  • PATCH /activity-carts/{id} (ACTIVITIES_WRITE) changes the cart’s guest (customer; null takes them off; a blacklisted guest is refused), the room (hotel_guest), and sets its external_id when it has none (409 when it has another).
  • POST /activities/{id}/payments/{paymentId}/collect (PAYMENTS_WRITE) records a line still owed as paid: at the venue (CASH, CREDIT_CARD, WIRE_TRANSFER) or to you (PARTNER, with your reference). It needs an Idempotency-Key header, confirms an activity once nothing else is owed online on it, and is refused while the guest is paying that activity online (409, details.reason: checkout_open: retry in 15 minutes).
  • POST /activities/{id}/cancel and POST /activity-carts/{id}/cancel (ACTIVITIES_CANCEL) cancel as the restaurant (CANCELED_BY_RESTAURANT): a request, a booking, or one who came — a no-show or a refusal is an end (409). In the 5 minutes after a CMI payment the cancellation is refused (409, details.reason: capture_pending): retry shortly. Money paid online is refunded by the product’s terms; money you took (PARTNER) stays recorded as paid, yours to give back. The answer gives the cart, cancelled_ids, and in money what became of each paid line: refunded, kept (with its reason), checking (the payment provider’s answer is awaited) or failed (the restaurant settles it). Already cancelled: 200, nothing done.
  • Messages: send_client_notifications (default true) tells the guest of a new slot, a no-show or a cancellation; a note or a tag changed sends nothing. The no-show message goes a few minutes later, and only if the cart was booked with send_client_notifications: true, as the reminder. The restaurant’s team is told of every move and cancellation. In the activity’s history your calls read API · <the name of your key>.

The activity resource

GET /activities/{id} returns the activity: status, start_at (an instant with the restaurant’s offset in force), party_size, the product, the variants booked with their quantities (variant names the variant when there is exactly one), the assigned_staff (who runs it, chosen by the staff), the prescriber, the cart’s customer and hotel_guest, the guest’s additional_comment, the portal’s custom fields (metadata), attached_files, tags, the cancellation_reason, and the money: payment_summary and the payment lines (payments). Amounts are in minor units (60000 is 600.00 MAD).

Masked view

Without ACTIVITIES_READ_SENSITIVE, the activity is masked (sensitive_data_included: false): the customer’s email, phone_number and lang, additional_comment, metadata and hotel_guest.room_number are null, attached_files is [] and payments is null. The customer’s name and id, the prescriber, the staff, the tags, the cancellation reason and the payment_summary stay visible, as for a masked reservation.

Keep a copy in sync

GET /activities lists the activities in updated_at then id order, with cursor pagination. updated_at is the last change of the activity, its cart or its payment lines: a payment moves it.
  1. Keep the time of your previous sync and pass it as updated_since.
  2. Follow pagination.next_cursor until has_more is false.
  3. Deduplicate on id: updated_since is inclusive, and a change during the walk can return an activity twice.
Filters: start_at_from, start_at_to, status (several separated by commas), customer_id, and your references external_id and cart_external_id. What the list cannot tell:
  • A deleted activity is no longer listed. Compare with a full list now and then, or read the ids you hold (404 once deleted), or listen to activity.deleted.
  • Deleting a payment line, or deleting the customer, does not move updated_at.
Activity webhooks tell each change as it happens; the list is how you catch up on what a webhook missed.