{"openapi":"3.1.0","info":{"title":"Target API (Bowmark)","version":"e833508f87ff","description":"Big-box general merchandise — search, product detail, store stock and store lookup on target.com.\n\nEvery function Bowmark has for Target (target.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/target/search":{"post":{"operationId":"search","summary":"Searches target.com's catalog for a keyword and returns one page of matching products — TCIN, title, brand, product URL, image, price (plus the pre-markdown price when the site's regular price is genu","description":"Searches target.com's catalog for a keyword and returns one page of matching products — TCIN, title, brand, product URL, image, price (plus the pre-markdown price when the site's regular price is genuinely higher), ship availability, rating and review count, and the site's own sponsored-placement flag — in the site's own default relevance order. A page is up to 24 organic rows plus whatever sponsored placements the site adds on top of them; `offset` reads the next page. The site's total match count comes back too, but it counts what the site would SHOW: a nonsense query returns unrelated fallback rows rather than nothing.\n\nCalls `bowmark.providers.target.search`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetSearchResults>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["query"],"additionalProperties":true,"description":"TypeScript: `{ query: string; limit?: number; offset?: number }`"}},"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/target/getProduct":{"post":{"operationId":"getProduct","summary":"Reads one product page in full — title, brand, price, long-form description, images, shipping availability, and (for a product with siblings) every size/color option with its own TCIN and stock state ","description":"Reads one product page in full — title, brand, price, long-form description, images, shipping availability, and (for a product with siblings) every size/color option with its own TCIN and stock state — for a product TCIN (Target's internal product id, the trailing digits in a product URL, e.g., `/p/<slug>/-/A-12345678`) that `search` already returned. `variants` is empty for a product with no siblings.\n\nCalls `bowmark.providers.target.getProduct`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetProduct>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: 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/target/checkStock":{"post":{"operationId":"checkStock","summary":"Answers whether a product (by TCIN) is available for same-day pickup or ship-to at a given store or ZIP — the check a caller does before committing to a product.","description":"Answers whether a product (by TCIN) is available for same-day pickup or ship-to at a given store or ZIP — the check a caller does before committing to a product. Pass `storeId` or `zip` for pickup; an unscoped call answers ship availability only. Returns null if the TCIN is not in the results for `keyword`; throws when Target's bot wall refuses every try.\n\nCalls `bowmark.providers.target.checkStock`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetCheckStockResult | null>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"keyword":{"type":"string"},"storeId":{"type":"number"},"zip":{"type":"string"}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; keyword?: string; storeId?: number; zip?: 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/target/findStore":{"post":{"operationId":"findStore","summary":"Searches the store-locator for nearby Targets by ZIP, partial ZIP, city, or street+city, and returns each store's id, slug, name, address, phone, time-zone and 14-day weekly hours.","description":"Searches the store-locator for nearby Targets by ZIP, partial ZIP, city, or street+city, and returns each store's id, slug, name, address, phone, time-zone and 14-day weekly hours.\n\nCalls `bowmark.providers.target.findStore`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetStoreSearch>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":true,"description":"TypeScript: `{ query: 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/target/listCategories":{"post":{"operationId":"listCategories","summary":"Reads one node of Target's category taxonomy (department → aisle, e.g.","description":"Reads one node of Target's category taxonomy (department → aisle, e.g. Grocery → Snacks) plus its direct children — one level per call, the same depth the site's own category page renders. Called without arguments, returns the 47 top-level departments. `categoryId` is the site's own id (the `N-<id>` URL segment, e.g. \"5xt1a\" for Grocery) taken from a prior call's `TargetCategory.id` to walk one level deeper.\n\nCalls `bowmark.providers.target.listCategories`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetCategoriesResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"categoryId":{"type":"string"}},"additionalProperties":true,"description":"TypeScript: `{ categoryId?: string }`"}},"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/target/listCategoryProducts":{"post":{"operationId":"listCategoryProducts","summary":"Lists the products on one Target category page (e.g.","description":"Lists the products on one Target category page (e.g. Grocery → Snacks) — the grid a shopper sees after picking an aisle, in the site's own featured order, with the same row shape `search` returns (TCIN, title, brand, URL, image, price, availability, rating, sponsored flag). `categoryId` is a `TargetCategory.id` from `listCategories` (or a pasted `/c/…/-/N-<id>` URL). Up to 24 organic rows per page plus sponsored placements; `offset` reads the next page; `totalMatches` is the category's own count.\n\nCalls `bowmark.providers.target.listCategoryProducts`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetCategoryProducts>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"categoryId":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["categoryId"],"additionalProperties":true,"description":"TypeScript: `{ categoryId: string; limit?: number; offset?: number }`"}},"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/target/listDeals":{"post":{"operationId":"listDeals","summary":"Reads one store's current Target weekly ad — every priced offer in it (\"4.49\", \"BOGO 25% off\") with the ad's own category, fine print, a representative TCIN and how many products the offer covers.","description":"Reads one store's current Target weekly ad — every priced offer in it (\"4.49\", \"BOGO 25% off\") with the ad's own category, fine print, a representative TCIN and how many products the offer covers. Takes a store id from `findStore` (the ad differs by store, so there is no default). Returns the store's live promotions too; pass one's `id` as `promotionId` to read a promotion other than the weekly ad.\n\nCalls `bowmark.providers.target.listDeals`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetDealsResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"storeId":{"type":"string"},"promotionId":{"type":"string"}},"required":["storeId"],"additionalProperties":true,"description":"TypeScript: `{ storeId: string; promotionId?: 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/target/reviewPhotos":{"post":{"operationId":"reviewPhotos","summary":"Returns customer review photos for one product — the real-world pictures shoppers attached to their reviews, as opposed to the catalog images `getProduct` returns — newest review first, one row per ph","description":"Returns customer review photos for one product — the real-world pictures shoppers attached to their reviews, as opposed to the catalog images `getProduct` returns — newest review first, one row per photo with the image URL, the review's star rating, submission date, title and text. Takes a TCIN from `search`. `limit` defaults to 20, max 200.\n\nCalls `bowmark.providers.target.reviewPhotos`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetReviewPhotos>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"limit":{"type":"number"}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; limit?: number }`"}},"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/target/listReviews":{"post":{"operationId":"listReviews","summary":"Reads a product's customer reviews — rating, title, text and verified-purchase flag — the detail `search` and `getProduct` only summarize as a count and an average.","description":"Reads a product's customer reviews — rating, title, text and verified-purchase flag — the detail `search` and `getProduct` only summarize as a count and an average. Takes a TCIN from `search`. `limit` defaults to 20, max 200; `sortBy` defaults to the site's own \"most_recent\".\n\nCalls `bowmark.providers.target.listReviews`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetReviews>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"limit":{"type":"number"},"sortBy":{"anyOf":[{"const":"most_recent"},{"const":"most_helpful"}]}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; limit?: number; sortBy?: \"most_recent\" | \"most_helpful\" }`"}},"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/target/listQuestions":{"post":{"operationId":"listQuestions","summary":"Reads the customer Q&A on a product page — the questions shoppers asked (\"does it fit…\", \"is it dishwasher safe\") with every answer, each marked whether it came from a brand expert or another shopper ","description":"Reads the customer Q&A on a product page — the questions shoppers asked (\"does it fit…\", \"is it dishwasher safe\") with every answer, each marked whether it came from a brand expert or another shopper — which `listReviews`/`reviewPhotos` do not cover. Takes a TCIN from `search`. `limit` defaults to 10, max 100; `sortBy` defaults to newest first; `\"most_answers\"` puts the questions shoppers answered most at the top.\n\nCalls `bowmark.providers.target.listQuestions`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetQuestions>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"limit":{"type":"number"},"sortBy":{"anyOf":[{"const":"most_recent"},{"const":"most_helpful"},{"const":"most_answers"}]}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; limit?: number; sortBy?: \"most_recent\" | \"most_helpful\" | \"most_answers\" }`"}},"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/target/listOrders":{"post":{"operationId":"listOrders","summary":"Reads the CALLER's own Target order history — each order's id, date, status, items and totals.","description":"Reads the CALLER's own Target order history — each order's id, date, status, items and totals. This is the signed-in person's complete order list. Needs the caller signed in.\n\nCalls `bowmark.providers.target.listOrders`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetOrdersHistory>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"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/target/listWishlists":{"post":{"operationId":"listWishlists","summary":"Reads the CALLER's own Target lists (wishlists) — the lists they have created, each list's items (with TCIN, title, quantity, added date and price), visibility and creation date.","description":"Reads the CALLER's own Target lists (wishlists) — the lists they have created, each list's items (with TCIN, title, quantity, added date and price), visibility and creation date. Needs the caller signed in.\n\nCalls `bowmark.providers.target.listWishlists`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetWishlistsHistory>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"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/target/getRegistry":{"post":{"operationId":"getRegistry","summary":"Reads one Target Gift Registry by its id, its custom URL or a shareable registry link — the registrants, event date and place, and every item with the quantity asked for, the quantity already bought, ","description":"Reads one Target Gift Registry by its id, its custom URL or a shareable registry link — the registrants, event date and place, and every item with the quantity asked for, the quantity already bought, and today's price.\n\nCalls `bowmark.providers.target.getRegistry`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetRegistry>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"registryId":{"type":"string"}},"required":["registryId"],"additionalProperties":true,"description":"TypeScript: `{ registryId: 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/target/getCart":{"post":{"operationId":"getCart","summary":"Reads the CALLER's own Target cart — line items (TCIN, title, quantity, unit and current price, image) and the cart's own totals (product subtotal, grand total).","description":"Reads the CALLER's own Target cart — line items (TCIN, title, quantity, unit and current price, image) and the cart's own totals (product subtotal, grand total). Also returns `checkout`, the checkout-handoff contract: the cart page of the caller's own Target account (status `ready_to_checkout` with `signedInAs` when the connection names its account, `needs_login` when it does not, `unavailable` for an empty cart or when every line is unavailable) plus the items, quantities and total. Bowmark never checks out or pays. Needs the caller signed in.\n\nCalls `bowmark.providers.target.getCart`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetCart>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"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/target/addToCart":{"post":{"operationId":"addToCart","summary":"Adds one product (by TCIN and optional quantity, defaulting to 1) to the CALLER's own Target cart.","description":"Adds one product (by TCIN and optional quantity, defaulting to 1) to the CALLER's own Target cart. The last step this provider may take on a buying flow — it stops there; this provider will never place an order or reach a payment step. Returns `checkout`, the checkout-handoff contract for the cart as it now stands: the cart page of the caller's own Target account, which account to sign in as, and the items and total; the person finishes at Target. Needs the caller signed in.\n\nCalls `bowmark.providers.target.addToCart`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetAddToCartResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"quantity":{"type":"number"}},"required":["tcin"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; quantity?: number }`"},"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/target/removeFromCart":{"post":{"operationId":"removeFromCart","summary":"Removes one line from the CALLER's own Target cart, by that line's own `cartItemId` (from `getCart`'s `cartItems`, never the product's TCIN — a cart can hold the same TCIN on two lines).","description":"Removes one line from the CALLER's own Target cart, by that line's own `cartItemId` (from `getCart`'s `cartItems`, never the product's TCIN — a cart can hold the same TCIN on two lines). Returns `checkout`, the checkout-handoff contract for what is left in the cart (the cart page of the caller's own Target account, which account to sign in as, items and total); Bowmark never checks out or pays. Needs the caller signed in.\n\nCalls `bowmark.providers.target.removeFromCart`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetRemoveFromCartResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"cartItemId":{"type":"string"}},"required":["cartItemId"],"additionalProperties":true,"description":"TypeScript: `{ cartItemId: 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/target/addToList":{"post":{"operationId":"addToList","summary":"Saves one product (by TCIN and optional quantity, defaulting to 1) to one of the CALLER's own Target Lists, by that list's `listId` (from `listWishlists`).","description":"Saves one product (by TCIN and optional quantity, defaulting to 1) to one of the CALLER's own Target Lists, by that list's `listId` (from `listWishlists`). Needs the caller signed in.\n\nCalls `bowmark.providers.target.addToList`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetAddToListResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"listId":{"type":"string"},"tcin":{"type":"string"},"quantity":{"type":"number"}},"required":["listId","tcin"],"additionalProperties":true,"description":"TypeScript: `{ listId: string; tcin: string; quantity?: number }`"},"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/target/writeReview":{"post":{"operationId":"writeReview","summary":"Submits a customer review for one product, as the CALLER's own signed-in identity — a public write the site attributes to whichever account is signed in, never to Bowmark.","description":"Submits a customer review for one product, as the CALLER's own signed-in identity — a public write the site attributes to whichever account is signed in, never to Bowmark. Takes the product TCIN from `search`, a 1-5 star rating, a review title and text. The submitted review is published immediately and publicly attributed to the caller's Target account. Needs the caller signed in.\n\nCalls `bowmark.providers.target.writeReview`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TargetWriteReviewResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"tcin":{"type":"string"},"rating":{"type":"number"},"title":{"type":"string"},"text":{"type":"string"}},"required":["tcin","rating","title","text"],"additionalProperties":true,"description":"TypeScript: `{ tcin: string; rating: number; title: string; text: 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}}}}}}