Admin API / Mutations
createDiscountCode
Creates a discount code for the listings of sellerId, who pays the discount on each order that uses the code. A code on District with the same upper-case text gives DiscountCodeTakenError. An older code with lower-case letters, such as spring15, does not hold SPRING15. A repeat with the same idempotencyKey and input within 24 hours returns the first result.
Requires a client key with one of these scopes:
admin:discounts:writeRequires this member role or higher: SELLERcreateDiscountCode(
input: CreateDiscountCodeInput!
): CreateDiscountCodePayload!Arguments
| Argument | Type | Description |
|---|---|---|
input | CreateDiscountCodeInput! | The code to create. |