API reference
createWhiteLabelDiscount
Required permission: WhiteLabelDiscountWrite
createWhiteLabelDiscount(
whiteLabelId: ID!
input: DiscountInput!
): DiscountArguments
| Name | Type | Description |
|---|---|---|
whiteLabelId |
ID! |
|
input |
DiscountInput! |
Returns
Example
mutation CreateWhiteLabelDiscount($whiteLabelId: ID!, $input: DiscountInput!) {
createWhiteLabelDiscount(whiteLabelId: $whiteLabelId, input: $input) {
id
isDisabled
code
title
description
validFrom
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createWhiteLabelDiscount(...) { __typename } }"}'