Menu¶
A Menu is a restaurant's menu, such as Dinner or Drinks. Its MenuSections and
dishes (MenuItems) point to it (partOfMenu), and it lists them in hasMenuSection and hasMenuItem,
computed. A restaurant (a Place of a FoodEstablishment kind) lists its menus in hasMenu. When it is served
(availabilityStarts, availabilityEnds, openingHoursSpecification) is ObjectsGrid's, beyond Schema.org, and left
out of its JSON-LD document. See Restaurants and menus.
Modeled on schema.org/Menu · JSON Schema · ABAC object type Menu
Example¶
Create one with POST /menus:
Fields¶
Required: name.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Menu |
JSON-LD @type, the object's type name. |
|
at_id |
URL | The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid. |
|
id |
string | The object's id. Assigned by ObjectsGrid when the object is created. | |
identifier |
string | The object's id, as Schema.org identifier. Assigned by ObjectsGrid. |
|
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
name |
list of LanguageTaggedString | Yes | The Menu name. See schema.org/name. |
description |
list of LanguageTaggedString | The Menu description. See schema.org/description. | |
image |
URL | An image URL | |
inLanguage |
string | The language it is written in, BCP 47 | |
availabilityStarts |
date-time | From when it is served. ObjectsGrid's, beyond Schema.org: Schema.org's Menu has no dates; left out of JSON-LD documents. | |
availabilityEnds |
date-time | Until when it is served. ObjectsGrid's, beyond Schema.org: Schema.org's Menu has no dates; left out of JSON-LD documents. | |
openingHoursSpecification |
list of OpeningHoursSpecification | When in the week it is served, e.g. evenings only. ObjectsGrid's, beyond Schema.org: Schema.org's Menu has no hours; left out of JSON-LD documents. | |
hasMenuSection |
computed: list of MenuSection | Its sections. Computed, read-only: the objects whose MenuSection.partOfMenu points to this object, listed from that type; never stored or written. | |
hasMenuItem |
computed: list of MenuItem | Its dishes outside any section. Computed, read-only: the objects whose MenuItem.partOfMenu points to this object, listed from that type; never stored or written. | |
tags |
list of Tag | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
|
meta |
ObjectMeta | Read-only metadata: version, type, creation and last update. |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Create | POST /menus |
| List and search | GET /menus |
| Create up to 100 at once | POST /menus/batch |
| Retrieve | GET /menus/{id} |
| Retrieve as a JSON-LD document for your pages | GET /menus/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /menus/{id} |
| Update some fields | PATCH /menus/{id} |
| Delete | DELETE /menus/{id} |
The OpenAPI contract, with every parameter and response: Menus (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | menu(id: ID!, version: String): Menu |
| Query | menus(where: MenuWhereInput, orderBy: [MenuOrderByInput!], first: Int, after: String): MenuConnection! |
| Query | menusGroupBy(by: [MenuGroupByField!]!, where: MenuWhereInput, having: MenuHavingInput, orderBy: [MenuGroupByOrderByInput!], first: Int, after: String): MenuGroupByConnection! |
| Mutation | createMenu(input: CreateMenuInput!): Menu! |
| Mutation | updateMenu(input: UpdateMenuInput!, expectedVersion: String): Menu! |
| Mutation | deleteMenu(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a Menu changes:
MenuCreated, MenuUpdated, MenuPatched, MenuDeleted.