API reference

updateWhiteLabelDiscount

Required permission: WhiteLabelDiscountWrite

graphql
updateWhiteLabelDiscount(
  whiteLabelId: ID!
  discountId: ID!
  patch: DiscountPatch!
): Discount

Arguments

Name Type Description
whiteLabelId ID!
discountId ID!
patch DiscountPatch!

Returns

Discount

Example

graphql
mutation UpdateWhiteLabelDiscount($whiteLabelId: ID!, $discountId: ID!, $patch: DiscountPatch!) {
  updateWhiteLabelDiscount(whiteLabelId: $whiteLabelId, discountId: $discountId, patch: $patch) {
    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 { updateWhiteLabelDiscount(...) { __typename } }"}'