Discounts
/v1/discountsRequires sign-in (OAuth). Scope: discounts:write. MCP tool: create_discount.
Create a percentage, fixed-amount or free-shipping discount. Optionally set a minimum purchase and code prefix. The rule is saved to your discount library and your Shopify store immediately (Shopify stores only for now). Set minimum spend on the discount itself.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/discounts" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "type": "percentage" }'{ "id": "string", "name": "string", "offer": "string", "minimum": { "type": "string", "value": 0 }, "duration_days": 0, "note": "string"}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/discounts/{discount_rule_id}Requires sign-in (OAuth). Scope: discounts:write. MCP tool: update_discount.
Edit a discount’s value, duration, name, code prefix or minimum purchase. Set minimum to null to remove the purchase requirement. Changes apply to codes created afterward.
Authorization
bearerAuth In: header
Path Parameters
The id of an existing rule from your discount library — see get_campaign_composer_options.discount_rules.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/discounts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "offer": "string", "minimum": { "type": "string", "value": 0 }, "duration_days": 0, "note": "string"}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}