API reference

createWhiteLabelDiscount

Required permission: WhiteLabelDiscountWrite

graphql
createWhiteLabelDiscount(
  whiteLabelId: ID!
  input: DiscountInput!
): Discount

Arguments

Name Type Description
whiteLabelId ID!
input DiscountInput!

Returns

Discount

Example

graphql
mutation CreateWhiteLabelDiscount($whiteLabelId: ID!, $input: DiscountInput!) {
  createWhiteLabelDiscount(whiteLabelId: $whiteLabelId, input: $input) {
    id
    isDisabled
    code
    title
    description
    validFrom
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createWhiteLabelDiscount(...) { __typename } }"}'