# List all menu items

Retrieve a collection of menu items with optional filtering and pagination.

Endpoint: GET /menu
Version: 1.1.0

## Query parameters:

  - `after` (string)
    Cursor of the next page.
`page.nextPage` contains it as the `after` query parameter, so you can also request `page.nextPage` directly.
The cursor is opaque, and its internal structure is subject to change.

  - `before` (string)
    Cursor of the previous page.
`page.previousPage` contains it as the `before` query parameter, so you can also request `page.previousPage` directly.
The cursor is opaque, and its internal structure is subject to change.

  - `sort` (string)
    Sorts the collection by a single field. Prefix with `-` for descending order
(for example, `-price`); omit the prefix for ascending order (`price`).

**Sortable fields:** `name`, `price`, `createdAt`, `updatedAt`, `id`

  - `filter` (string)
    Filters the collection items using space-separated `field:value` pairs.

**Filterable fields:** `name`, `category`, `price`, `createdAt`, `id`

**Format:** `field1:value1 field2:value2`

**Supported operators:**
- `field:value` - Exact match
- `field:value1,value2` - Match any of the comma-separated values (OR)
- Time ranges (on `createdAt`): Use `30d` (30 days), `7d` (7 days), `1h` (1 hour), etc.

**Examples:**
- `category:beverage` - Filter by a single category.
- `category:beverage,dessert` - Filter by multiple categories.
- `createdAt:7d` - Menu items created in the last 7 days.
- `name:Latte` - Filter by name.
- `category:beverage price:400` - Combine multiple filters.

  - `search` (string)
    Performs a case-insensitive text search across the searchable fields, returning
items where any of them contain the search term as a substring.

**Searchable fields:** `name`, `photoTextDescription`

  - `limit` (integer)
    Specify the number of results per page.
If there is more data, use in combination with `after` to page through all results.

## Response 200:

  - `200` (unknown)
    Successful operation.

## Response 200 fields (application/json):

  - `object` (string, required)
    Entity name.
    Enum: "list"

  - `page` (object, required)

  - `page.nextPage` (string | null, required)
    Path of the next page, relative to the API server URL.
Append the value to the server URL to get the next page.
The path keeps the query parameters of the request and sets `after` to the cursor of the next page.
When `null`, there is no next page.

  - `page.previousPage` (string | null, required)
    Path of the previous page, relative to the API server URL.
Append the value to the server URL to get the previous page.
The path keeps the query parameters of the request and sets `before` to the cursor of the previous page.
When `null`, there is no previous page.

  - `page.limit` (integer, required)
    Value showing how many items are in the page limit.

  - `items` (array, required)

  - `items.category` (string, required)
    Menu item category.
    Enum: "beverage", "dessert"

  - `items.volume` (number, required)
    Size of the beverage in milliliters.

  - `items.containsCaffeine` (boolean, required)
    Indicates if the beverage contains caffeine.

  - `items.createdAt` (string, required)
    Created date.

  - `items.updatedAt` (string, required)
    Updated date.

  - `items.id` (string, required)
    Menu item ID. Unique identifier prefixed with `prd_`.
    Example: prd_01h1s5z6vf2mm1mz3hevnn9va7

  - `items.object` (string, required)
    Entity name.
    Enum: "menuItem"

  - `items.name` (string, required)
    Menu item name.

  - `items.price` (integer, required)
    Price in cents.

  - `items.photoUrl` (string)
    Photo URL of the menu item.

  - `items.photoTextDescription` (string | null)

  - `items.calories` (number, required)
    Amount of calories.

## Response 400:

  - `400` (unknown)
    Bad request - invalid input parameters.

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

  - `details` (object)
    Additional error details.

## Response 500:

  - `500` (unknown)
    Internal server error.

## Response 500 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

  - `details` (object)
    Additional error details.

## Response 400 examples:

  - `Request body failed validation` (unknown)

## Response 500 examples:

  - `Unexpected server error` (unknown)

