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-productsandGET /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(MANUALis 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 theirkey,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(andblock_message),remainingunits — per variant invariantswhen the capacity is counted per variant; variants sharing abucket_iddraw 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.
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 thestart_atof/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 whenper_coveris false),variants,extras, the answers to the product’s questions inmetadataunder theirkey,assigned_staff_id, and yourexternal_id. - Money:
payment: "none"(default) leaves everything to pay on site.payment: "paid_elsewhere"withexternal_payment_referencerecords each line paid to you at the catalog price, add-ons included (providerPARTNER, your reference inpayments[].external_reference); it needsPAYMENTS_WRITE, andbypass_approvalon 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 givespayment_url(withACTIVITIES_READ_SENSITIVE). The link goes to the guest unless you setsend_payment_linkorsend_client_notificationstofalse; 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(defaulttrue) sends the confirmation or the request now and the reminder the day before;falsewhen you tell the guest yourself. The team is told as for an online booking, unlesssend_staff_notifications: false(ACTIVITIES_FORCE_INSERT). - Forcing:
bypass_availabilitytakes a full slot, a time off the grid or a closed day — never one gone by (ACTIVITIES_FORCE_INSERT);bypass_approvalconfirms 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 (200instead of201); another body under the same reference is refused (409,details.existing_id). Without it, a retry books again. - Refusals:
422 VALIDATION_ERRORwithdetails.reason(capacity,slot,day,party,fields,approval,blacklisted…) anddetails.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,nullto take them off), answers (metadata: each answer sent replaces its own; a required question cannot be emptied),commentandtags, and records whether the guest came (presence:SHOWED_UP,NO_SHOW, orCONFIRMEDto undo either). A move is checked as a booking is, andbypass_availabilityforces 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 (409otherwise).party_sizedoes not change.PATCH /activity-carts/{id}(ACTIVITIES_WRITE) changes the cart’s guest (customer;nulltakes them off; a blacklisted guest is refused), the room (hotel_guest), and sets itsexternal_idwhen it has none (409when 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 yourreference). It needs anIdempotency-Keyheader, 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}/cancelandPOST /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 inmoneywhat became of each paid line:refunded,kept(with itsreason),checking(the payment provider’s answer is awaited) orfailed(the restaurant settles it). Already cancelled:200, nothing done.- Messages:
send_client_notifications(defaulttrue) 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 withsend_client_notifications: true, as the reminder. The restaurant’s team is told of every move and cancellation. In the activity’s history your calls readAPI · <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
WithoutACTIVITIES_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.
- Keep the time of your previous sync and pass it as
updated_since. - Follow
pagination.next_cursoruntilhas_moreisfalse. - Deduplicate on
id:updated_sinceis inclusive, and a change during the walk can return an activity twice.
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 (
404once deleted), or listen toactivity.deleted. - Deleting a payment line, or deleting the customer, does not move
updated_at.