{"openapi":"3.1.0","info":{"title":"UPS API (Bowmark)","version":"e833508f87ff","description":"UPS's own documented Rating API (onlinetools.ups.com) — prices a domestic shipment across UPS's service levels for a ZIP-to-ZIP move, weight and optional dimensions, the same rate engine ups.com's own shipping calculator runs. No browser, no scraping.\n\nEvery function Bowmark has for UPS (ups.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/ups/getRate":{"post":{"operationId":"getRate","summary":"**Needs your own UPS developer API key, and US 5-digit ZIP Codes only** — for a no-key retail quote (including international) use `calculateShippingCost`.","description":"**Needs your own UPS developer API key, and US 5-digit ZIP Codes only** — for a no-key retail quote (including international) use `calculateShippingCost`. Prices a domestic shipment across every UPS service level that quotes it, between two 5-digit ZIP Codes, for a weight in ounces and optional length/width/height in inches (all three or none). `accountNumber` is a UPS shipper number tied to the caller's own UPS developer account — published rates vary by whether one is sent, and UPS's own response passes straight through either way. Requires a UPS OAuth2 client-credentials token — see this provider's `auth`.\n\nCalls `bowmark.providers.ups.getRate`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<upsRatedShipment[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"fromZip":{"type":"string"},"toZip":{"type":"string"},"weightOz":{"type":"number"},"length":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"accountNumber":{"type":"string"}},"required":["fromZip","toZip","weightOz"],"additionalProperties":true,"description":"TypeScript: `{ fromZip: string; toZip: string; weightOz: number; length?: number; width?: number; height?: number; accountNumber?: 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/ups/trackShipment":{"post":{"operationId":"trackShipment","summary":"Tracks a shipment by its UPS tracking number and returns the current status, location, and estimated delivery date.","description":"Tracks a shipment by its UPS tracking number and returns the current status, location, and estimated delivery date. Queries the public tracking page (www.ups.com/track) without authentication.\n\nCalls `bowmark.providers.ups.trackShipment`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<upsTrackingResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"trackingNumber":{"type":"string"}},"required":["trackingNumber"],"additionalProperties":true,"description":"TypeScript: `{ trackingNumber: 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/ups/estimateDeliveryDate":{"post":{"operationId":"estimateDeliveryDate","summary":"Turns getRate's own transit-day figure into a calendar delivery date — UPS's Rating API returns only a business-day COUNT from pickup, never a date, so this calls the same Rating API and adds that man","description":"Turns getRate's own transit-day figure into a calendar delivery date — UPS's Rating API returns only a business-day COUNT from pickup, never a date, so this calls the same Rating API and adds that many business days onto `shipDate` (default today). `serviceCode` narrows to one UPS service level (the same code `getRate` returns); omitted, every quoted service is returned. Requires a UPS OAuth2 client-credentials token — see this provider's `auth`.\n\nCalls `bowmark.providers.ups.estimateDeliveryDate`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<upsDeliveryEstimate[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"fromZip":{"type":"string"},"toZip":{"type":"string"},"weightOz":{"type":"number"},"length":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"accountNumber":{"type":"string"},"shipDate":{"type":"string"},"serviceCode":{"type":"string"}},"required":["fromZip","toZip","weightOz"],"additionalProperties":true,"description":"TypeScript: `{ fromZip: string; toZip: string; weightOz: number; length?: number; width?: number; height?: number; accountNumber?: string; shipDate?: string; serviceCode?: 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/ups/validateAddress":{"post":{"operationId":"validateAddress","summary":"Validates and standardizes a US shipping address against UPS's Address Validation API (XAV).","description":"Validates and standardizes a US shipping address against UPS's Address Validation API (XAV). Give either `zip` or both `city` and `state` along with `addressLine`. `valid: true` means the address matched exactly as given; `ambiguous: true` means UPS found more than one plausible standardized form and `candidates` holds every option; an empty `candidates` array with both `valid` and `ambiguous` false means UPS could not match the address at all. Requires a UPS OAuth2 client-credentials token — see this provider's `auth`.\n\nCalls `bowmark.providers.ups.validateAddress`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<upsAddressValidation>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"addressLine":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"countryCode":{"type":"string"}},"required":["addressLine"],"additionalProperties":true,"description":"TypeScript: `{ addressLine: string; addressLine2?: string; city?: string; state?: string; zip?: string; countryCode?: 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/ups/calculateShippingCost":{"post":{"operationId":"calculateShippingCost","summary":"Flat-rate shipping quote from ups.com's own public calculator's UPS® Simple Rate — no account, no weight, no dimensions.","description":"Flat-rate shipping quote from ups.com's own public calculator's UPS® Simple Rate — no account, no weight, no dimensions. `packageSize` is one of UPS's own five box-size categories (\"extraSmall\" through \"extraLarge\"); `shipDate` defaults to today. Returns one row per UPS service level the calculator quoted (Ground, 3 Day Select, 2nd Day Air, Next Day Air Saver, etc.) with cost, days in transit and the site's own delivery-date wording. A DIFFERENT product from `getRate` (negotiated, weight-based pricing through the keyed Rating API) — this is the flat retail price any anonymous visitor sees. No key needed; drives the calculator's own multi-step wizard in a headless browser. International: pass `toCountry` (ISO 2-letter, default \"US\"), the destination postal code as `toZip`, ideally `toCity`, and instead of `packageSize` give `weightLbs`, `lengthIn`, `widthIn`, `heightIn` and `customsValue` (USD) — Simple Rate is US-only, so those lanes are priced by weight and box, and `daysInTransit` comes back null.\n\nCalls `bowmark.providers.ups.calculateShippingCost`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<UpsSimpleRateQuote[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"fromZip":{"type":"string"},"toZip":{"type":"string"},"toCountry":{"type":"string"},"toCity":{"type":"string"},"packageSize":{"anyOf":[{"const":"extraSmall"},{"const":"small"},{"const":"medium"},{"const":"large"},{"const":"extraLarge"}]},"weightLbs":{"type":"number"},"lengthIn":{"type":"number"},"widthIn":{"type":"number"},"heightIn":{"type":"number"},"customsValue":{"type":"number"},"shipDate":{"type":"string"}},"required":["fromZip","toZip"],"additionalProperties":true,"description":"TypeScript: `{ fromZip: string; toZip: string; toCountry?: string; toCity?: string; packageSize?: \"extraSmall\" | \"small\" | \"medium\" | \"large\" | \"extraLarge\"; weightLbs?: number; lengthIn?: number; widthIn?: number; heightIn?: number; customsValue?: number; shipDate?: 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/ups/calculateTimeAndCost":{"post":{"operationId":"calculateTimeAndCost","summary":"Public retail rates and delivery dates from ups.com's own \"Calculate Time and Cost\" tool (ups.com/ctc) for a weighed parcel between ANY two countries — no key, no login, no account, international lane","description":"Public retail rates and delivery dates from ups.com's own \"Calculate Time and Cost\" tool (ups.com/ctc) for a weighed parcel between ANY two countries — no key, no login, no account, international lanes included (e.g. DE 20095 -> FR 69002). Countries are ISO 2-letter codes; `units` defaults to \"metric\" (weight in kg, box in cm), \"imperial\" is lb and in. `customsValue` (in the origin currency) is needed on a lane that crosses customs and ignored inside one customs union. Returns one row per UPS service (UPS Standard, Express Saver, Express, Express Plus…) with cost and the currency the calculator quoted in (the origin's, e.g. EUR from Germany), the delivery date and whether it is guaranteed. Use this rather than `calculateShippingCost` when the origin is not in the US. Drives the calculator in a headless browser, so it takes about a minute.\n\nCalls `bowmark.providers.ups.calculateTimeAndCost`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<UpsSimpleRateQuote[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"fromCountry":{"type":"string"},"fromPostalCode":{"type":"string"},"fromCity":{"type":"string"},"toCountry":{"type":"string"},"toPostalCode":{"type":"string"},"toCity":{"type":"string"},"weight":{"type":"number"},"length":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"units":{"anyOf":[{"const":"metric"},{"const":"imperial"}]},"customsValue":{"type":"number"},"shipDate":{"type":"string"}},"required":["fromCountry","fromPostalCode","toCountry","toPostalCode","weight","length","width","height"],"additionalProperties":true,"description":"TypeScript: `{ fromCountry: string; fromPostalCode: string; fromCity?: string; toCountry: string; toPostalCode: string; toCity?: string; weight: number; length: number; width: number; height: number; units?: \"metric\" | \"imperial\"; customsValue?: number; shipDate?: 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/ups/findNearbyLocation":{"post":{"operationId":"findNearbyLocation","summary":"Finds UPS drop-off/pickup locations near a ZIP Code or street/city address — UPS Customer Centers, The UPS Store, Drop Boxes, Authorized Shipping Outlets, Mail Boxes Etc, Retail Chains, Authorized Ser","description":"Finds UPS drop-off/pickup locations near a ZIP Code or street/city address — UPS Customer Centers, The UPS Store, Drop Boxes, Authorized Shipping Outlets, Mail Boxes Etc, Retail Chains, Authorized Service Providers and UPS Access Points. `maxResults` defaults to 15 (capped at 50); `locationTypes` defaults to every type except `mailBoxesEtc`, matching ups.com's own default search. Each row carries the site's own address, distance, phone (when published) and drop-off cutoff times. No account, no browser — geocodes the address through Bing's Locations API (the same door ups.com's own locator widget uses) then calls ups.com's locator backend directly.\n\nCalls `bowmark.providers.ups.findNearbyLocation`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<UpsNearbyLocation[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"address":{"type":"string"},"maxResults":{"type":"number"},"locationTypes":{"type":"array","items":{"anyOf":[{"const":"customerCenter"},{"const":"upsStore"},{"const":"dropBox"},{"const":"authorizedOutlet"},{"const":"mailBoxesEtc"},{"const":"retailChain"},{"const":"authorizedServiceProvider"},{"const":"accessPoint"}]}},"units":{"anyOf":[{"const":"MI"},{"const":"KM"}]}},"required":["address"],"additionalProperties":true,"description":"TypeScript: `{ address: string; maxResults?: number; locationTypes?: Array<\"customerCenter\" | \"upsStore\" | \"dropBox\" | \"authorizedOutlet\" | \"mailBoxesEtc\" | \"retailChain\" | \"authorizedServiceProvider\" | \"accessPoint\">; units?: \"MI\" | \"KM\" }`"}},"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/ups/schedulePickup":{"post":{"operationId":"schedulePickup","summary":"Quotes UPS's one-time pickup fee for a US address on a date (`pickupDate` YYYY-MM-DD, default tomorrow), from the guest Schedule a Pickup wizard's own pricing call — no account.","description":"Quotes UPS's one-time pickup fee for a US address on a date (`pickupDate` YYYY-MM-DD, default tomorrow), from the guest Schedule a Pickup wizard's own pricing call — no account. Returns the base charge, any surcharges and the total. It NEVER books: confirming a pickup dispatches a real driver and takes payment, so the result is a quote plus `bookUrl` where a person finishes it. Runs in a headless browser.\n\nCalls `bowmark.providers.ups.schedulePickup`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<UpsPickupQuote>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"addressLine":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"pickupDate":{"type":"string"},"residential":{"type":"boolean"}},"required":["addressLine","city","state","zip"],"additionalProperties":true,"description":"TypeScript: `{ addressLine: string; city: string; state: string; zip: string; pickupDate?: string; residential?: boolean }`"}},"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/ups/getServiceAlerts":{"post":{"operationId":"getServiceAlerts","summary":"UPS's own active service alerts — weather, natural disasters and regional disruptions that may delay shipments — as listed on www.ups.com/us/en/service-alerts.","description":"UPS's own active service alerts — weather, natural disasters and regional disruptions that may delay shipments — as listed on www.ups.com/us/en/service-alerts. `alerts` empty (and `count` 0) means UPS lists no active disruption. `includeTargeted: true` also returns notices UPS aims at signed-in business customers, which the public page hides. No account, no browser.\n\nCalls `bowmark.providers.ups.getServiceAlerts`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<UpsServiceAlerts>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"type":"object","properties":{"includeTargeted":{"type":"boolean"}},"additionalProperties":true,"description":"TypeScript: `{ includeTargeted?: boolean }`"}},"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}}}}}}