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

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.

beforestring

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.

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

Examples:
Newest first
sort=-createdAt
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.
Examples:
Created in the last 7 days
filter=createdAt:7d
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

Examples:
Search term
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
Examples:
Default page size
limit=10
curl -i -X GET \
  'https://cafe.redocly.com/_mock/openapi/cafe/menu?after=string&before=string&sort=-createdAt&filter=createdAt%3A7d&search=Latte&limit=10'

Responses

Successful operation.

Bodyapplication/json
objectstringrequired

Entity name.

Value:"list"
pageobject(Page)required
itemsArray of objects(MenuItem)required
Response
{ "object": "list", "page": { "nextPage": "/menu?limit=10&after=G0EAAIyUqm8V", "previousPage": "/menu?limit=10&before=G0EAAIyUqm8W", "limit": 10 }, "items": [ { … } ] }