Passes Tools
Season passes and memberships: list the passes a shop sells, look up a customer's pass by its code, create a pass or a monthly membership, use a pass on a booking, put a member discount on a booking, and cancel a membership. See Passes for how visits work and Memberships for the monthly fee and the member discount.
Required scope: store:read for reading, store:write to create or change a pass or cancel a
membership, bookings:write to use a pass or a member discount on a booking.
| Tool | Description | Read-only? |
|---|---|---|
list_passes | The passes the shop sells: price, once or monthly, member discount, visits, how long each is valid (valid: the dates, or for example Valid for 12 months from purchase), what each covers, how many are held, and the newest 25 holders of each with the day they joined (holders: holder, customer_id, joined, joined_on as Y-m-d in the shop's time zone, status) | Yes |
lookup_pass | One pass by its code, or every pass a customer holds. For a membership: its state, member discount and next monthly charge | Yes |
create_pass | Create a pass | No |
update_pass | Change a pass: name, price, visits, dates or how long it runs from purchase, who can buy it, what it covers | No |
redeem_pass | Use a pass on an existing booking | No |
apply_membership_to_booking | Put a member discount on an existing booking | No |
cancel_membership | Cancel a membership, now or at the end of the paid month | No |
lookup_passโ
| Name | Type | Required | Description |
|---|---|---|---|
code | string | No | The pass code |
customer_id | integer | No | List every pass this customer holds instead |
create_passโ
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | What customers see |
price | number | Yes | In the shop's currency. For a membership, the monthly fee |
billing | string | No | once (default): a season pass. monthly: a membership, charged every month, with no visits or dates. Needs Stripe |
discount_percent | number | With monthly | 1 to 100. The member discount, off every line it covers |
visits | integer | No | Leave out for unlimited visits |
valid_from, valid_to | string Y-m-d | No | The dates it works, both included |
valid_for | integer | No | Instead of dates: how long each pass works from the day it is bought (12 with months = valid for 12 months from purchase). Not with valid_from / valid_to |
valid_for_unit | string | No | months or days. Left out, a pass keeps the unit it has; a new one uses months |
experience_applies_to | string | No | all, categories, experiences or none |
rental_applies_to | string | No | all, categories, products or none |
experience_ids, product_ids | integer[] | No | The chosen items |
experience_category_ids, product_category_ids | integer[] | No | The chosen categories (what sits under them counts) |
who_can_buy | string | No | everyone (default), staff_only (POS and the app only) or off (not for sale) |
user_confirmed | boolean | Yes | Must be true - the owner confirmed |
Id lists with no *_applies_to set that module to the items or categories they name.
update_passโ
Send only what changes. Passes customers already bought keep what they bought.
| Name | Type | Required | Description |
|---|---|---|---|
pass_id | integer | Yes | The pass, from list_passes |
name, description, price, visits | No | visits: 0 means unlimited | |
billing, discount_percent | No | As on create_pass. Members keep the price and discount they signed up at | |
valid_from, valid_to | string Y-m-d | No | Empty for no date. A date switches a pass that ran from purchase back to fixed dates |
valid_for, valid_for_unit | No | As on create_pass; clears the fixed dates. valid_for: 0 switches back to dates | |
who_can_buy | string | No | everyone, staff_only or off |
experience_applies_to, rental_applies_to | string | No | As on create_pass |
experience_ids, product_ids, experience_category_ids, product_category_ids | integer[] | No | Replace that list |
user_confirmed | boolean | Yes | Must be true - the owner confirmed |
redeem_passโ
Every person, group or rental unit on the first line the pass covers comes to zero, one visit
each, up to the visits left. The result reports visits_used. In an agent run this always waits
for the owner's approval.
| Name | Type | Required | Description |
|---|---|---|---|
booking_id | integer | Yes | The booking |
code | string | Yes | The pass code |
user_confirmed | boolean | Yes | Must be true - the owner confirmed |
apply_membership_to_bookingโ
The member discount comes off every line the membership covers. A promo code already on the booking stays if it takes more off. In an agent run this always waits for the owner's approval, and the approval card shows the booking, the membership and what comes off.
| Name | Type | Required | Description |
|---|---|---|---|
booking_id | integer | Yes | The booking |
code | string | Yes | The membership code |
user_confirmed | boolean | Yes | Must be true - the owner confirmed |
cancel_membershipโ
By default it keeps working to the end of the month already paid for, then stops. It is not charged again. This always waits for the owner's approval.
| Name | Type | Required | Description |
|---|---|---|---|
code | string | No | The membership code |
customer_pass_id | integer | No | The membership, from lookup_pass, instead of the code |
now | boolean | No | true ends it today |
user_confirmed | boolean | Yes | Must be true - the owner confirmed |