{"openapi":"3.1.0","info":{"title":"Setmore API (Bowmark)","version":"e833508f87ff","description":"Setmore booking pages used by salons, clinics, tutors and studios: find a business, read its services, staff, opening hours and open appointment times, and book or cancel as a guest up to the payment step.\n\nEvery function Bowmark has for Setmore (setmore.com) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/setmore/findBusiness":{"post":{"operationId":"findBusiness","summary":"Finds a Setmore business from its booking-page link (<slug>.setmore.com, or booking.setmore.com/scheduleappointment/<companyId>/...), its bare slug (\"barbershop\"), or its company id, and returns the c","description":"Finds a Setmore business from its booking-page link (<slug>.setmore.com, or booking.setmore.com/scheduleappointment/<companyId>/...), its bare slug (\"barbershop\"), or its company id, and returns the company id, slug, name, business type and city. This is the door every other function's business reference comes from. Throws a caller-fixable error for a reference Setmore does not know.\n\nCalls `bowmark.providers.setmore.findBusiness`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBusiness>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getBusiness":{"post":{"operationId":"getBusiness","summary":"Returns a business's own profile: name, about text, business type, address, phone, email, website, time zone, opening hours by weekday, and its booking rules — whether guests can cancel or reschedule,","description":"Returns a business's own profile: name, about text, business type, address, phone, email, website, time zone, opening hours by weekday, and its booking rules — whether guests can cancel or reschedule, the slot interval, whether payment is required at booking, and whether customer accounts are on. Takes the same reference as findBusiness.\n\nCalls `bowmark.providers.setmore.getBusiness`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBusinessDetail>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/listServices":{"post":{"operationId":"listServices","summary":"Lists the appointments a business offers — each service's id, title, description, duration, buffer times, price, image, whether it is a video call, and which staff ids can take it — grouped by the bus","description":"Lists the appointments a business offers — each service's id, title, description, duration, buffer times, price, image, whether it is a video call, and which staff ids can take it — grouped by the business's own service categories (categories also list private services the services list leaves out).\n\nCalls `bowmark.providers.setmore.listServices`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreServiceList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/listStaff":{"post":{"operationId":"listStaff","summary":"Lists the people a customer can book with at a business: staff id, display name, role, bio, photo, booking-page slug and the service ids each one takes, plus whether the page makes the customer pick a","description":"Lists the people a customer can book with at a business: staff id, display name, role, bio, photo, booking-page slug and the service ids each one takes, plus whether the page makes the customer pick a staff member (REQUIRED) or assigns one (SKIP).\n\nCalls `bowmark.providers.setmore.listStaff`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreStaffList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getAvailability":{"post":{"operationId":"getAvailability","summary":"Returns the open appointment times for one or more services (ids from listServices) at a business between from and to (default the next 14 days), optionally for one staff member: each slot's start ins","description":"Returns the open appointment times for one or more services (ids from listServices) at a business between from and to (default the next 14 days), optionally for one staff member: each slot's start instant, the site's own label in the business's time zone, and the staff id it is with. Booking several services sums their durations and buffers, as the booking page does.\n\nCalls `bowmark.providers.setmore.getAvailability`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreAvailability>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreAvailabilityArgs","description":"TypeScript: `SetmoreAvailabilityArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/bookAppointment":{"post":{"operationId":"bookAppointment","summary":"Books a service at a business for a guest, from a slot (serviceId, staffId, startDateTime) taken off getAvailability and the guest's name, email or phone.","description":"Books a service at a business for a guest, from a slot (serviceId, staffId, startDateTime) taken off getAvailability and the guest's name, email or phone. When the business takes payment at booking, stops before paying and returns the amount due instead of a confirmation. Otherwise creates the guest and the booking, and returns the confirmation id.\n\nCalls `bowmark.providers.setmore.bookAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBookingConfirmation | SetmorePaymentRequired>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreBookAppointmentArgs","description":"TypeScript: `SetmoreBookAppointmentArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/bookClass":{"post":{"operationId":"bookClass","summary":"Books a guest into a class session at a business, from a sessionId taken off listClasses and the guest's name, email or phone — the class, staff member and time all come off the session itself.","description":"Books a guest into a class session at a business, from a sessionId taken off listClasses and the guest's name, email or phone — the class, staff member and time all come off the session itself. When the business takes payment at booking, stops before paying and returns the amount due instead of a confirmation. Otherwise holds the seat with a lease, creates the guest, confirms the booking, and returns the confirmation id.\n\nCalls `bowmark.providers.setmore.bookClass`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBookingConfirmation | SetmorePaymentRequired>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreBookClassArgs","description":"TypeScript: `SetmoreBookClassArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/listClasses":{"post":{"operationId":"listClasses","summary":"Lists the group classes a business runs and their upcoming sessions: each class's id, title, description, duration, buffers, price, image, staff ids and whether it is a video call, plus every upcoming","description":"Lists the group classes a business runs and their upcoming sessions: each class's id, title, description, duration, buffers, price, image, staff ids and whether it is a video call, plus every upcoming session across them in start order: session id (for getClassSession), class id, start instant and staff member. A class with nothing scheduled is still listed.\n\nCalls `bowmark.providers.setmore.listClasses`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreClassList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getClassSession":{"post":{"operationId":"getClassSession","summary":"Returns one class session (a sessionId from listClasses) in full: title, class id, start and end instants, time zone, cost, seats left, staff member, whether it is a video call and whether it was canc","description":"Returns one class session (a sessionId from listClasses) in full: title, class id, start and end instants, time zone, cost, seats left, staff member, whether it is a video call and whether it was cancelled. Throws a caller-fixable error for a session id the business does not have.\n\nCalls `bowmark.providers.setmore.getClassSession`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreClassSession>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreClassSessionArgs","description":"TypeScript: `SetmoreClassSessionArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getBooking":{"post":{"operationId":"getBooking","summary":"Reads a guest's booking back from the confirmation id in its confirmation email: whether it is an appointment, class or event booking, the service, staff member, start and end instants, time zone, cos","description":"Reads a guest's booking back from the confirmation id in its confirmation email: whether it is an appointment, class or event booking, the service, staff member, start and end instants, time zone, cost, payment transaction id, notes and whether it has been cancelled. Answers an empty bookings list when the business has no booking under that id.\n\nCalls `bowmark.providers.setmore.getBooking`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBookingLookup>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreGetBookingArgs","description":"TypeScript: `SetmoreGetBookingArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/cancelAppointment":{"post":{"operationId":"cancelAppointment","summary":"Cancels a booking at a business, from the bookingId a bookAppointment, bookClass or getBooking result returned.","description":"Cancels a booking at a business, from the bookingId a bookAppointment, bookClass or getBooking result returned. Throws, naming Setmore's own refusal, when the booking does not exist, belongs to a different business, or is already cancelled.\n\nCalls `bowmark.providers.setmore.cancelAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<{ cancelled: true }>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreCancelAppointmentArgs","description":"TypeScript: `SetmoreCancelAppointmentArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/rescheduleAppointment":{"post":{"operationId":"rescheduleAppointment","summary":"Moves a booking to a new start time, keeping its original duration, staff member and service, from the confirmationId and bookingId a bookAppointment, bookClass or getBooking result returned.","description":"Moves a booking to a new start time, keeping its original duration, staff member and service, from the confirmationId and bookingId a bookAppointment, bookClass or getBooking result returned. Throws, naming Setmore's own refusal, when the new slot is taken or the booking cannot be found.\n\nCalls `bowmark.providers.setmore.rescheduleAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBooking>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreRescheduleAppointmentArgs","description":"TypeScript: `SetmoreRescheduleAppointmentArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getMyBookings":{"post":{"operationId":"getMyBookings","summary":"Signed in as the caller (their customer account at one business): lists their own upcoming or past bookings there -- appointment, class or event, service, staff member, start and end instants, cost, n","description":"Signed in as the caller (their customer account at one business): lists their own upcoming or past bookings there -- appointment, class or event, service, staff member, start and end instants, cost, notes and whether cancelled -- a page at a time. Only businesses with customer accounts turned on have any. Refuses with a sign-in error when the caller holds no Setmore session.\n\nCalls `bowmark.providers.setmore.getMyBookings`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreMyBookings>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreGetMyBookingsArgs","description":"TypeScript: `SetmoreGetMyBookingsArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/updateMyDetails":{"post":{"operationId":"updateMyDetails","summary":"Signed in as the caller (their customer account at one business): changes their own name, email, phone number or address there -- only the fields passed -- and returns the details as Setmore now holds","description":"Signed in as the caller (their customer account at one business): changes their own name, email, phone number or address there -- only the fields passed -- and returns the details as Setmore now holds them. Refuses with a sign-in error when the caller holds no Setmore session.\n\nCalls `bowmark.providers.setmore.updateMyDetails`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreCustomer>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreUpdateMyDetailsArgs","description":"TypeScript: `SetmoreUpdateMyDetailsArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getBookingForm":{"post":{"operationId":"getBookingForm","summary":"Returns what a business asks a guest for at checkout: whether email, phone and address are required or shown, its own custom questions, and its terms-and-conditions checkbox.","description":"Returns what a business asks a guest for at checkout: whether email, phone and address are required or shown, its own custom questions, and its terms-and-conditions checkbox. Pass a serviceId (from listServices) to also bring that service's own intake form, when it has one — forms is empty otherwise.\n\nCalls `bowmark.providers.setmore.getBookingForm`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreBookingForm>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreBookingFormArgs","description":"TypeScript: `SetmoreBookingFormArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/getReviews":{"post":{"operationId":"getReviews","summary":"Returns a business's customer reviews — author, date, star rating, text and where it came from (Setmore or Google) — with the average rating and review count.","description":"Returns a business's customer reviews — author, date, star rating, text and where it came from (Setmore or Google) — with the average rating and review count. Pass page (the site's own paging, as a string) to walk past the first page.\n\nCalls `bowmark.providers.setmore.getReviews`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreReviews>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreReviewsArgs","description":"TypeScript: `SetmoreReviewsArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/listGalleryImages":{"post":{"operationId":"listGalleryImages","summary":"Lists the photos a business shows on its own gallery: each image's id, src, width and height.","description":"Lists the photos a business shows on its own gallery: each image's id, src, width and height. Does not read a business's linked Instagram feed — that is a separately-shaped door nobody has worked out yet.\n\nCalls `bowmark.providers.setmore.listGalleryImages`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmoreGallery>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","description":"TypeScript: `string`"}},"required":["business"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/setmore/checkPromoCode":{"post":{"operationId":"checkPromoCode","summary":"Checks whether a promo code is valid at a business for a given order amount, and returns the discount it would give, or why it was refused (e.g.","description":"Checks whether a promo code is valid at a business for a given order amount, and returns the discount it would give, or why it was refused (e.g. errorCode \"PROMO_CODE_NOT_FOUND\"). Validates only — applies nothing.\n\nCalls `bowmark.providers.setmore.checkPromoCode`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SetmorePromoCode>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetmoreCheckPromoCodeArgs","description":"TypeScript: `SetmoreCheckPromoCodeArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"SetmoreAvailabilityArgs":{"type":"object","properties":{"business":{"type":"string"},"serviceId":{"type":"string"},"serviceIds":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"to":{"type":"string"},"timeZone":{"type":"string"},"staffId":{"type":"string"}},"required":["business"],"additionalProperties":true},"SetmoreBookAppointmentArgs":{"type":"object","properties":{"business":{"type":"string"},"serviceId":{"type":"string"},"serviceIds":{"type":"array","items":{"type":"string"}},"staffId":{"type":"string"},"startDateTime":{"type":"string"},"timeZone":{"type":"string"},"guest":{"$ref":"#/components/schemas/SetmoreBookAppointmentGuest"},"notes":{"type":"string"}},"required":["business","staffId","startDateTime","guest"],"additionalProperties":true},"SetmoreBookAppointmentGuest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"additionalProperties":true}},"required":["firstName"],"additionalProperties":true},"SetmoreBookClassArgs":{"type":"object","properties":{"business":{"type":"string"},"sessionId":{"type":"string"},"guest":{"$ref":"#/components/schemas/SetmoreBookAppointmentGuest"},"notes":{"type":"string"}},"required":["business","sessionId","guest"],"additionalProperties":true},"SetmoreBookingFormArgs":{"type":"object","properties":{"business":{"type":"string"},"serviceId":{"type":"string"}},"required":["business"],"additionalProperties":true},"SetmoreCancelAppointmentArgs":{"type":"object","properties":{"business":{"type":"string"},"bookingId":{"type":"string"}},"required":["business","bookingId"],"additionalProperties":true},"SetmoreCheckPromoCodeArgs":{"type":"object","properties":{"business":{"type":"string"},"code":{"type":"string"},"subAmount":{"type":"number"}},"required":["business","code","subAmount"],"additionalProperties":true},"SetmoreClassSessionArgs":{"type":"object","properties":{"business":{"type":"string"},"sessionId":{"type":"string"}},"required":["business","sessionId"],"additionalProperties":true},"SetmoreGetBookingArgs":{"type":"object","properties":{"business":{"type":"string"},"confirmationId":{"type":"string"}},"required":["business","confirmationId"],"additionalProperties":true},"SetmoreGetMyBookingsArgs":{"type":"object","properties":{"business":{"type":"string"},"when":{"anyOf":[{"const":"upcoming"},{"const":"past"}]},"after":{"type":"string"}},"required":["business"],"additionalProperties":true},"SetmoreRescheduleAppointmentArgs":{"type":"object","properties":{"business":{"type":"string"},"confirmationId":{"type":"string"},"bookingId":{"type":"string"},"startDateTime":{"type":"string"}},"required":["business","confirmationId","bookingId","startDateTime"],"additionalProperties":true},"SetmoreReviewsArgs":{"type":"object","properties":{"business":{"type":"string"},"page":{"type":"string"}},"required":["business"],"additionalProperties":true},"SetmoreUpdateMyDetailsArgs":{"type":"object","properties":{"business":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phoneNumber":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"additionalProperties":true}},"required":["business"],"additionalProperties":true}}}}