{"openapi":"3.1.0","info":{"title":"Chargebee Coupons (BYOK) API","version":"0.1.0","description":"Chargebee Coupons (BYOK) lets an AI assistant read your own Chargebee Coupons data through the Chargebee Coupons API with a key you supply (Chargebee API key (a read-only key is enough)). Read-only: 6 tools (list_coupons, get_coupon, list_coupon_sets, get_coupon_set, list_coupon_codes, get_coupon_code). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-chargebee-coupons.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-chargebee-coupons/docs"},"termsOfService":"https://connectorbay.com/byok-chargebee-coupons/terms"},"servers":[{"url":"https://byok-chargebee-coupons.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-chargebee-coupons/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_coupons":{"post":{"operationId":"list_coupons","summary":"List Chargebee coupons with discount type, amount or percentage, duration, validity window, redemption count and status.","description":"List Chargebee coupons with discount type, amount or percentage, duration, validity window, redemption count and status. Timestamps are Unix seconds. Amounts are in the smallest currency unit. Use for \"Which Chargebee coupons are active\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"status_is":{"anyOf":[{"enum":["active","expired","archived","deleted","future"],"type":"string"},{"type":"null"}],"default":null,"description":"Only coupons in this status.","title":"Status Is"},"discount_type_is":{"anyOf":[{"enum":["fixed_amount","percentage","offer_quantity"],"type":"string"},{"type":"null"}],"default":null,"description":"Only coupons of this discount type.","title":"Discount Type Is"},"duration_type_is":{"anyOf":[{"enum":["one_time","forever","limited_period"],"type":"string"},{"type":"null"}],"default":null,"description":"Only coupons with this duration.","title":"Duration Type Is"},"apply_on_is":{"anyOf":[{"enum":["invoice_amount","each_specified_item"],"type":"string"},{"type":"null"}],"default":null,"description":"Only coupons that apply on this.","title":"Apply On Is"},"name_starts_with":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only coupons whose name starts with this text.","title":"Name Starts With"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination token: the 'next_offset' value of the previous answer; leave empty for the first page.","title":"Offset"}},"required":["site"],"title":"list_couponsArguments","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/get_coupon":{"post":{"operationId":"get_coupon","summary":"Get one Chargebee coupon by id: discount, duration, validity window, redemption count and status. Use for \"How often was","description":"Get one Chargebee coupon by id: discount, duration, validity window, redemption count and status. Use for \"How often was Chargebee coupon SUMMER25 redeemed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"coupon_id":{"description":"Coupon id, for example SUMMER25.","maxLength":200,"title":"Coupon Id","type":"string"}},"required":["site","coupon_id"],"title":"get_couponArguments","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/list_coupon_sets":{"post":{"operationId":"list_coupon_sets","summary":"List Chargebee coupon sets (batches of generated codes for one coupon) with total, redeemed and archived code counts. Us","description":"List Chargebee coupon sets (batches of generated codes for one coupon) with total, redeemed and archived code counts. Use for \"How many codes of each coupon set were redeemed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"coupon_id_is":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only coupon sets of this coupon id.","title":"Coupon Id Is"},"name_starts_with":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sets whose name starts with this text.","title":"Name Starts With"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination token: the 'next_offset' value of the previous answer; leave empty for the first page.","title":"Offset"}},"required":["site"],"title":"list_coupon_setsArguments","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/get_coupon_set":{"post":{"operationId":"get_coupon_set","summary":"Get one Chargebee coupon set by id with its coupon and code counts. Use for \"How many codes are left in coupon set summe","description":"Get one Chargebee coupon set by id with its coupon and code counts. Use for \"How many codes are left in coupon set summer-batch-1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"coupon_set_id":{"description":"Coupon set id.","maxLength":200,"title":"Coupon Set Id","type":"string"}},"required":["site","coupon_set_id"],"title":"get_coupon_setArguments","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/list_coupon_codes":{"post":{"operationId":"list_coupon_codes","summary":"List Chargebee coupon codes with status (not redeemed, redeemed, archived), coupon and coupon set. Use for \"Which codes ","description":"List Chargebee coupon codes with status (not redeemed, redeemed, archived), coupon and coupon set. Use for \"Which codes of coupon SUMMER25 are still unredeemed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"coupon_id_is":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only codes of this coupon id.","title":"Coupon Id Is"},"coupon_set_name_is":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only codes of the coupon set with this name.","title":"Coupon Set Name Is"},"status_is":{"anyOf":[{"enum":["not_redeemed","redeemed","archived"],"type":"string"},{"type":"null"}],"default":null,"description":"Only codes in this status.","title":"Status Is"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination token: the 'next_offset' value of the previous answer; leave empty for the first page.","title":"Offset"}},"required":["site"],"title":"list_coupon_codesArguments","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/get_coupon_code":{"post":{"operationId":"get_coupon_code","summary":"Get one Chargebee coupon code: status, coupon and coupon set. Use for \"Was coupon code WELCOME-AB12 redeemed\".","description":"Get one Chargebee coupon code: status, coupon and coupon set. Use for \"Was coupon code WELCOME-AB12 redeemed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"site":{"description":"Your Chargebee site name, the first part of your site address: 'acme' for acme.chargebee.com (use 'acme-test' for a test site). Letters, digits and hyphens only.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Site","type":"string"},"coupon_code":{"description":"The coupon code itself, for example WELCOME-AB12.","maxLength":200,"title":"Coupon Code","type":"string"}},"required":["site","coupon_code"],"title":"get_coupon_codeArguments","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}}}}