API reference
wasteStockArticle
Immediately decreases the stock by the given amount, to account for spoilage or waste. Required permission: RestaurantMenuStockWrite
wasteStockArticle(
restaurantId: ID!
stockArticleId: ID!
input: StockArticleWasteInput!
): StockArticleArguments
| Name | Type | Description |
|---|---|---|
restaurantId |
ID! |
|
stockArticleId |
ID! |
|
input |
StockArticleWasteInput! |
Returns
Example
mutation WasteStockArticle($restaurantId: ID!, $stockArticleId: ID!, $input: StockArticleWasteInput!) {
wasteStockArticle(restaurantId: $restaurantId, stockArticleId: $stockArticleId, input: $input) {
id
currentStock
isVisible
maxStockLevel
minStockLevel
name
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { wasteStockArticle(...) { __typename } }"}'