Skip to main content

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.

ToolDescriptionRead-only?
list_passesThe 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_passOne pass by its code, or every pass a customer holds. For a membership: its state, member discount and next monthly chargeYes
create_passCreate a passNo
update_passChange a pass: name, price, visits, dates or how long it runs from purchase, who can buy it, what it coversNo
redeem_passUse a pass on an existing bookingNo
apply_membership_to_bookingPut a member discount on an existing bookingNo
cancel_membershipCancel a membership, now or at the end of the paid monthNo

lookup_passโ€‹

NameTypeRequiredDescription
codestringNoThe pass code
customer_idintegerNoList every pass this customer holds instead

create_passโ€‹

NameTypeRequiredDescription
namestringYesWhat customers see
pricenumberYesIn the shop's currency. For a membership, the monthly fee
billingstringNoonce (default): a season pass. monthly: a membership, charged every month, with no visits or dates. Needs Stripe
discount_percentnumberWith monthly1 to 100. The member discount, off every line it covers
visitsintegerNoLeave out for unlimited visits
valid_from, valid_tostring Y-m-dNoThe dates it works, both included
valid_forintegerNoInstead 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_unitstringNomonths or days. Left out, a pass keeps the unit it has; a new one uses months
experience_applies_tostringNoall, categories, experiences or none
rental_applies_tostringNoall, categories, products or none
experience_ids, product_idsinteger[]NoThe chosen items
experience_category_ids, product_category_idsinteger[]NoThe chosen categories (what sits under them counts)
who_can_buystringNoeveryone (default), staff_only (POS and the app only) or off (not for sale)
user_confirmedbooleanYesMust 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.

NameTypeRequiredDescription
pass_idintegerYesThe pass, from list_passes
name, description, price, visitsNovisits: 0 means unlimited
billing, discount_percentNoAs on create_pass. Members keep the price and discount they signed up at
valid_from, valid_tostring Y-m-dNoEmpty for no date. A date switches a pass that ran from purchase back to fixed dates
valid_for, valid_for_unitNoAs on create_pass; clears the fixed dates. valid_for: 0 switches back to dates
who_can_buystringNoeveryone, staff_only or off
experience_applies_to, rental_applies_tostringNoAs on create_pass
experience_ids, product_ids, experience_category_ids, product_category_idsinteger[]NoReplace that list
user_confirmedbooleanYesMust 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.

NameTypeRequiredDescription
booking_idintegerYesThe booking
codestringYesThe pass code
user_confirmedbooleanYesMust 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.

NameTypeRequiredDescription
booking_idintegerYesThe booking
codestringYesThe membership code
user_confirmedbooleanYesMust 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.

NameTypeRequiredDescription
codestringNoThe membership code
customer_pass_idintegerNoThe membership, from lookup_pass, instead of the code
nowbooleanNotrue ends it today
user_confirmedbooleanYesMust be true - the owner confirmed