Cupom Center
v0.1.0Conecta agentes de IA à API REST do Cupom Center com fluxos seguros de cupons.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
recommend_integration_flow Recommend Cupom Center integration flow
Choose the correct Cupom Center workflow before making API calls. This tool is local, has no commercial effect, and consumes no Cupom Center API allowance. Use it whenever it is unclear whether to discover, quote, issue, redeem, record payment, inspect, or reverse.
| Parameter | Type | Description |
|---|---|---|
business_goal * | string | |
operation_id_known | boolean | |
payment_confirmed | boolean |
find_eligible_coupons Find eligible coupons
Discover coupons whose configured rules match the known customer/cart context. This does not calculate final totals, reserve budget, or consume a coupon. Missing context intentionally excludes coupons that require that fact. public defaults to true.
| Parameter | Type | Description |
|---|---|---|
context | object | |
pagination | object |
quote_single_coupon Calculate and reserve one coupon
Validate a known coupon code against the current cart, calculate authoritative totals, and create a temporary quote reservation. Use before redeeming or displaying a final discount. Do not use for catalog discovery.
| Parameter | Type | Description |
|---|---|---|
context * | object | |
coupon_code * | string | Coupon code supplied or selected for the customer. |
cart_id | string |
quote_multiple_coupons Calculate and reserve multiple coupons
Validate and calculate 2–10 known coupon codes. code_order stacks sequentially in supplied order; highest_discount_per_product applies only the best coupon to each product. Every supplied code must be eligible and applied.
| Parameter | Type | Description |
|---|---|---|
context * | object | |
coupon_codes * | array | |
selection * | object | |
cart_id | string |
select_coupons_for_units Select coupons per unit
Automatically select public coupons for 1–20 marketplace/store units. Use only when a cart is partitioned into units and the integration wants Cupom Center to choose by coverage or total discount. This is not for validating a known code.
| Parameter | Type | Description |
|---|---|---|
mode * | string | |
units * | array | |
context | object | |
max_coupons_per_unit | integer | |
priority | string |
create_coupon_issuance Issue an individual coupon code
Create an individual code from an existing coupon configured with ISSUED distribution, typically for cart recovery, CRM, or individualized delivery. This never creates discount rules. Requires COUPON_ISSUE and a stable idempotency key.
| Parameter | Type | Description |
|---|---|---|
cart * | array | |
coupon_id * | string | Existing Cupom Center coupon configured with ISSUED distribution. |
external_reference * | string | Stable reference for the CRM, recovery, or distribution event. |
idempotency_key * | string | Stable per-attempt key. Reuse it unchanged after a timeout. |
subject * | object | |
metadata | ||
shipping | object | |
valid_until | string |
get_coupon_issuance Get coupon issuance
Read the current state and immutable commercial details of an individual issued code.
| Parameter | Type | Description |
|---|---|---|
issuance_id * | string | Issuance ID returned by create_coupon_issuance. |
revoke_coupon_issuance Revoke coupon issuance
Revoke one active individual issuance. This is idempotent but cannot reactivate a consumed or expired code. Use only when the individual code must no longer be accepted.
| Parameter | Type | Description |
|---|---|---|
issuance_id * | string | Issuance ID returned by create_coupon_issuance. |
redeem_single_coupon Redeem one coupon
Confirm one coupon as a commercial operation. Normally call after quote_single_coupon and send the same cart/context. Provide cart_id, context.user.id, or quote_id for correlation. Include payment only after external confirmation; Cupom Center does not charge money.
| Parameter | Type | Description |
|---|---|---|
context * | object | |
coupon_code * | string | Coupon code supplied or selected for the customer. |
cart_id | string | |
order_id | string | |
payment | object | |
quote_id | string |
redeem_multiple_coupons Redeem multiple coupons
Atomically confirm 2–10 coupons previously calculated together. Preserve code order and selection strategy from the quote. Either all applicable uses/budgets confirm or none do.
| Parameter | Type | Description |
|---|---|---|
context * | object | |
coupon_codes * | array | |
selection * | object | |
cart_id | string | |
order_id | string | |
payment | object | |
quote_id | string |
get_coupon_operation Get coupon operation
Inspect a redemption operation, immutable receipts, current payment, and reversals. Use for reconciliation and as the first recovery step after a timeout when operation_id is known.
| Parameter | Type | Description |
|---|---|---|
operation_id * | string | operation_id returned by a successful redeem. |
record_operation_payment Record confirmed operation payment
Record an integral payment that an external payment provider has already confirmed. This does not charge or capture money and does not consume coupons again. Requires PAYMENT_WRITE.
| Parameter | Type | Description |
|---|---|---|
operation_id * | string | operation_id returned by a successful redeem. |
payment * | object |
reverse_operation Cancel or refund a coupon operation
Fully reverse one coupon operation and release its usage counters and budgets. The backend classifies it as cancellation without payment or refund with confirmed payment. This does not move money at the payment provider and accepts no reason or partial amount.
| Parameter | Type | Description |
|---|---|---|
operation_id * | string | operation_id returned by a successful redeem. |