Skip to content

Products

Operations related to products.

List all menu items

Request

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

Query
afterstring

Use the endCursor as a value for the after parameter to get the next page.

beforestring

Use the startCursor as a value for the before parameter to get the previous page.

sortstring

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

Example:sort=-price
filterstring

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.
Example:filter=category:beverage
searchstring

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

Example:search=Latte
limitinteger, [ 1 .. 100 ]

Specify the number of results per page. If there is more data, use in combination with after to page through all results.

Default:10
Example:limit=10
curl -i -X GET \
  'https://cafe.redocly.com/_mock/openapi/cafe/menu?after=string&before=string&sort=string&filter=string&search=string&limit=10'

Responses

Successful operation.

Bodyapplication/json
objectstringrequired

Entity name.

Value:"list"
pageobject(Page)required
itemsArray of objects(MenuItem)required
Response
{ "object": "list", "page": { "endCursor": "string", "startCursor": "string", "hasNextPage": true, "hasPrevPage": true, "limit": 10, "total": 0 }, "items": [ {} ] }