{"openapi":"3.1.0","info":{"title":"J.Crew API (Bowmark)","version":"e833508f87ff","description":"Search and read J.Crew's clothing catalogue — products, prices, colours, sizes and stock — off the site's own OCAPI storefront API, no browser and no account. US store by default; pass country: \"ca\" for the Canadian store (prices in CAD, /ca/ product URLs).\n\nEvery function Bowmark has for J.Crew (jcrew.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/jcrew/listCategories":{"post":{"operationId":"listCategories","summary":"Walks J.Crew's own category tree from a starting category (\"root\" by default) down a requested number of levels (0-4, default 2), returning each descendant's id, display name and parent — so a caller ","description":"Walks J.Crew's own category tree from a starting category (\"root\" by default) down a requested number of levels (0-4, default 2), returning each descendant's id, display name and parent — so a caller holding the word \"shirts\" can find the id `browseCategory` needs. `mens`, `levels: 3` reaches `mens|categories|clothing|shirts`, the id `browseCategory`'s own example uses. Takes `country: \"ca\"` too; the Canadian store has the same tree and ids.\n\nCalls `bowmark.providers.jcrew.listCategories`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ListCategoriesResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListCategoriesArgs","description":"TypeScript: `ListCategoriesArgs`"}},"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/jcrew/searchProducts":{"post":{"operationId":"searchProducts","summary":"Searches J.Crew's live catalogue the way its own search bar does — a free-text query such as \"oxford shirt\" — and returns matching product rows with name, style id, price, currency, whether it is orde","description":"Searches J.Crew's live catalogue the way its own search bar does — a free-text query such as \"oxford shirt\" — and returns matching product rows with name, style id, price, currency, whether it is orderable, a thumbnail and the product URL, paginated and optionally sorted by the site's own sort orders. This is the DOOR for `getProduct`: it is where a caller holding only words gets the style id every other function takes. Pass `country: \"ca\"` for the Canadian store: prices in CAD and `/ca/p/...` URLs, and a row passed whole to `getProduct` stays in that store. Canada's search leaves out a few styles not sold there.\n\nCalls `bowmark.providers.jcrew.searchProducts`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SearchProductsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SearchProductsArgs","description":"TypeScript: `SearchProductsArgs`"}},"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/jcrew/browseCategory":{"post":{"operationId":"browseCategory","summary":"Lists the products in one J.Crew category the way the site's own category pages do — given a category id such as `mens|categories|clothing|shirts` — with the same pagination as `searchProducts`.","description":"Lists the products in one J.Crew category the way the site's own category pages do — given a category id such as `mens|categories|clothing|shirts` — with the same pagination as `searchProducts`. This is how an agent walks a department rather than guessing search words for it. ONE PAGE PER CALL: pass `count` (up to 200) and walk by `start: start + pageSize` until `start >= total`. FOR SALE ITEMS: the `sale|men` category is ~1,000 products and its first pages are often full price, so narrow it on the server with `refine: { c_isSaleSkuUs: \"true\" }` (plus a size such as `c_masterSize`), then read the ids with `getProducts` in batches of 24 and keep variants where `onSale && orderable`. Use `v.onSale`, not a style-level price comparison: a Tall or Slim fit can list higher than Classic. FIT (Slim/Athletic) is not reliably filterable on the server for sale items: read the `fit` on each variant and the product name after getProducts. CANADA: pass `country: \"ca\"` (same category ids, prices in CAD); there `c_isSaleSkuUs` is the US store's flag, so narrow on `c_discountPercentageCAD` (e.g. `\"lessThan40Off\"`) and pass the same `country: \"ca\"` to `getProducts`.\n\nCalls `bowmark.providers.jcrew.browseCategory`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<BrowseCategoryResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/BrowseCategoryArgs","description":"TypeScript: `BrowseCategoryArgs`"}},"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/jcrew/getProduct":{"post":{"operationId":"getProduct","summary":"Reads one J.Crew product in full — given the style id at the end of a product URL, e.g.","description":"Reads one J.Crew product in full — given the style id at the end of a product URL, e.g. `BX291`, the URL itself, or a `searchProducts` row — returning the name, descriptions, price, the pre-discount list price, currency, online inventory (orderable and stock level), the site's own aggregate rating and review count, every colour and size the style comes in, every variant with its own price and availability, and the full image set. The normalized variant list replaces the raw 502+ variants from J.Crew's OCAPI with a browseable (colour × size × fit) grid. `{ id, country: \"ca\" }` or a `/ca/p/...` URL reads the Canadian store: CAD prices, Canadian sale prices and the `/ca/` page `url`. Stock and orderable are the US warehouse's in both stores.\n\nCalls `bowmark.providers.jcrew.getProduct`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<GetProductResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"anyOf":[{"$ref":"#/components/schemas/GetProductArgs"},{"type":"string"}],"description":"TypeScript: `GetProductArgs | string`"}},"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/jcrew/getProducts":{"post":{"operationId":"getProducts","summary":"Reads several J.Crew products in one call — the batch form of `getProduct`, for an agent comparing a handful of items without paying a request each.","description":"Reads several J.Crew products in one call — the batch form of `getProduct`, for an agent comparing a handful of items without paying a request each. Takes a list of style ids (maximum 24 per call — J.Crew's own batch limit) and returns each product's full detail in the same shape as `getProduct`, plus a list of ids that were not found. `country: \"ca\"` (or `/ca/` product URLs as ids) reads the whole batch from the Canadian store in CAD.\n\nCalls `bowmark.providers.jcrew.getProducts`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<GetProductsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetProductsArgs","description":"TypeScript: `GetProductsArgs`"}},"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/jcrew/checkVariantStock":{"post":{"operationId":"checkVariantStock","summary":"Answers whether one specific colour and size (and fit, for styles that have one) of a J.Crew style is buyable right now — given the style id plus the values a shopper picked, e.g.","description":"Answers whether one specific colour and size (and fit, for styles that have one) of a J.Crew style is buyable right now — given the style id plus the values a shopper picked, e.g. `{ id: \"BX291\", colour: \"White\", size: \"M\" }` — resolving them to that variant's own id and returning whether it is orderable and at what price. Matches case-insensitively; refuses with the current colours, sizes and fits when the combination does not exist on the style. `country: \"ca\"` prices it in the Canadian store (CAD); orderable is the US warehouse's in both.\n\nCalls `bowmark.providers.jcrew.checkVariantStock`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<CheckVariantStockResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/CheckVariantStockArgs","description":"TypeScript: `CheckVariantStockArgs`"}},"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/jcrew/suggestSearchTerms":{"post":{"operationId":"suggestSearchTerms","summary":"Completes a partial search the way J.Crew's own type-ahead does — a word fragment 3-50 characters long, e.g.","description":"Completes a partial search the way J.Crew's own type-ahead does — a word fragment 3-50 characters long, e.g. \"oxford\" — returning the corrected/completed terms, matching categories and matching products the site itself would suggest. The door in front of `searchProducts` for a caller that does not yet know the site's vocabulary. `country: \"ca\"` prices the suggested products in CAD.\n\nCalls `bowmark.providers.jcrew.suggestSearchTerms`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<SuggestSearchTermsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SuggestSearchTermsArgs","description":"TypeScript: `SuggestSearchTermsArgs`"}},"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/jcrew/getCategory":{"post":{"operationId":"getCategory","summary":"Reads one J.Crew category by id — given the id `listCategories` returns, e.g.","description":"Reads one J.Crew category by id — given the id `listCategories` returns, e.g. `\"mens|categories|clothing|shirts\"` — returning its display name, its immediate parent's id (`null` at the top of the tree) and the full ancestor chain back to the top, root first. Takes `country: \"ca\"` too; the Canadian store has the same categories.\n\nCalls `bowmark.providers.jcrew.getCategory`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<GetCategoryResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetCategoryArgs","description":"TypeScript: `GetCategoryArgs`"}},"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/jcrew/listSearchRefinements":{"post":{"operationId":"listSearchRefinements","summary":"Lists the filters J.Crew offers for a search or a category — size, colour, pattern, price, discount, occasion, brand and more — each with the values the site publishes and how many products in that re","description":"Lists the filters J.Crew offers for a search or a category — size, colour, pattern, price, discount, occasion, brand and more — each with the values the site publishes and how many products in that result set carry them. Give a `query` (same bound as `searchProducts`) or a `categoryId` (same as `browseCategory`), not both. Drops the site's own internal merchandising facets (promotion ids, country allow-lists) that no shopper-facing filter uses. `country: \"ca\"` gives the Canadian store's counts and its own discount group, `c_discountPercentageCAD`.\n\nCalls `bowmark.providers.jcrew.listSearchRefinements`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ListSearchRefinementsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListSearchRefinementsArgs","description":"TypeScript: `ListSearchRefinementsArgs`"}},"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/jcrew/listSortOptions":{"post":{"operationId":"listSortOptions","summary":"Lists the sort orders J.Crew's own result pages offer — price low to high, price high to low, top rated, newest and best seller — so a caller can ask `searchProducts`/`browseCategory` for one by the s","description":"Lists the sort orders J.Crew's own result pages offer — price low to high, price high to low, top rated, newest and best seller — so a caller can ask `searchProducts`/`browseCategory` for one by the site's own id rather than guessing. Site-wide and unscoped: the same five options apply to every search and category. Drops the site's own internal merchandising sort rules, which never carry a real display label.\n\nCalls `bowmark.providers.jcrew.listSortOptions`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ListSortOptionsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"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/jcrew/findStores":{"post":{"operationId":"findStores","summary":"Finds physical J.Crew stores near a point the way the site's own store locator does — pass EITHER a 5-digit US `zip` (geocoded to a centroid with a keyless third-party lookup, since J.Crew's own endpo","description":"Finds physical J.Crew stores near a point the way the site's own store locator does — pass EITHER a 5-digit US `zip` (geocoded to a centroid with a keyless third-party lookup, since J.Crew's own endpoint takes only coordinates) OR `latitude`+`longitude` directly, never both, e.g. `{ zip: \"10001\" }` or `{ latitude: 40.7, longitude: -74.0 }`. Returns each store's name, full address, phone, email, coordinates, distance from the search point, weekly hours, curbside/in-store pickup and same-day delivery flags, and the site's own raw merchandise tags. `radiusKm` (default 50, kilometres — the unit the site itself validates) and `maxResults` (default 25) bound the search; `total` reports how many matched even when `maxResults` capped the page.\n\nCalls `bowmark.providers.jcrew.findStores`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<FindStoresResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/FindStoresArgs","description":"TypeScript: `FindStoresArgs`"}},"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/jcrew/listProductReviews":{"post":{"operationId":"listProductReviews","summary":"Reads the customer reviews on one J.Crew product off Bazaarvoice, the site's third-party review platform — given the style id at the end of a product URL, e.g.","description":"Reads the customer reviews on one J.Crew product off Bazaarvoice, the site's third-party review platform — given the style id at the end of a product URL, e.g. `BX291` — returning each review's rating, title, body, helpful-vote count, date, reviewer screen name and the size they say they bought, most recent first. `total` is the site's own review count for the style, matching `getProduct`'s `reviewCount`, and can exceed `reviews.length` when the style has more reviews than the optional `limit` (default 20, capped 50) asked for.\n\nCalls `bowmark.providers.jcrew.listProductReviews`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<ListProductReviewsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListProductReviewsArgs","description":"TypeScript: `ListProductReviewsArgs`"}},"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}}},"BrowseCategoryArgs":{"type":"object","properties":{"categoryId":{"type":"string"},"start":{"type":"number"},"count":{"type":"number"},"sort":{"type":"string"},"refine":{"type":"object","additionalProperties":{"type":"string"}},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["categoryId"],"additionalProperties":true},"CheckVariantStockArgs":{"type":"object","properties":{"id":{"type":"string"},"colour":{"type":"string"},"size":{"type":"string"},"fit":{"type":"string"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["id","colour","size"],"additionalProperties":true},"FindStoresArgs":{"type":"object","properties":{"zip":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"radiusKm":{"type":"number"},"maxResults":{"type":"number"}},"additionalProperties":true},"GetCategoryArgs":{"type":"object","properties":{"categoryId":{"type":"string"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["categoryId"],"additionalProperties":true},"GetProductArgs":{"type":"object","properties":{"id":{"type":"string"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]},"url":{"type":"string"}},"required":["id"],"additionalProperties":true},"GetProductsArgs":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["ids"],"additionalProperties":true},"ListCategoriesArgs":{"type":"object","properties":{"categoryId":{"type":"string"},"levels":{"type":"number"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"additionalProperties":true},"ListProductReviewsArgs":{"type":"object","properties":{"id":{"type":"string"},"limit":{"type":"number"}},"required":["id"],"additionalProperties":true},"ListSearchRefinementsArgs":{"type":"object","properties":{"query":{"type":"string"},"categoryId":{"type":"string"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"additionalProperties":true},"SearchProductsArgs":{"type":"object","properties":{"query":{"type":"string"},"start":{"type":"number"},"count":{"type":"number"},"sort":{"type":"string"},"refine":{"type":"object","additionalProperties":{"type":"string"}},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["query"],"additionalProperties":true},"SuggestSearchTermsArgs":{"type":"object","properties":{"query":{"type":"string"},"country":{"anyOf":[{"const":"us"},{"const":"ca"}]}},"required":["query"],"additionalProperties":true}}}}