{"openapi":"3.1.0","info":{"title":"Stackrules API","version":"0.1.0","description":"A fully local coupon-stacking rules explainer: general, widely observed US coupon-stacking practice — what stacking means, which coupon-type pairs generally combine, typical application order, common exclusions, digital-coupon tips, a fine-print checklist, retailer-type patterns, and a pure-compute stacked-discount calculator.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://stackrules.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/stackrules/docs"},"termsOfService":"https://connectorbay.com/stackrules/terms"},"servers":[{"url":"https://stackrules.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/stackrules/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/stacking_basics":{"post":{"operationId":"stacking_basics","summary":"What \"coupon stacking\" means, the core general rule (one manufacturer + one store coupon per item is","description":"What \"coupon stacking\" means, the core general rule (one manufacturer + one store coupon per item is\n    usually fine; two manufacturer coupons on one item essentially never is), and why that limit exists. Use for\n    \"what does coupon stacking even mean\", \"can I use two coupons on one item\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"stacking_basicsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/coupon_types_glossary":{"post":{"operationId":"coupon_types_glossary","summary":"Defines manufacturer coupon, store coupon, digital coupon, cash-back/rebate app, BOGO, percent/dollar-off,","description":"Defines manufacturer coupon, store coupon, digital coupon, cash-back/rebate app, BOGO, percent/dollar-off,\n    loyalty discount, and price match. Use for \"what's the difference between a manufacturer and store coupon\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"coupon_types_glossaryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/can_i_stack":{"post":{"operationId":"can_i_stack","summary":"A general yes/no/partial/varies answer for whether two coupon or discount TYPES typically combine (not","description":"A general yes/no/partial/varies answer for whether two coupon or discount TYPES typically combine (not\n    whether two SPECIFIC coupons will — always check each coupon's own fine print too). Use for \"can I use a\n    manufacturer coupon and a store coupon together\", \"does a cash-back app stack with a coupon\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"coupon_a_type":{"description":"First coupon/discount type.","examples":["manufacturer","store","loyalty","cash_back_app","bogo","price_match"],"title":"Coupon A Type","type":"string"},"coupon_b_type":{"description":"Second coupon/discount type.","title":"Coupon B Type","type":"string"}},"required":["coupon_a_type","coupon_b_type"],"title":"can_i_stackArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/stacking_order_guide":{"post":{"operationId":"stacking_order_guide","summary":"The typical order multiple discounts are applied in at checkout: sale price, then loyalty/digital store","description":"The typical order multiple discounts are applied in at checkout: sale price, then loyalty/digital store\n    coupon, then manufacturer coupon, then store coupon, then cash-back app (claimed after checkout). Use for\n    \"what order do my coupons get applied in\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"stacking_order_guideArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/common_exclusions":{"post":{"operationId":"common_exclusions","summary":"Patterns that commonly block stacking regardless of coupon type: explicit \"not combinable\" language,","description":"Patterns that commonly block stacking regardless of coupon type: explicit \"not combinable\" language,\n    per-customer limits, size/variety restrictions, \"free item\" exclusions, clearance exclusions, and the\n    zero-price floor most registers enforce. Use for \"why didn't my second coupon work\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"common_exclusionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/digital_coupon_tips":{"post":{"operationId":"digital_coupon_tips","summary":"Practical tips specific to app/loyalty-loaded digital coupons: loading before you shop, separate stacking","description":"Practical tips specific to app/loyalty-loaded digital coupons: loading before you shop, separate stacking\n    rules from paper coupons, deduplication, and common reasons a loaded coupon doesn't apply. Use for \"why\n    didn't my digital coupon apply at checkout\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"digital_coupon_tipsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/fine_print_checklist":{"post":{"operationId":"fine_print_checklist","summary":"What to actually check on a coupon before assuming it'll stack with another: expiration, size/variety,","description":"What to actually check on a coupon before assuming it'll stack with another: expiration, size/variety,\n    per-customer vs. per-transaction limits, minimum purchase, explicit exclusions, manufacturer-vs-store, and\n    (for paper) original-vs-photocopy. Use for \"what should I check before trying to use two coupons\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"fine_print_checklistArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/calculate_stacked_savings":{"post":{"operationId":"calculate_stacked_savings","summary":"Applies a list of percent/dollar discounts to a price IN ORDER, the way a point-of-sale system typically","description":"Applies a list of percent/dollar discounts to a price IN ORDER, the way a point-of-sale system typically\n    processes a multi-coupon transaction, and returns the final price, total savings, and a step-by-step\n    breakdown. Pure arithmetic — you decide what discounts apply and in what order. Use for \"if I have a 20% off\n    coupon and then a $5 off coupon on a $40 item, what's my final price\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"item_price":{"description":"The item or cart's starting price.","minimum":0,"title":"Item Price","type":"number"},"discounts":{"description":"Discounts to apply in order, each {type: 'percent'|'dollar', value: number, label?: string}.","items":{"additionalProperties":true,"type":"object"},"maxItems":10,"minItems":1,"title":"Discounts","type":"array"}},"required":["item_price","discounts"],"title":"calculate_stacked_savingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/retailer_type_patterns":{"post":{"operationId":"retailer_type_patterns","summary":"How coupon-stacking friendliness tends to differ by retailer type — grocery chains, drugstores, big-box/","description":"How coupon-stacking friendliness tends to differ by retailer type — grocery chains, drugstores, big-box/\n    department stores, and online-only retailers — as a general pattern, not a rule for any specific chain. Use\n    for \"are grocery stores more coupon-friendly than department stores\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"retailer_type_patternsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}