# Galley

> Manage Galley recipes, ingredients, menus and vendors, and tag them with your categories.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/galley

## Actions

### Archive recipes

Archive recipes, hiding them from lists without deleting them.

**Inputs**

- Recipes (`recipe_ids`, list, required): The recipes' Galley IDs.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "recipes": [
      {
        "archivedAt": "example",
        "id": "example"
      }
    ]
  }
}
```

### Create ingredient

Create an ingredient.

**Inputs**

- Name (`name`, text, required): The ingredient's name.
- Description (`description`, text): Description.
- Label name (`external_name`, text): The name shown on labels.
- External ID (`external_id`, text): An outside system's ID for it.
- Non-food (`is_non_food`, true/false): Whether it's a supply (packaging, cleaning) rather than food.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalId": "example",
    "externalName": "example",
    "id": "example",
    "isNonFood": true,
    "name": "example",
    "updatedAt": "example"
  }
}
```

### Create menu

Create a menu for a location. Add its recipes in Galley.

**Inputs**

- Name (`name`, text, required): The menu's name.
- Location (`location_id`, text, required): The location the menu is for.
- Date (`date`, date): The day the menu is served.
- Notes (`notes`, text): Notes.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "date": "example",
    "id": "example",
    "location": {
      "id": "example",
      "name": "example"
    },
    "name": "example",
    "notes": "example"
  }
}
```

### Create recipe

Create a recipe. Add its ingredients and steps in Galley.

**Inputs**

- Name (`name`, text, required): The recipe's name.
- Total yield (`total_yield`, number, required): How much one batch makes, in the yield unit. At least 0.
- Yield unit (`yield_unit`, text): The unit the yield is in, such as `each`, `g` or `serving`. Default: `each`.
- Description (`description`, text): Description.
- Menu name (`external_name`, text): The name guests see.
- Notes (`notes`, text): Notes.
- Sellable (`is_dish`, true/false): Sellable (on) or a component of other recipes (off).
- Shelf life (days) (`shelf_life_days`, number): How many days it keeps. At least 0.
- Short code (`short_code`, text): A short code for labels and reports.
- Price (`price`, number): The selling price, such as 12.50. At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalName": "example",
    "id": "example",
    "isDish": true,
    "name": "example",
    "notes": "example",
    "priceCents": 1,
    "shelfLifeDays": 1,
    "shortCode": "example",
    "totalYield": 1,
    "updatedAt": "example",
    "yieldUnit": {
      "id": "example",
      "name": "example"
    }
  }
}
```

### Create vendor

Create a vendor.

**Inputs**

- Name (`name`, text, required): The vendor's name.
- Email (`email`, text): Ordering email.
- Phone (`phone_number`, text): Phone number.
- Website (`website`, text): Website.
- Street address (`street_address`, text): Street address.
- City (`city`, text): City.
- State (`state`, text): State.
- ZIP code (`zip_code`, text): ZIP code.
- External ID (`external_id`, text): An outside system's ID for it.
- Notes (`notes`, text): Notes.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "city": "example",
    "email": "example",
    "externalId": "example",
    "id": "example",
    "name": "example",
    "notes": "example",
    "phoneNumber": "example",
    "state": "example",
    "streetAddress": "example",
    "website": "example",
    "zipCode": "example"
  }
}
```

### Delete ingredient

Delete an ingredient that no recipe uses.

**Inputs**

- Ingredient (`ingredient_id`, text, required): The ingredient's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete menu

Delete a menu.

**Inputs**

- Menu (`menu_id`, text, required): The menu's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete recipe

Delete a recipe that no other recipe or menu uses.

**Inputs**

- Recipe (`recipe_id`, text, required): The recipe's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete vendor

Delete a vendor.

**Inputs**

- Vendor (`vendor_id`, text, required): The vendor's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Get ingredient

Get one ingredient.

**Inputs**

- Ingredient (`ingredient_id`, text, required): The ingredient's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalId": "example",
    "externalName": "example",
    "id": "example",
    "isNonFood": true,
    "name": "example",
    "updatedAt": "example"
  }
}
```

### Get menu

Get one menu and the recipes on it.

**Inputs**

- Menu (`menu_id`, text, required): The menu's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "date": "example",
    "id": "example",
    "location": {
      "id": "example",
      "name": "example"
    },
    "menuItems": [
      {
        "recipe": {
          "id": "example",
          "name": "example"
        },
        "unit": {
          "id": "example",
          "name": "example"
        },
        "volume": 1
      }
    ],
    "name": "example",
    "notes": "example"
  }
}
```

### Get recipe

Get one recipe with its instructions and ingredients.

**Inputs**

- Recipe (`recipe_id`, text, required): The recipe's Galley ID.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "allIngredientsWithUsages": [
      {
        "ingredient": {
          "id": "example",
          "name": "example"
        },
        "totalQuantity": 1,
        "unit": {
          "id": "example",
          "name": "example"
        }
      }
    ],
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalName": "example",
    "id": "example",
    "instructions": "example",
    "isDish": true,
    "name": "example",
    "notes": "example",
    "priceCents": 1,
    "shelfLifeDays": 1,
    "shortCode": "example",
    "totalYield": 1,
    "updatedAt": "example",
    "yieldUnit": {
      "id": "example",
      "name": "example"
    }
  }
}
```

### List ingredients

List ingredients, 25 at a time.

**Inputs**

- Name (`name`, text): Only ingredients whose name matches.
- Archived (`archived`, true/false): Archived ingredients (on) or current ones (off).
- Sort by (`order_by`, text): What to sort by. One of: `name`, `updatedAt`.
- Direction (`sort_direction`, text): Newest or last first (desc, the default) or oldest first (asc). One of: `desc`, `asc`.
- How many (`limit`, number): How many records to return, at most 25 (Galley's page size). From 1 to 25.
- Skip (`start_index`, number): How many records to skip, to read the next page (0 for the first). At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "ingredients": [
      {
        "archivedAt": "example",
        "categoryValues": [
          {
            "id": "example",
            "name": "example"
          }
        ],
        "createdAt": "example",
        "description": "example",
        "externalId": "example",
        "externalName": "example",
        "id": "example",
        "isNonFood": true,
        "name": "example",
        "updatedAt": "example"
      }
    ],
    "pageInfo": {
      "endIndex": 1,
      "hasNextPage": true,
      "startIndex": 1
    },
    "totalCount": 1
  }
}
```

### List locations

List the company's locations (kitchens and sites).

**Inputs**: None.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "locations": [
      {
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### List menus

List menus, 25 at a time.

**Inputs**

- Name (`name`, text): Only menus whose name matches.
- Sort by (`order_by`, text): What to sort by. One of: `createdAt`, `updatedAt`.
- Direction (`sort_direction`, text): Newest or last first (desc, the default) or oldest first (asc). One of: `desc`, `asc`.
- How many (`limit`, number): How many records to return, at most 25 (Galley's page size). From 1 to 25.
- Skip (`start_index`, number): How many records to skip, to read the next page (0 for the first). At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "menus": [
      {
        "createdAt": "example",
        "date": "example",
        "id": "example",
        "location": {
          "id": "example",
          "name": "example"
        },
        "name": "example",
        "notes": "example"
      }
    ],
    "pageInfo": {
      "endIndex": 1,
      "hasNextPage": true,
      "startIndex": 1
    },
    "totalCount": 1
  }
}
```

### List recipes

List recipes with their yield, price and tags, 25 at a time.

**Inputs**

- Name (`name`, text): Only recipes whose name matches.
- Archived (`archived`, true/false): Archived recipes (on) or current ones (off).
- Sort by (`order_by`, text): What to sort by. One of: `name`, `createdAt`, `updatedAt`.
- Direction (`sort_direction`, text): Newest or last first (desc, the default) or oldest first (asc). One of: `desc`, `asc`.
- How many (`limit`, number): How many records to return, at most 25 (Galley's page size). From 1 to 25.
- Skip (`start_index`, number): How many records to skip, to read the next page (0 for the first). At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "endIndex": 1,
      "hasNextPage": true,
      "startIndex": 1
    },
    "recipes": [
      {
        "archivedAt": "example",
        "categoryValues": [
          {
            "id": "example",
            "name": "example"
          }
        ],
        "createdAt": "example",
        "description": "example",
        "externalName": "example",
        "id": "example",
        "isDish": true,
        "name": "example",
        "notes": "example",
        "priceCents": 1,
        "shelfLifeDays": 1,
        "shortCode": "example",
        "totalYield": 1,
        "updatedAt": "example",
        "yieldUnit": {
          "id": "example",
          "name": "example"
        }
      }
    ],
    "totalCount": 1
  }
}
```

### List tags

List the tag categories and their values (Galley's categories), optionally for one kind of record.

**Inputs**

- Record kind (`item_type`, text): Only categories for this kind of record. One of: `recipe`, `ingredient`, `menu`, `menuItem`, `vendorItem`, `vendor`.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "categories": [
      {
        "categoryValues": [
          {
            "id": "example",
            "name": "example"
          }
        ],
        "id": "example",
        "itemType": "example",
        "name": "example"
      }
    ]
  }
}
```

### List vendor items

List the items vendors sell, with SKU and cost, 25 at a time.

**Inputs**

- Vendor (`vendor_id`, text): Only this vendor's items.
- How many (`limit`, number): How many records to return, at most 25 (Galley's page size). From 1 to 25.
- Skip (`start_index`, number): How many records to skip, to read the next page (0 for the first). At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "endIndex": 1,
      "hasNextPage": true,
      "startIndex": 1
    },
    "totalCount": 1,
    "vendorItems": [
      {
        "costCents": 1,
        "createdAt": "example",
        "externalId": "example",
        "id": "example",
        "name": "example",
        "sku": "example",
        "updatedAt": "example",
        "vendor": {
          "id": "example",
          "name": "example"
        }
      }
    ]
  }
}
```

### List vendors

List vendors, 25 at a time.

**Inputs**

- How many (`limit`, number): How many records to return, at most 25 (Galley's page size). From 1 to 25.
- Skip (`start_index`, number): How many records to skip, to read the next page (0 for the first). At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "endIndex": 1,
      "hasNextPage": true,
      "startIndex": 1
    },
    "totalCount": 1,
    "vendors": [
      {
        "city": "example",
        "email": "example",
        "externalId": "example",
        "id": "example",
        "name": "example",
        "notes": "example",
        "phoneNumber": "example",
        "state": "example",
        "streetAddress": "example",
        "website": "example",
        "zipCode": "example"
      }
    ]
  }
}
```

### Tag records

Add tags (category values) to recipes, ingredients, menus or other records.

**Inputs**

- Record kind (`item_type`, text, required): The kind of records to tag. One of: `recipe`, `ingredient`, `menu`, `menuItem`, `vendorItem`, `vendor`.
- Records (`item_ids`, list, required): The records' Galley IDs.
- Tags (`tag_ids`, list, required): The tags (category value IDs) to add, from 'List tags'.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "categoryValueItems": [
      {
        "categoryValue": {
          "id": "example",
          "name": "example"
        },
        "itemId": "example",
        "itemType": "example"
      }
    ]
  }
}
```

### Update ingredient

Change an ingredient. Only the fields given change.

**Inputs**

- Ingredient (`ingredient_id`, text, required): The ingredient's Galley ID.
- Name (`name`, text): The ingredient's name.
- Description (`description`, text): Description.
- Label name (`external_name`, text): The name shown on labels.
- External ID (`external_id`, text): An outside system's ID for it.
- Non-food (`is_non_food`, true/false): Whether it's a supply (packaging, cleaning) rather than food.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalId": "example",
    "externalName": "example",
    "id": "example",
    "isNonFood": true,
    "name": "example",
    "updatedAt": "example"
  }
}
```

### Update recipe

Change a recipe's name, yield, price, shelf life or notes. Only the fields given change.

**Inputs**

- Recipe (`recipe_id`, text, required): The recipe's Galley ID.
- Name (`name`, text): The recipe's name.
- Total yield (`total_yield`, number): How much one batch makes, in the yield unit. At least 0.
- Yield unit (`yield_unit`, text): The unit the yield is in, such as `each`, `g` or `serving`.
- Description (`description`, text): Description.
- Menu name (`external_name`, text): The name guests see.
- Notes (`notes`, text): Notes.
- Sellable (`is_dish`, true/false): Sellable (on) or a component of other recipes (off).
- Shelf life (days) (`shelf_life_days`, number): How many days it keeps. At least 0.
- Short code (`short_code`, text): A short code for labels and reports.
- Price (`price`, number): The selling price, such as 12.50. At least 0.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "archivedAt": "example",
    "categoryValues": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "createdAt": "example",
    "description": "example",
    "externalName": "example",
    "id": "example",
    "isDish": true,
    "name": "example",
    "notes": "example",
    "priceCents": 1,
    "shelfLifeDays": 1,
    "shortCode": "example",
    "totalYield": 1,
    "updatedAt": "example",
    "yieldUnit": {
      "id": "example",
      "name": "example"
    }
  }
}
```

### Update vendor

Change a vendor's contact details. Only the fields given change.

**Inputs**

- Vendor (`vendor_id`, text, required): The vendor's Galley ID.
- Name (`name`, text): The vendor's name.
- Email (`email`, text): Ordering email.
- Phone (`phone_number`, text): Phone number.
- Website (`website`, text): Website.
- Street address (`street_address`, text): Street address.
- City (`city`, text): City.
- State (`state`, text): State.
- ZIP code (`zip_code`, text): ZIP code.
- External ID (`external_id`, text): An outside system's ID for it.
- Notes (`notes`, text): Notes.

**Outputs**

- `data` (object): The response from Galley.

**Example output**

```json
{
  "data": {
    "city": "example",
    "email": "example",
    "externalId": "example",
    "id": "example",
    "name": "example",
    "notes": "example",
    "phoneNumber": "example",
    "state": "example",
    "streetAddress": "example",
    "website": "example",
    "zipCode": "example"
  }
}
```
