campaigns_write
Arguments
ID!
required
The discount code’s
id, or its legacyId from an earlier version of the Redo API.required
The fields to change.
Show fields
Show fields
String
The code customers enter at checkout.
When the code stops working.
Show fields
Show fields
Int
Required when
type is AFTER_DAYS.Whether the code never expires, expires on a date, or after a number of days.
Must be STATIC. DYNAMIC is not supported.
Replace how the discount reduces the order. Pass exactly one of amountOff, freeShipping, or buyXGetY.
Show fields
Show fields
A percent-off or amount-off discount.
A buy-X-get-Y discount.
A free-shipping discount.
String
The merchant-facing name of the discount.
Returns
A discount configuration hosted on Shopify or BigCommerce.
Show fields
Show fields
String!
required
The code customers enter at checkout.
String!
required
A short human-readable summary of what the code does.
required
When this code stops working.
Show fields
Show fields
Int
Days after creation when
type is AFTER_DAYS.required
Whether the code never expires, expires on a date, after a number of days, or on delivery.
String!
required
The platform’s id for this discount (a Shopify GID or a BigCommerce promotion id).
required
Whether this is one fixed code or a unique code per customer.
ID!
required
The id of this discount code.
How the discount reduces the order. Null when the config has no settings type.
String!
required
The discount’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
required
The commerce platform that hosts this code.
How the discount reduces the order.
String!
required
The merchant-facing name of the discount.
Example
mutation {
updateDiscountCode(id: "...", input: { ... }) {
code
createdAt
description
externalId
groupType
id
kind
legacyId
# ...
}
}