{"openapi":"3.1.0","info":{"title":"Zenoti API (Bowmark)","version":"e833508f87ff","description":"The Zenoti booking platform behind thousands of salons, spas and med-spas: find a business's webstore, list its locations and services, and check real open appointment times. Rung 11, no browser, no account.\n\nEvery function Bowmark has for Zenoti (zenoti.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/zenoti/findTenant":{"post":{"operationId":"findTenant","summary":"Finds the Zenoti webstore behind a business -- its own website, a booking link, or a <tenant>.zenoti.com URL -- and returns the tenant subdomain, its Catalog API host and its default location.","description":"Finds the Zenoti webstore behind a business -- its own website, a booking link, or a <tenant>.zenoti.com URL -- and returns the tenant subdomain, its Catalog API host and its default location. Pass the returned `tenant` to every other function.\n\nCalls `bowmark.providers.zenoti.findTenant`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiTenantRef>`.","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/zenoti/listCenters":{"post":{"operationId":"listCenters","summary":"Lists a tenant's real, live locations (Zenoti 'centers') -- name, address, phone, time zone, and the centerId searchServices and getAvailableTimes need.","description":"Lists a tenant's real, live locations (Zenoti 'centers') -- name, address, phone, time zone, and the centerId searchServices and getAvailableTimes need.\n\nCalls `bowmark.providers.zenoti.listCenters`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiCenter[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant"],"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/zenoti/searchServices":{"post":{"operationId":"searchServices","summary":"Reads one location's real, live bookable service menu -- an optional search string (e.g.","description":"Reads one location's real, live bookable service menu -- an optional search string (e.g. \"cut\", \"massage\") narrows it; omit it for the full catalog.\n\nCalls `bowmark.providers.zenoti.searchServices`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiService[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"},"query":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId"],"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/zenoti/listServiceCategories":{"post":{"operationId":"listServiceCategories","summary":"Lists one location's service-menu sections (Cuts, Color, Treatments...) as its webstore shows them.","description":"Lists one location's service-menu sections (Cuts, Color, Treatments...) as its webstore shows them.\n\nCalls `bowmark.providers.zenoti.listServiceCategories`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiServiceCategory[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId"],"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/zenoti/getService":{"post":{"operationId":"getService","summary":"Returns one service's full detail at a location: description, price, duration, category, whether a deposit is required, and the add-ons bookable with it.","description":"Returns one service's full detail at a location: description, price, duration, category, whether a deposit is required, and the add-ons bookable with it.\n\nCalls `bowmark.providers.zenoti.getService`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiServiceDetail>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"},"serviceId":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId","serviceId"],"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/zenoti/listProviders":{"post":{"operationId":"listProviders","summary":"Lists the staff who perform one service at a location, each with their own price and duration, so a caller can ask for a specific person.","description":"Lists the staff who perform one service at a location, each with their own price and duration, so a caller can ask for a specific person.\n\nCalls `bowmark.providers.zenoti.listProviders`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiProvider[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"},"serviceId":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId","serviceId"],"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/zenoti/listClassSessions":{"post":{"operationId":"listClassSessions","summary":"Lists scheduled group classes (yoga, fitness, workshops) at a location over a \"YYYY-MM-DD\" date range, with each session's instructor, open spots and price.","description":"Lists scheduled group classes (yoga, fitness, workshops) at a location over a \"YYYY-MM-DD\" date range, with each session's instructor, open spots and price. Not every tenant sells classes -- an empty `sessions` array is a real answer.\n\nCalls `bowmark.providers.zenoti.listClassSessions`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiClassSessionList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"},"startDate":{"type":"string","description":"TypeScript: `string`"},"endDate":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId","startDate","endDate"],"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/zenoti/getAvailableTimes":{"post":{"operationId":"getAvailableTimes","summary":"Checks real, live open appointment times for one service at one location on one \"YYYY-MM-DD\" date -- the same live check the tenant's own webstore makes before showing bookable times.","description":"Checks real, live open appointment times for one service at one location on one \"YYYY-MM-DD\" date -- the same live check the tenant's own webstore makes before showing bookable times. An empty `slots` array is the tenant's real answer (fully booked or closed that day), not an error. A tenant that requires sign-in to see times throws naming that.\n\nCalls `bowmark.providers.zenoti.getAvailableTimes`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiAvailability>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"centerId":{"type":"string","description":"TypeScript: `string`"},"serviceId":{"type":"string","description":"TypeScript: `string`"},"date":{"type":"string","description":"TypeScript: `string`"}},"required":["tenant","centerId","serviceId","date"],"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/zenoti/listMyAppointments":{"post":{"operationId":"listMyAppointments","summary":"Lists the signed-in caller's own upcoming (default) or past appointments at one business.","description":"Lists the signed-in caller's own upcoming (default) or past appointments at one business. Accounts are per business: the caller signs in at that tenant's own webstore; with no sign-in the run pauses for one.\n\nCalls `bowmark.providers.zenoti.listMyAppointments`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiAppointment[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant":{"type":"string","description":"TypeScript: `string`"},"when":{"anyOf":[{"const":"upcoming"},{"const":"past"}],"description":"TypeScript: `\"upcoming\" | \"past\"`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["tenant"],"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/zenoti/bookAppointment":{"post":{"operationId":"bookAppointment","summary":"Books one service at a time getAvailableTimes returned, as the signed-in caller at that business.","description":"Books one service at a time getAvailableTimes returned, as the signed-in caller at that business. Returns status \"booked\" with the booking id, or \"payment_required\" with amountDue when the business wants a deposit or prepayment at booking -- that booking is NOT confirmed and the hold lapses. With no sign-in the run pauses for one.\n\nCalls `bowmark.providers.zenoti.bookAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiBooking>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tenant":{"type":"string"},"centerId":{"type":"string"},"serviceId":{"type":"string"},"time":{"type":"string"},"providerId":{"type":"string"}},"required":["tenant","centerId","serviceId","time"],"additionalProperties":true,"description":"TypeScript: `{ tenant: string, centerId: string, serviceId: string, time: string, providerId?: string }`"},"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/zenoti/cancelAppointment":{"post":{"operationId":"cancelAppointment","summary":"Cancels one of the signed-in caller's upcoming appointments at a business (appointmentId from listMyAppointments).","description":"Cancels one of the signed-in caller's upcoming appointments at a business (appointmentId from listMyAppointments). Returns status \"cancelled\", or \"fee_required\" with cancellationCharges when the business would charge a late-cancellation fee -- that appointment is NOT cancelled. With no sign-in the run pauses for one.\n\nCalls `bowmark.providers.zenoti.cancelAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiCancellation>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tenant":{"type":"string"},"appointmentId":{"type":"string"},"reason":{"type":"string"}},"required":["tenant","appointmentId"],"additionalProperties":true,"description":"TypeScript: `{ tenant: string, appointmentId: string, reason?: string }`"},"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/zenoti/rescheduleAppointment":{"post":{"operationId":"rescheduleAppointment","summary":"Moves one of the signed-in caller's upcoming appointments (appointmentId from listMyAppointments) to another open time for the same service and location (time from getAvailableTimes).","description":"Moves one of the signed-in caller's upcoming appointments (appointmentId from listMyAppointments) to another open time for the same service and location (time from getAvailableTimes). Holds the new time first, then cancels the old and confirms, the way the business's own webstore reschedules. Returns \"rescheduled\", or \"fee_required\" / \"payment_required\" when the old time carries a cancellation fee or the new one wants payment -- in both cases nothing changed. With no sign-in the run pauses for one.\n\nCalls `bowmark.providers.zenoti.rescheduleAppointment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ZenotiReschedule>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tenant":{"type":"string"},"appointmentId":{"type":"string"},"time":{"type":"string"},"providerId":{"type":"string"}},"required":["tenant","appointmentId","time"],"additionalProperties":true,"description":"TypeScript: `{ tenant: string, appointmentId: string, time: string, providerId?: string }`"},"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"}}}}}}}},"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}}}}}}