API reference

createMenuProduct

Required permission: RestaurantMenuWrite

graphql
createMenuProduct(
  restaurantId: ID!
  menuCategoryId: ID!
  input: MenuProductInput!
): MenuProduct

Arguments

Name Type Description
restaurantId ID!
menuCategoryId ID!
input MenuProductInput!

Returns

MenuProduct

Example

graphql
mutation CreateMenuProduct($restaurantId: ID!, $menuCategoryId: ID!, $input: MenuProductInput!) {
  createMenuProduct(restaurantId: $restaurantId, menuCategoryId: $menuCategoryId, input: $input) {
    id
    allergens
    carbohydratesMg
    energyKcal
    fatMg
    fiberMg
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createMenuProduct(...) { __typename } }"}'