MenuCalc MenuSync API

Purpose of the MenuSync API

MenuSync is designed to revolutionize how restaurant IT organizations manage and display nutrition and allergen information. This powerful API integrates with MenuCalc's nutrition and allergen analysis, seamlessly connecting with a restaurant's inventory system. It automates the process of sending recipes, prep recipes, and ingredients to MenuCalc for detailed analysis, thereby eliminating the need for manual data transfer.

License

ISC

API Endpoints
https://api.menucalc-stage.com/graphql

Target Audience

This API is primarily targeted at IT professionals and developers working within the restaurant industry, specifically in organizations with multiple locations that are mandated by the FDA to provide detailed nutrition and allergen information to diners.

Key Features and Functionalities

  1. Integration with Inventory Systems: Facilitates the automatic transfer of recipes and ingredient data from a restaurant's inventory to MenuCalc for analysis.
  2. Front-of-House System Integration: Enables the display of nutrition and allergen information on various customer-facing platforms such as ordering systems, POS, digital menus, and restaurant apps.
  3. Support for Corporate Operational Structure: MenuSync caters to different levels of restaurant operations including:
    • Brands: Management of multiple chains under a single holding company.
    • Chains: Administration of a group of restaurant locations operating under a single brand.
    • Restaurants: Specific details of individual restaurant locations, including operational hours and geographical information.
    • Menu Categories: Organization of recipes into categories like breakfast, lunch, dinner, specials, etc.
    • Recipes: Detailed information about each recipe offered.
    • Prep Recipes: Comprehensive data on sub-recipes, including ingredients and preparation methods.
    • Ingredients: A broad categorization of ingredients including external, MenuCalc Staples, and MenuCalc Brands.
    • Nutrients and Allergens: Detailed nutritional values and allergen information for each ingredient.

Compliance with FDA Regulations

MenuSync is particularly beneficial for restaurant chains with 20 or more locations, as it assists in complying with FDA regulations requiring the provision of nutritional and allergen information for all menu items.

Getting Started

Setting Up a Developer API Account

Account Creation: Developers must first have MenuCalc set up a dedicated developer API account to access the MenuSync API. This is a mandatory step to ensure secure and authorized access.

API Security and Tokens

Security Tokens: MenuSync API utilizes security tokens for system access. These tokens are unique to each developer and are associated with their specific brand and/or chain. Distribution of Tokens: MenuCalc is responsible for creating and distributing these tokens to developers. A separate sandbox token will also be provided for testing and development purposes.

Sandbox Environment

  1. Purpose: MenuCalc offers a sandbox environment for developers to experiment and develop integrations with their internal systems without affecting live data.
  2. Sandbox Token: A unique token will be provided for accessing this sandbox, enabling a safe space for development and testing.

Moving to Production

  1. Verification Process: Before granting a production security token, MenuCalc will verify the developer’s usage of the API in the sandbox environment to ensure proper implementation.
  2. Production Token: Upon successful verification, MenuCalc will provide a production security token for live environment access.

Usage Monitoring and Limitations

  1. Usage Tracking: MenuCalc actively tracks API usage to ensure compliance with standard operational guidelines.
  2. Guardrails and Limitations: There are established guardrails, including limitations on the number of API calls a developer can make, to ensure the API is used correctly and efficiently.

GraphQL Schema Overview

Introduction to GraphQL

MenuSync API utilizes GraphQL, a powerful query language for APIs, which provides a complete and understandable description of the data in the API. GraphQL allows clients to request exactly what they need and nothing more, making it easier to evolve APIs over time.

Schema Components

The MenuSync API's GraphQL schema includes a variety of types such as Scalar types, Object types, Enums, Interfaces, and Input objects. Here's an overview of the key components:

  1. Scalar Types
  • String: Represents textual data.
  • ID: A unique identifier, often used to refetch an object or as a key for a cache.
  • DateTime: Represents a date-time string at UTC.
  • Int: Represents non-fractional signed whole numeric values.
  • Boolean: Represents true or false.
  • Float: Represents signed double-precision fractional values.
  1. Object Types
  • Chain: Represents a group of restaurant locations operating under a single brand.
  • Recipe: Represents a specific recipe offered by a chain.
  • MenuCategory: Represents a category of recipes within a menu.
  • PrepRecipe: Represents a recipe used as part of another recipe.
  • Ingredient: Represents an individual ingredient.
  1. Interfaces
  • Node: An interface that includes an id field.
  • PagedEdge and PagedConnection: Interfaces used for pagination.
  1. Enums
  • AllergenType, ServingType, Unit: Enum types representing specific predefined values.
  1. Input Objects
  • NewIngredient, UpdateIngredient, QuantityContent: Objects that define the structure of input data.

Queries and Mutations

The API defines various queries and mutations that allow the retrieval and manipulation of data:

  1. Queries: Such as retrieving information about a chain or a recipe.
  2. Mutations: Including creating and updating ingredients and recipes.

Pagination and Filtering

The schema supports advanced features like pagination and filtering, ensuring efficient data retrieval and handling.

Queries

brand

Description

Returns info about the brand.

Response

Returns a Brand!

Example

Query
query brand {
  brand {
    name
    location {
      type
      address
      city
      state
      country
      zip
      latitude
      longitude
    }
    website
  }
}
Response
{
  "data": {
    "brand": {
      "name": "Chain Name",
      "location": Location,
      "website": "www.website.com"
    }
  }
}

chain

Description

Returns info about the restaurant.

Response

Returns a Chain!

Arguments
Name Description
id - ID

Example

Query
query chain($id: ID) {
  chain(id: $id) {
    id
    name
    location {
      type
      address
      city
      state
      country
      zip
      latitude
      longitude
    }
    website
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "chain": {
      "id": "Mw==",
      "name": "Chain Name",
      "location": Location,
      "website": "www.website.com"
    }
  }
}

recipe

Description

Returns info about a restaurants recipe.

Response

Returns a Recipe!

Arguments
Name Description
chain - ID
id - ID!

Example

Query
query recipe(
  $chain: ID,
  $id: ID!
) {
  recipe(
    chain: $chain,
    id: $id
  ) {
    id
    name
    externalId
    notes
    productionDate
    archiveDate
    createdAt
    updatedAt
    label
    smartMenuEnabled
    state
    category {
      id
      name
      isSubcategory
      ordinal
    }
    subcategory {
      id
      name
      isSubcategory
      ordinal
    }
    ordinal
    servingGramWeight
  }
}
Variables
{"chain": 4, "id": "4"}
Response
{
  "data": {
    "recipe": {
      "id": "Mw==",
      "name": "Tacos",
      "externalId": "11122A",
      "notes": "Lorem ipsum dolor sit amet...",
      "productionDate": "2007-12-03T10:15:30Z",
      "archiveDate": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "label": "abc123",
      "smartMenuEnabled": true,
      "state": "Archived",
      "category": MenuCategory,
      "subcategory": MenuCategory,
      "ordinal": 123,
      "servingGramWeight": 123.45
    }
  }
}

Mutations

createExternalIngredient

Description

Create a new ingredient.

Response

Returns an Ingredient

Arguments
Name Description
chain - ID
input - CreateIngredient!

Example

Query
mutation createExternalIngredient(
  $chain: ID,
  $input: CreateIngredient!
) {
  createExternalIngredient(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    menuCalcId
    label
    type
    createdAt
    updatedAt
    brandName
    description
    statement
    gramWeight
    supplier
  }
}
Variables
{
  "chain": "4",
  "input": CreateIngredient
}
Response
{
  "data": {
    "createExternalIngredient": {
      "id": "Mw==",
      "name": "Ketchup",
      "externalId": "11122A",
      "menuCalcId": "11122B",
      "label": "abc123",
      "type": "MenuCalcBrand",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "brandName": "Brand Name",
      "description": "Lorem ipsum dolor sit amet...",
      "statement": "Lorem ipsum dolor sit amet...",
      "gramWeight": 987.65,
      "supplier": "Supplier Name"
    }
  }
}

createMenuCategory

Description

Create a new menu category.

Response

Returns a MenuCategory

Arguments
Name Description
chain - ID
input - CreateMenuCategory!

Example

Query
mutation createMenuCategory(
  $chain: ID,
  $input: CreateMenuCategory!
) {
  createMenuCategory(
    chain: $chain,
    input: $input
  ) {
    id
    name
    isSubcategory
    ordinal
  }
}
Variables
{
  "chain": "4",
  "input": CreateMenuCategory
}
Response
{
  "data": {
    "createMenuCategory": {
      "id": 4,
      "name": "Breakfast",
      "isSubcategory": false,
      "ordinal": 987
    }
  }
}

createPrepRecipe

Description

Create a prep recipe.

Response

Returns a PrepRecipe

Arguments
Name Description
chain - ID
input - CreatePrepRecipe!

Example

Query
mutation createPrepRecipe(
  $chain: ID,
  $input: CreatePrepRecipe!
) {
  createPrepRecipe(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    label
    yield {
      customUOMName
      quantity
    }
    notes
    completedAt
    createdAt
    updatedAt
  }
}
Variables
{
  "chain": "4",
  "input": CreatePrepRecipe
}
Response
{
  "data": {
    "createPrepRecipe": {
      "id": "Mw==",
      "name": "Tacos",
      "externalId": "11122A",
      "label": "Tacos",
      "yield": Yield,
      "notes": "Lorem ipsum dolor sit amet...",
      "completedAt": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

createRecipe

Description

Create a new recipe.

Response

Returns a Recipe

Arguments
Name Description
chain - ID
input - CreateRecipe!

Example

Query
mutation createRecipe(
  $chain: ID,
  $input: CreateRecipe!
) {
  createRecipe(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    notes
    productionDate
    archiveDate
    createdAt
    updatedAt
    label
    smartMenuEnabled
    state
    category {
      id
      name
      isSubcategory
      ordinal
    }
    subcategory {
      id
      name
      isSubcategory
      ordinal
    }
    ordinal
    servingGramWeight
  }
}
Variables
{
  "chain": "4",
  "input": CreateRecipe
}
Response
{
  "data": {
    "createRecipe": {
      "id": "Mw==",
      "name": "Tacos",
      "externalId": "11122A",
      "notes": "Lorem ipsum dolor sit amet...",
      "productionDate": "2007-12-03T10:15:30Z",
      "archiveDate": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "label": "abc123",
      "smartMenuEnabled": false,
      "state": "Archived",
      "category": MenuCategory,
      "subcategory": MenuCategory,
      "ordinal": 987,
      "servingGramWeight": 987.65
    }
  }
}

deleteExternalIngredient

Description

Delete existing ingredients.

Response

Returns a DeleteResponse!

Arguments
Name Description
chain - ID
input - [ID!]!

Example

Query
mutation deleteExternalIngredient(
  $chain: ID,
  $input: [ID!]!
) {
  deleteExternalIngredient(
    chain: $chain,
    input: $input
  ) {
    message
  }
}
Variables
{
  "chain": "4",
  "input": ["4"]
}
Response
{
  "data": {
    "deleteExternalIngredient": {
      "message": "abc123"
    }
  }
}

deleteMenuCategory

Description

Delete an existing menu category.

Response

Returns a DeleteResponse!

Arguments
Name Description
chain - ID
input - [ID!]!

Example

Query
mutation deleteMenuCategory(
  $chain: ID,
  $input: [ID!]!
) {
  deleteMenuCategory(
    chain: $chain,
    input: $input
  ) {
    message
  }
}
Variables
{
  "chain": "4",
  "input": ["4"]
}
Response
{
  "data": {
    "deleteMenuCategory": {
      "message": "xyz789"
    }
  }
}

deletePrepRecipe

Description

Delete existing prep recipes.

Response

Returns a DeleteResponse!

Arguments
Name Description
chain - ID
input - [ID!]!

Example

Query
mutation deletePrepRecipe(
  $chain: ID,
  $input: [ID!]!
) {
  deletePrepRecipe(
    chain: $chain,
    input: $input
  ) {
    message
  }
}
Variables
{"chain": 4, "input": ["4"]}
Response
{
  "data": {
    "deletePrepRecipe": {
      "message": "xyz789"
    }
  }
}

deleteRecipe

Description

Delete existing recipes.

Response

Returns a DeleteResponse!

Arguments
Name Description
chain - ID
input - [ID!]!

Example

Query
mutation deleteRecipe(
  $chain: ID,
  $input: [ID!]!
) {
  deleteRecipe(
    chain: $chain,
    input: $input
  ) {
    message
  }
}
Variables
{"chain": 4, "input": ["4"]}
Response
{
  "data": {
    "deleteRecipe": {"message": "abc123"}
  }
}

swapIngredient

Description

Replace an ingredients/prep across all recipes.

Response

Returns [RecipeIngredient!]!

Arguments
Name Description
chain - ID
target - SwapEntity!
replacement - SwapEntity!

Example

Query
mutation swapIngredient(
  $chain: ID,
  $target: SwapEntity!,
  $replacement: SwapEntity!
) {
  swapIngredient(
    chain: $chain,
    target: $target,
    replacement: $replacement
  ) {
    ingredient {
      id
      name
      externalId
      menuCalcId
      label
      type
      createdAt
      updatedAt
      brandName
      description
      statement
      gramWeight
      supplier
    }
    quantity
    fraction
    measurement
    gramWeight
    gramWeightPerPortion
    description
    createdAt
    updatedAt
    ordinal
    isKeyIngredient
    isIncluded
  }
}
Variables
{
  "chain": "4",
  "target": SwapEntity,
  "replacement": SwapEntity
}
Response
{
  "data": {
    "swapIngredient": [
      {
        "ingredient": Ingredient,
        "quantity": 123.45,
        "fraction": 123.45,
        "measurement": "xyz789",
        "gramWeight": 987.65,
        "gramWeightPerPortion": 123.45,
        "description": "xyz789",
        "createdAt": "2007-12-03T10:15:30Z",
        "updatedAt": "2007-12-03T10:15:30Z",
        "ordinal": 123,
        "isKeyIngredient": true,
        "isIncluded": true
      }
    ]
  }
}

updateChain

Description

Update a chain.

Response

Returns a Chain

Arguments
Name Description
chain - ID
input - UpdateChain!

Example

Query
mutation updateChain(
  $chain: ID,
  $input: UpdateChain!
) {
  updateChain(
    chain: $chain,
    input: $input
  ) {
    id
    name
    location {
      type
      address
      city
      state
      country
      zip
      latitude
      longitude
    }
    website
  }
}
Variables
{"chain": 4, "input": UpdateChain}
Response
{
  "data": {
    "updateChain": {
      "id": "Mw==",
      "name": "Chain Name",
      "location": Location,
      "website": "www.website.com"
    }
  }
}

updateExternalIngredient

Description

Update an existing ingredient.

Response

Returns an Ingredient

Arguments
Name Description
chain - ID
input - UpdateIngredient!

Example

Query
mutation updateExternalIngredient(
  $chain: ID,
  $input: UpdateIngredient!
) {
  updateExternalIngredient(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    menuCalcId
    label
    type
    createdAt
    updatedAt
    brandName
    description
    statement
    gramWeight
    supplier
  }
}
Variables
{
  "chain": "4",
  "input": UpdateIngredient
}
Response
{
  "data": {
    "updateExternalIngredient": {
      "id": "Mw==",
      "name": "Ketchup",
      "externalId": "11122A",
      "menuCalcId": "11122B",
      "label": "xyz789",
      "type": "MenuCalcBrand",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "brandName": "Brand Name",
      "description": "Lorem ipsum dolor sit amet...",
      "statement": "Lorem ipsum dolor sit amet...",
      "gramWeight": 987.65,
      "supplier": "Supplier Name"
    }
  }
}

updateMenuCategory

Description

Update an existing menu category.

Response

Returns a MenuCategory

Arguments
Name Description
chain - ID
input - UpdateMenuCategory!

Example

Query
mutation updateMenuCategory(
  $chain: ID,
  $input: UpdateMenuCategory!
) {
  updateMenuCategory(
    chain: $chain,
    input: $input
  ) {
    id
    name
    isSubcategory
    ordinal
  }
}
Variables
{"chain": 4, "input": UpdateMenuCategory}
Response
{
  "data": {
    "updateMenuCategory": {
      "id": 4,
      "name": "Breakfast",
      "isSubcategory": false,
      "ordinal": 123
    }
  }
}

updatePrepRecipe

Description

Update a prep recipe.

Response

Returns a PrepRecipe

Arguments
Name Description
chain - ID
input - UpdatePrepRecipe!

Example

Query
mutation updatePrepRecipe(
  $chain: ID,
  $input: UpdatePrepRecipe!
) {
  updatePrepRecipe(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    label
    yield {
      customUOMName
      quantity
    }
    notes
    completedAt
    createdAt
    updatedAt
  }
}
Variables
{"chain": 4, "input": UpdatePrepRecipe}
Response
{
  "data": {
    "updatePrepRecipe": {
      "id": "Mw==",
      "name": "Tacos",
      "externalId": "11122A",
      "label": "Tacos",
      "yield": Yield,
      "notes": "Lorem ipsum dolor sit amet...",
      "completedAt": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

updateRecipe

Description

Update a recipe.

Response

Returns an UpdateRecipeResponse

Arguments
Name Description
chain - ID
input - UpdateRecipe!

Example

Query
mutation updateRecipe(
  $chain: ID,
  $input: UpdateRecipe!
) {
  updateRecipe(
    chain: $chain,
    input: $input
  ) {
    id
    name
    externalId
    notes
    productionDate
    archiveDate
    createdAt
    updatedAt
    label
    state
  }
}
Variables
{"chain": 4, "input": UpdateRecipe}
Response
{
  "data": {
    "updateRecipe": {
      "id": "Mw==",
      "name": "Tacos",
      "externalId": "11122A",
      "notes": "Lorem ipsum dolor sit amet...",
      "productionDate": "2007-12-03T10:15:30Z",
      "archiveDate": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "updatedAt": "2007-12-03T10:15:30Z",
      "label": "xyz789",
      "state": "Archived"
    }
  }
}

Types

AddRecipeIngredient

Fields
Input Field Description
ingredient - ID
prepRecipe - ID
usdaId - ID
quanity - Int!
fraction - Fraction
measurement - Measurement!
Example
{
  "ingredient": "4",
  "prepRecipe": 4,
  "usdaId": "4",
  "quanity": 123,
  "fraction": "Zero",
  "measurement": Measurement
}

AllergenType

Description

Represents supported allergen types.

Values
Enum Value Description

Egg

Fish

Milk

Peanut

Shellfish

Soy

Wheat

Sesame

TreeNut

Celery

Crustaceans

Gluten

Lupin

Molluscs

Mustard

Sulphites

Example
"Egg"

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Brand

Description

Brand is an entity that can own multiple chains.

Fields
Field Name Description
name - String Name of the brand.
location - Location
website - URL
Example
{
  "name": "Chain Name",
  "location": Location,
  "website": "www.website.com"
}

Chain

Description

Represents a chain.

Fields
Field Name Description
id - ID!
name - String Name of the chain.
location - Location
website - URL
Example
{
  "id": "Mw==",
  "name": "Chain Name",
  "location": Location,
  "website": "www.website.com"
}

CreateIngredient

Fields
Input Field Description
content - IngredientContent! Main ingredient contents.
allergens - [AllergenType!] Information about what allergens are present in the ingredient.
quantity - [QuantityContent!]! Information about the portion size quantity.
nutritionFacts - NutritionFacts Information about the ingredient nutritional facts.
Example
{
  "content": IngredientContent,
  "allergens": ["Egg"],
  "quantity": [QuantityContent],
  "nutritionFacts": NutritionFacts
}

CreateMenuCategory

Description

Input field for new menu categories.

Fields
Input Field Description
name - String!
isSubcategory - Boolean
recipes - [ID!]
Example
{
  "name": "abc123",
  "isSubcategory": true,
  "recipes": [4]
}

CreatePrepRecipe

Description

Input field for new prep recipes.

Fields
Input Field Description
name - String!
menuName - String
description - String
externalId - String
category - ID
subcategory - ID
ingredients - [AddRecipeIngredient!]
finalYield - FinalYield
Example
{
  "name": "xyz789",
  "menuName": "xyz789",
  "description": "abc123",
  "externalId": "xyz789",
  "category": "4",
  "subcategory": "4",
  "ingredients": [AddRecipeIngredient],
  "finalYield": FinalYield
}

CreateRecipe

Description

Input field for new recipe.

Fields
Input Field Description
name - String!
menuName - String
description - String
externalId - String
category - ID
subcategory - ID
ingredients - [AddRecipeIngredient!]
Example
{
  "name": "xyz789",
  "menuName": "abc123",
  "description": "abc123",
  "externalId": "xyz789",
  "category": "4",
  "subcategory": "4",
  "ingredients": [AddRecipeIngredient]
}

DateTime

Description

Scalar representing the date time.

Example
"2007-12-03T10:15:30Z"

DeleteResponse

Fields
Field Name Description
message - String!
Example
{"message": "xyz789"}

FinalYield

Fields
Input Field Description
quanity - Int!
fraction - Fraction
measurement - Measurement!
Example
{
  "quanity": 123,
  "fraction": "Zero",
  "measurement": Measurement
}

FinalYieldOptional

Fields
Input Field Description
quanity - Int
fraction - Fraction
measurement - Measurement
Example
{
  "quanity": 987,
  "fraction": "Zero",
  "measurement": Measurement
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

Fraction

Description

Represents supported fractions

Values
Enum Value Description

Zero

OneHalf

OneThird

OneFourth

OneSixth

OneEighth

OneSixteenth

TwoThirds

ThreeFourths

ThreeEighths

FiveEighths

SevenEighths

Example
"Zero"

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Ingredient

Fields
Field Name Description
id - ID!
name - String
externalId - String
menuCalcId - Int Represents the internal usda id mapping in MenuCalc
label - String
type - IngredientType! Represents the type of the ingredient. It can be either a Menu Calc or External ingredient.
createdAt - DateTime!
updatedAt - DateTime!
brandName - String
description - String Represents the internal notes of the ingredient.
statement - String Represents the statement of the ingredient.
gramWeight - Float
supplier - String
Example
{
  "id": "Mw==",
  "name": "Ketchup",
  "externalId": "11122A",
  "menuCalcId": "11122B",
  "label": "abc123",
  "type": "MenuCalcBrand",
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "brandName": "Brand Name",
  "description": "Lorem ipsum dolor sit amet...",
  "statement": "Lorem ipsum dolor sit amet...",
  "gramWeight": 123.45,
  "supplier": "Supplier Name"
}

IngredientContent

Fields
Input Field Description
name - String!
brand - String!
supplier - String!
externalId - String!
smartMenuName - String! Name that will appear on Smart Menu.
statement - String! List the product ingredient statement exactly as displayed on its nutrition label
notes - String!
gramWeight - Float! Refers to the weight of the ingredient in grams.
Example
{
  "name": "xyz789",
  "brand": "abc123",
  "supplier": "xyz789",
  "externalId": "abc123",
  "smartMenuName": "xyz789",
  "statement": "xyz789",
  "notes": "abc123",
  "gramWeight": 987.65
}

IngredientContentOptional

Description

Same as 'IngredientContent' input but with optional values. Used to update externalIngredient fields.

Fields
Input Field Description
name - String
brand - String
supplier - String
externalId - String
smartMenuName - String Name that will appear on Smart Menu.
statement - String List the product ingredient statement exactly as displayed on its nutrition label
notes - String
gramWeight - Float Refers to the weight of the ingredient in grams.
Example
{
  "name": "abc123",
  "brand": "xyz789",
  "supplier": "abc123",
  "externalId": "xyz789",
  "smartMenuName": "xyz789",
  "statement": "abc123",
  "notes": "abc123",
  "gramWeight": 123.45
}

IngredientType

Values
Enum Value Description

MenuCalcBrand

MenuCalcStaple

External

Example
"MenuCalcBrand"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Location

Fields
Field Name Description
type - LocationType!
address - String
city - String
state - String
country - String
zip - String
latitude - Longitude
longitude - Longitude
Example
{
  "type": "HQ",
  "address": "abc123",
  "city": "xyz789",
  "state": "abc123",
  "country": "xyz789",
  "zip": "abc123",
  "latitude": 12.496366,
  "longitude": 12.496366
}

LocationType

Values
Enum Value Description

HQ

Outlet

Brand

Example
"HQ"

Longitude

Example
12.496366

Measurement

Fields
Input Field Description
volume - Volume
weight - Weight
serving - Serving
custom - String
Example
{
  "volume": "Cups",
  "weight": "Grams",
  "serving": "Serving",
  "custom": "abc123"
}

MenuCategory

Description

Represents a restaurant menu.

Fields
Field Name Description
id - ID!
name - String
isSubcategory - Boolean
ordinal - Int!
Example
{
  "id": "4",
  "name": "Breakfast",
  "isSubcategory": false,
  "ordinal": 987
}

Node

Fields
Field Name Description
id - ID!
Example
{"id": "Mw=="}

NutritionFacts

Description

Nutritional facts for an ingredient go here. Fill out the values accordingly.

Fields
Input Field Description
calories - Float
caloriesFromFat - Float
totalFat - Float
saturatedFat - Float
polyunsaturatedFat - Float
monounsaturatedFat - Float
transFat - Float
cholesterol - Float
sodium - Float
totalCarbs - Float
dietaryFiber - Float
sugars - Float
addedSugars - Float
protein - Float
vitaminA - Float
vitaminB6 - Float
vitaminB12 - Float
vitaminC - Float
vitaminD - Float
vitaminE - Float
vitaminK - Float
calcium - Float
iron - Float
potassium - Float
magnesium - Float
zinc - Float
copper - Float
manganese - Float
phosphorus - Float
selenium - Float
riboflavin - Float
niacin - Float
folate - Float
pantothenicAcid - Float
thiamin - Float
Example
{
  "calories": 123.45,
  "caloriesFromFat": 123.45,
  "totalFat": 987.65,
  "saturatedFat": 123.45,
  "polyunsaturatedFat": 987.65,
  "monounsaturatedFat": 123.45,
  "transFat": 123.45,
  "cholesterol": 987.65,
  "sodium": 123.45,
  "totalCarbs": 123.45,
  "dietaryFiber": 123.45,
  "sugars": 123.45,
  "addedSugars": 987.65,
  "protein": 987.65,
  "vitaminA": 987.65,
  "vitaminB6": 123.45,
  "vitaminB12": 123.45,
  "vitaminC": 987.65,
  "vitaminD": 987.65,
  "vitaminE": 987.65,
  "vitaminK": 123.45,
  "calcium": 987.65,
  "iron": 987.65,
  "potassium": 987.65,
  "magnesium": 987.65,
  "zinc": 123.45,
  "copper": 123.45,
  "manganese": 123.45,
  "phosphorus": 987.65,
  "selenium": 987.65,
  "riboflavin": 123.45,
  "niacin": 987.65,
  "folate": 987.65,
  "pantothenicAcid": 123.45,
  "thiamin": 123.45
}

PrepRecipe

Fields
Field Name Description
id - ID!
name - String
externalId - String
label - String
yield - Yield A descriptive unit of measurement to the gram weight for the ingredients.
notes - String Internal notes for the prep recipe.
completedAt - DateTime Timestamp of when the recipes nutritional info was completed.
createdAt - DateTime
updatedAt - DateTime
Example
{
  "id": "Mw==",
  "name": "Tacos",
  "externalId": "11122A",
  "label": "Tacos",
  "yield": Yield,
  "notes": "Lorem ipsum dolor sit amet...",
  "completedAt": "2007-12-03T10:15:30Z",
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z"
}

QuantityContent

Description

List the serving size exactly as displayed on its nutrition label. Weight in grams per serving size is required. You can find this on the nutrition label in the parentheses.

Fields
Input Field Description
quantity - Float!
fraction - Fraction
type - Measurement!
typeWeight - Float! typeWeight refers to the weight of the types unit/volume weight in grams.
Example
{
  "quantity": 123.45,
  "fraction": "Zero",
  "type": Measurement,
  "typeWeight": 123.45
}

QuantityContentOptional

Fields
Input Field Description
quantity - Float
fraction - Fraction
type - Measurement
typeWeight - Float typeWeight refers to the weight of the types unit/volume weight in grams.
Example
{
  "quantity": 123.45,
  "fraction": "Zero",
  "type": Measurement,
  "typeWeight": 987.65
}

Recipe

Description

Represents a restaurant recipe.

Fields
Field Name Description
id - ID!
name - String
externalId - String
notes - String Internal notes for the recipe.
productionDate - DateTime Timestamp of when the recipes nutritional info was completed.
archiveDate - DateTime Timestamp of when the recipe was archived.
createdAt - DateTime
updatedAt - DateTime
label - String The recipe name that diners will se on Smart Menu.
smartMenuEnabled - Boolean Flag that indicates whether the recipe is added to Smart Menu or not.
state - RecipeState!
category - MenuCategory
subcategory - MenuCategory
ordinal - Int Sorted position inside a category.
servingGramWeight - Float! Gram weight that one serving contains.
Example
{
  "id": "Mw==",
  "name": "Tacos",
  "externalId": "11122A",
  "notes": "Lorem ipsum dolor sit amet...",
  "productionDate": "2007-12-03T10:15:30Z",
  "archiveDate": "2007-12-03T10:15:30Z",
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "label": "xyz789",
  "smartMenuEnabled": false,
  "state": "Archived",
  "category": MenuCategory,
  "subcategory": MenuCategory,
  "ordinal": 987,
  "servingGramWeight": 123.45
}

RecipeIngredient

Fields
Field Name Description
ingredient - Ingredient!
quantity - Float!
fraction - Float!
measurement - String!
gramWeight - Float! Indicates the ingredients total gram weight in the recipe.
gramWeightPerPortion - Float! Indicates the ingredients gram weight in a single portion of the recipe.
description - String
createdAt - DateTime
updatedAt - DateTime
ordinal - Int!
isKeyIngredient - Boolean! Indicates whether the ingredient is locked on widgets.
isIncluded - Boolean! Indicates whether the ingredient is included in the recipe by default.
Example
{
  "ingredient": Ingredient,
  "quantity": 123.45,
  "fraction": 123.45,
  "measurement": "abc123",
  "gramWeight": 987.65,
  "gramWeightPerPortion": 123.45,
  "description": "abc123",
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "ordinal": 987,
  "isKeyIngredient": true,
  "isIncluded": false
}

RecipeState

Values
Enum Value Description

Archived

Production

Development

Example
"Archived"

Serving

Description

Represents supported serving types.

Values
Enum Value Description

Serving

Clove

Fillet

Shell

Batch

Container

Piece

Tray

Bar

Dash

Each

Can

Bottle

Scoop

Bag

Slice

Example
"Serving"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

SwapEntity

Fields
Input Field Description
ingredientId - ID
prepRecipeId - ID
usdaId - ID
Example
{
  "ingredientId": 4,
  "prepRecipeId": 4,
  "usdaId": "4"
}

URL

Description

Scalar representing an FDA rounded value, can either be a String or a Float.

Example
"http://www.test.com/"

UpdateChain

Fields
Input Field Description
name - String
location - UpdateLocation
website - URL
Example
{
  "name": "abc123",
  "location": UpdateLocation,
  "website": "http://www.test.com/"
}

UpdateIngredient

Fields
Input Field Description
id - ID!
content - IngredientContentOptional
allergens - [AllergenType!]
quantity - [QuantityContentOptional!]
nutritionFacts - NutritionFacts
Example
{
  "id": 4,
  "content": IngredientContentOptional,
  "allergens": ["Egg"],
  "quantity": [QuantityContentOptional],
  "nutritionFacts": NutritionFacts
}

UpdateLocation

Fields
Input Field Description
address - String
city - String
state - String
zip - String
Example
{
  "address": "xyz789",
  "city": "xyz789",
  "state": "abc123",
  "zip": "abc123"
}

UpdateMenuCategory

Description

Input field for new menu categories.

Fields
Input Field Description
id - ID!
name - String
isSubcategory - Boolean
addRecipes - [ID!]
removeRecipes - [ID!]
Example
{
  "id": 4,
  "name": "xyz789",
  "isSubcategory": true,
  "addRecipes": ["4"],
  "removeRecipes": [4]
}

UpdatePrepRecipe

Fields
Input Field Description
id - ID!
name - String
menuName - String
description - String
externalId - String
category - ID
subcategory - ID
addIngredients - [AddRecipeIngredient!]
updateIngredients - [UpdateRecipeIngredient!]
finalYield - FinalYieldOptional
Example
{
  "id": 4,
  "name": "xyz789",
  "menuName": "xyz789",
  "description": "xyz789",
  "externalId": "xyz789",
  "category": 4,
  "subcategory": 4,
  "addIngredients": [AddRecipeIngredient],
  "updateIngredients": [UpdateRecipeIngredient],
  "finalYield": FinalYieldOptional
}

UpdateRecipe

Fields
Input Field Description
id - ID!
name - String
menuName - String
description - String
externalId - String
category - ID
subcategory - ID
addIngredients - [AddRecipeIngredient!]
updateIngredients - [UpdateRecipeIngredient!]
updateNutrients - UpdateRecipeNutrients
Example
{
  "id": "4",
  "name": "xyz789",
  "menuName": "abc123",
  "description": "abc123",
  "externalId": "abc123",
  "category": "4",
  "subcategory": "4",
  "addIngredients": [AddRecipeIngredient],
  "updateIngredients": [UpdateRecipeIngredient],
  "updateNutrients": UpdateRecipeNutrients
}

UpdateRecipeIngredient

Fields
Input Field Description
ingredient - ID!
quanity - Int
fraction - Fraction
measurement - Measurement
remove - Boolean
Example
{
  "ingredient": 4,
  "quanity": 123,
  "fraction": "Zero",
  "measurement": Measurement,
  "remove": true
}

UpdateRecipeNutrients

Fields
Input Field Description
enable - [ID!]
disable - [ID!]
Example
{"enable": [4], "disable": ["4"]}

UpdateRecipeResponse

Description

Represents the payload when updating a recipe.

Fields
Field Name Description
id - ID!
name - String
externalId - String
notes - String Internal notes for the recipe.
productionDate - DateTime Timestamp of when the recipes nutritional info was completed.
archiveDate - DateTime Timestamp of when the recipe was archived.
createdAt - DateTime
updatedAt - DateTime
label - String The recipe name that diners will se on Smart Menu.
state - RecipeState!
Example
{
  "id": "Mw==",
  "name": "Tacos",
  "externalId": "11122A",
  "notes": "Lorem ipsum dolor sit amet...",
  "productionDate": "2007-12-03T10:15:30Z",
  "archiveDate": "2007-12-03T10:15:30Z",
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "label": "abc123",
  "state": "Archived"
}

Volume

Description

Represents supported volume types.

Values
Enum Value Description

Cups

FluidOunces

Gallons

Liters

Milliliters

Pints

Quarts

Tablespoons

Teaspoons

Example
"Cups"

Weight

Description

Represents supported weight types.

Values
Enum Value Description

Grams

Kilograms

Ounces

Pounds

Example
"Grams"

Yield

Fields
Field Name Description
customUOMName - String!
quantity - Float
Example
{
  "customUOMName": "abc123",
  "quantity": 987.65
}