search_businesses
Search businesses
Find businesses listed on BOP in Taiwan (personal trainers and coaches, gyms, group-class studios, saunas, recovery services) by keyword and/or category, with a few of their services and prices. Use this when the user wants to find a coach, gym, class or studio in Taiwan, or wants to book or check times but has not named a business, e.g. 「幫我找台北的健身教練」 or 「週日想上重訓課」. keyword takes place and class words in Chinese or English (business name, city or district, type of class); booking and time words such as 訂、預約、週日 are ignored, so check times with get_availability. Returns up to 10 businesses. If nothing matches the keyword, it returns the listed businesses anyway with matched: false. Read-only.
输入参数limitkeywordcategory
get_business
Get business details
Get one business's public profile (city, address, hours, booking and cancellation policy, contact, FAQ) and its active services with prices, durations and weekly schedules. Use this after search_businesses, or when the user names a business, before checking open times. Read-only.
输入参数business_id必填
get_availability
Check open time slots
List open time slots (Asia/Taipei) for one service in the next 1–14 days, with remaining capacity. Use this when the user asks when they can go or wants a particular day or time (e.g. 「週日早上有空嗎」), and pick the slots on that day and time. Use the returned slot value as-is in request_booking. Read-only.
输入参数daysteacherservice_id必填business_id必填
request_booking
Request a booking
Create a booking (訂課、預約) for one open slot on behalf of the customer, after the customer has agreed to the service, time, quantity and contact details. Sends the customer's name, phone and email to the business. The result is either 'confirmed' or 'pending' (waiting for the business to confirm). Payment is at the venue, unless the business takes online payment (payment in get_business): then the status is 'awaiting_payment' with amount, currency, expires_at and payment_handlers, and the place is held until expires_at for complete_booking. Returns booking_id and a one-time status_token for get_booking_status, complete_booking, modify_booking and cancel_booking. Repeating the call for the same contact details, service and slot is rejected as a duplicate.
输入参数noteslot必填email必填phone必填quantity必填service_id必填business_id必填customer_name必填idempotency_key
complete_booking
Pay for a booking
Pay for a booking (付款) whose status is awaiting_payment, with a payment credential the customer approved for the booking's amount and currency. payment.handler_id must come from the booking's payment_handlers ("stripe_payments"), and credential is {type: "stripe_payment_token", token: "spt_…"}: a Stripe shared payment token issued to the handler's business_profile. Charges the customer once (repeating the call does not charge twice). Returns the booking (confirmed, or pending if the business confirms it) and the payment result; if payment.status is requires_action, open payment.redirect_url for the customer and call again with the same credential.
输入参数payment必填booking_id必填business_id必填status_token必填idempotency_key
modify_booking
Change a booking
Change the slot or quantity (改時間、改人數) of a pending, awaiting_payment or confirmed booking, when the customer asks to. Replaces the booking's time or quantity and frees the old place. Use a slot value from get_availability. A booking paid online can change its slot but not its quantity (cancel and rebook instead). Changes close at the same cutoff as online cancellation.
输入参数slotquantitybooking_id必填business_id必填status_token必填idempotency_key
get_booking_status
Check booking status
Get the current status of a booking made with request_booking (查預約狀態: confirmed, waiting for the business, awaiting online payment, declined, or cancelled), including payment and refund details. Read-only.
输入参数booking_id必填business_id必填status_token必填
cancel_booking
Cancel a booking
Cancel (取消預約) a confirmed, pending or awaiting_payment booking made with request_booking, when the customer asks to. Frees the place for others and cannot be undone; a booking paid online is refunded minus the card processing fee Stripe charged and BOP's fee (5.5% + NT$10). Online cancellation closes at the business's cutoff (online_cancellation in get_business; 120 minutes before the start time unless the business sets a longer one).
输入参数booking_id必填business_id必填status_token必填
get_booking_link
Get external booking link
For businesses whose booking_mode is external_link: get a link to the business's own booking page for one service. The click is counted for the business. Booking and payment happen on that page.
输入参数service_id必填business_id必填