API reference
createRestaurantProduct
Required permission: RestaurantMenuWrite
createRestaurantProduct(
restaurantId: ID!
input: RestaurantProductInput!
): RestaurantProductArguments
| Name | Type | Description |
|---|---|---|
restaurantId |
ID! |
|
input |
RestaurantProductInput! |
Returns
RestaurantProduct — A standalone product that is orderable by id but never appears in the menu. Used by features such as gift cards and upsells.
Example
mutation CreateRestaurantProduct($restaurantId: ID!, $input: RestaurantProductInput!) {
createRestaurantProduct(restaurantId: $restaurantId, input: $input) {
id
class
name
price
priceIsOpen
stateId
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createRestaurantProduct(...) { __typename } }"}'