{"openapi":"3.1.0","info":{"title":"Squire API (Bowmark)","version":"e833508f87ff","description":"Squire barbershop booking: find shops by name or near a place, a shop's services, prices, barbers, reviews and open appointment times, a price quote, and the signed-in customer's own appointments, waitlist and walk-in list.\n\nEvery function Bowmark has for Squire (getsquire.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/squire/searchShops":{"post":{"operationId":"searchShops","summary":"Searches Squire by free text — a shop or brand name, a barber, a city or a street — and returns Squire's own typed hits (shop, brand, barber, address) with id, shopId, name, route and address; a brand","description":"Searches Squire by free text — a shop or brand name, a barber, a city or a street — and returns Squire's own typed hits (shop, brand, barber, address) with id, shopId, name, route and address; a brand hit lists its locations. A shop hit's route or id is what getShop takes.\n\nCalls `bowmark.providers.squire.searchShops`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireSearchHit[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireSearchArgs","description":"TypeScript: `SquireSearchArgs`"}},"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/squire/findShopsNear":{"post":{"operationId":"findShopsNear","summary":"Lists Squire barbershops nearest first around a place name (geocoded) or a lat/lng: name, route, address, coordinates, distance in miles, phone, timezone, barber count, photos and the booking URL.","description":"Lists Squire barbershops nearest first around a place name (geocoded) or a lat/lng: name, route, address, coordinates, distance in miles, phone, timezone, barber count, photos and the booking URL.\n\nCalls `bowmark.providers.squire.findShopsNear`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireShopSummary[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireNearArgs","description":"TypeScript: `SquireNearArgs`"}},"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/squire/getShop":{"post":{"operationId":"getShop","summary":"Returns one barbershop from its id, route or getsquire.com URL: address, coordinates, phone, Instagram, weekly opening hours, days off, the advance-booking and cancellation windows, whether it needs p","description":"Returns one barbershop from its id, route or getsquire.com URL: address, coordinates, phone, Instagram, weekly opening hours, days off, the advance-booking and cancellation windows, whether it needs prepayment or a deposit, takes pay-in-person, Klarna or Afterpay, the customer booking fee in cents, and whether its waitlist and gift cards are on. An unknown shop is a caller-fixable error.\n\nCalls `bowmark.providers.squire.getShop`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireShop>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string","description":"TypeScript: `string`"}},"required":["shop"],"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/squire/listServices":{"post":{"operationId":"listServices","summary":"Lists a shop's bookable services (shop by id, route or getsquire.com URL): name, description, price in cents, price range across barbers, duration, categories, and whether it needs prepayment or a dep","description":"Lists a shop's bookable services (shop by id, route or getsquire.com URL): name, description, price in cents, price range across barbers, duration, categories, and whether it needs prepayment or a deposit. Given a barber id from listBarbers, only that barber's services at their own prices, with the add-ons offered. A service id is what getAvailability takes.\n\nCalls `bowmark.providers.squire.listServices`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireService[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireListServicesArgs","description":"TypeScript: `SquireListServicesArgs`"}},"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/squire/listBarbers":{"post":{"operationId":"listBarbers","summary":"Lists a shop's barbers (shop by id, route or getsquire.com URL): name, route, photo, Instagram, next available time with Squire's own wording, default service, weekly hours and upcoming days off.","description":"Lists a shop's barbers (shop by id, route or getsquire.com URL): name, route, photo, Instagram, next available time with Squire's own wording, default service, weekly hours and upcoming days off. A barber id is what listServices and getAvailability take to narrow to one barber.\n\nCalls `bowmark.providers.squire.listBarbers`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireBarberSummary[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string","description":"TypeScript: `string`"}},"required":["shop"],"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/squire/getAvailability":{"post":{"operationId":"getAvailability","summary":"Returns the open appointment times at a shop for a service (from listServices), split into morning/afternoon/evening, each slot carrying which barbers are free for it; or, given a barber (from listBar","description":"Returns the open appointment times at a shop for a service (from listServices), split into morning/afternoon/evening, each slot carrying which barbers are free for it; or, given a barber (from listBarbers) and a duration, that barber's own open times regardless of service. Defaults to today through 4 days out — the booking app's own window.\n\nCalls `bowmark.providers.squire.getAvailability`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireDayAvailability[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireAvailabilityArgs","description":"TypeScript: `SquireAvailabilityArgs`"}},"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/squire/getReviews":{"post":{"operationId":"getReviews","summary":"Returns a shop's reviews (shop by id, route or URL), or one barber's (id from listBarbers): the average rating, rating count, Squire's own written summary, and newest-first reviews with rating, text, ","description":"Returns a shop's reviews (shop by id, route or URL), or one barber's (id from listBarbers): the average rating, rating count, Squire's own written summary, and newest-first reviews with rating, text, date, the barber reviewed and the customer's first name. Page with limit and skip.\n\nCalls `bowmark.providers.squire.getReviews`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireReviews>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireReviewsArgs","description":"TypeScript: `SquireReviewsArgs`"}},"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/squire/getBrand":{"post":{"operationId":"getBrand","summary":"Returns a Squire brand (a multi-location barbershop group) from its id — a brand hit from searchShops — or a getsquire.com/booking/brands/ URL: name, description, website, Instagram, and every locatio","description":"Returns a Squire brand (a multi-location barbershop group) from its id — a brand hit from searchShops — or a getsquire.com/booking/brands/ URL: name, description, website, Instagram, and every location as a shop summary with route and booking URL.\n\nCalls `bowmark.providers.squire.getBrand`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireBrand>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","description":"TypeScript: `string`"}},"required":["brand"],"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/squire/getBarber":{"post":{"operationId":"getBarber","summary":"Returns one barber from their id (listBarbers or a barber hit from searchShops): name, route, photos, portfolio images and videos, Instagram, average rating and count, the shop they work at, weekly ho","description":"Returns one barber from their id (listBarbers or a barber hit from searchShops): name, route, photos, portfolio images and videos, Instagram, average rating and count, the shop they work at, weekly hours, days off, next available time, default service, advance-booking window and their own booking URL.\n\nCalls `bowmark.providers.squire.getBarber`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireBarber>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"barber":{"type":"string","description":"TypeScript: `string`"}},"required":["barber"],"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/squire/getWalkInStatus":{"post":{"operationId":"getWalkInStatus","summary":"Says whether a shop (id, route or getsquire.com URL) is taking walk-ins or a same-day standby list right now, whether its waitlist is on, whether a walk-in may ask for anyone, and which barbers a walk","description":"Says whether a shop (id, route or getsquire.com URL) is taking walk-ins or a same-day standby list right now, whether its waitlist is on, whether a walk-in may ask for anyone, and which barbers a walk-in can ask for. A shop that never set standby up answers all false.\n\nCalls `bowmark.providers.squire.getWalkInStatus`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireWalkInStatus>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"type":"string","description":"TypeScript: `string`"}},"required":["shop"],"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/squire/getBookingQuote":{"post":{"operationId":"getBookingQuote","summary":"Prices an appointment before booking it — shop, barber, service ids (add-ons as extra services) and a time from getAvailability — through Squire's own anonymous cart: each service line with price, dur","description":"Prices an appointment before booking it — shop, barber, service ids (add-ons as extra services) and a time from getAvailability — through Squire's own anonymous cart: each service line with price, duration and deposit, the subtotal, tax, discount, Squire's booking fee, the total charged, whether the shop needs prepayment, and the suggested tips. Creates no appointment and holds no slot.\n\nCalls `bowmark.providers.squire.getBookingQuote`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireBookingQuote>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SquireQuoteArgs","description":"TypeScript: `SquireQuoteArgs`"}},"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/squire/lookupReservation":{"post":{"operationId":"lookupReservation","summary":"Looks up an appointment from the confirmation code Squire gives at booking (or its getsquire.com/barbershops/view-reservation/ link), without signing in: shop, barber, services, start and end time, to","description":"Looks up an appointment from the confirmation code Squire gives at booking (or its getsquire.com/barbershops/view-reservation/ link), without signing in: shop, barber, services, start and end time, total and status, plus Squire's own record as raw. An unknown code is a caller-fixable error.\n\nCalls `bowmark.providers.squire.lookupReservation`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SquireReservation>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"TypeScript: `string`"}},"required":["code"],"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}}},"SquireAvailabilityArgs":{"type":"object","properties":{"shop":{"type":"string"},"service":{"type":"string"},"barber":{"type":"string"},"durationMins":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"}},"required":["shop"],"additionalProperties":true},"SquireListServicesArgs":{"type":"object","properties":{"shop":{"type":"string"},"barber":{"type":"string"}},"required":["shop"],"additionalProperties":true},"SquireNearArgs":{"type":"object","properties":{"near":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"limit":{"type":"number"}},"additionalProperties":true},"SquireQuoteArgs":{"type":"object","properties":{"shop":{"type":"string"},"barber":{"type":"string"},"service":{"type":"string"},"services":{"type":"array","items":{"type":"string"}},"time":{"type":"string"}},"required":["shop","barber","time"],"additionalProperties":true},"SquireReviewsArgs":{"type":"object","properties":{"shop":{"type":"string"},"barber":{"type":"string"},"limit":{"type":"number"},"skip":{"type":"number"}},"additionalProperties":true},"SquireSearchArgs":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"number"}},"required":["query"],"additionalProperties":true}}}}