API reference

createRestaurantProduct

Required permission: RestaurantMenuWrite

graphql
createRestaurantProduct(
  restaurantId: ID!
  input: RestaurantProductInput!
): RestaurantProduct

Arguments

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

graphql
mutation CreateRestaurantProduct($restaurantId: ID!, $input: RestaurantProductInput!) {
  createRestaurantProduct(restaurantId: $restaurantId, input: $input) {
    id
    class
    name
    price
    priceIsOpen
    stateId
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createRestaurantProduct(...) { __typename } }"}'