API reference

setKarmaSurplusQuantity

Required permission: RestaurantMenuStockWrite

graphql
setKarmaSurplusQuantity(
  restaurantId: ID!
  productVariantId: ID!
  input: SetKarmaSurplusQuantityInput!
): KarmaSurplusEntry

Arguments

Name Type Description
restaurantId ID!
productVariantId ID!
input SetKarmaSurplusQuantityInput!

Returns

KarmaSurplusEntry

Example

graphql
mutation SetKarmaSurplusQuantity($restaurantId: ID!, $productVariantId: ID!, $input: SetKarmaSurplusQuantityInput!) {
  setKarmaSurplusQuantity(restaurantId: $restaurantId, productVariantId: $productVariantId, input: $input) {
    id
    date
    quantity
    quantitySold
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { setKarmaSurplusQuantity(...) { __typename } }"}'