GET /menus
Gets current active menus that do not have an end date or the end date is greater than or equal to today Requires OAuth scope
menus/standard.read
POST /menus/dishes
Adds or updates a dish on a menu Requires OAuth scope
menus/dishes/standard.write
.
If you try to access a menus endpoint that your API Key or Access Token does not entitle you to access, you will receive a 403 - Forbidden
response.
To make a valid request, you will need to supply ALL of the following parameters on the querystring of the endpoint URL:
Parameter name | Data type | Permitted values |
---|---|---|
HgemClientId |
Integer | Must be a value greater than zero |
Optional parameters:
Parameter name | Data type | Permitted values | |
---|---|---|---|
after |
String | Must be a page token from a previous request |
curl -X GET https://results-api.hgem.com/menus?hgemclientid=123456
-H "hgem-api-key: YOUR-API-KEY-GOES-HERE"
-H "Authorization: Bearer Some_really_long_base64_encoded_text_that_makes_up_your_JWT_access_token"
Below is an example request made by Postman
GET /menus?hgemclientid=123456 HTTP/1.1
Host: results-api.hgem.com
hgem-api-key: YOUR-API-KEY-GOES-HERE
Authorization: Bearer Some_really_long_base64_encoded_text_that_makes_up_your_JWT_access_token
User-Agent: PostmanRuntime/7.13.0
Accept: */*
Cache-Control: no-cache
Postman-Token: e7fd3f29-dad4-4e82-8af8-dca71a93925e,2a369656-b09b-4212-9799-68f2fa4459af
accept-encoding: gzip, deflate
Connection: keep-alive
cache-control: no-cache
HTTP Response Status | Description |
---|---|
200 - OK |
Success - response body will contain your data |
400 - Bad Request |
You have made a malformed request that cannot be processed (with the same parameters), even if you were to retry |
401 - Unauthorized |
You have either failed to provide an API Key, an access token, or requested an endpoint you are not entitled to use |
403 - Forbidden |
You have requested results data you are not entitle to access. Change your query |
429 - Too Many Requests |
You have breached our API rate limits, try again later |
500 - Internal Server Error |
The API request has resulted in an error which we have not been able to provide further information for. |
503 - Service Unavilable |
The API is currently unavailable, try again later |
See here for further information on HTTP response codes.
When you make a successful request on the /menus endpoint, the response will be as per the example below:
Please review the Data Dictionary page for information on interpreting the data returned from your requests.
Content-Type
: application/graphql-response+json
{
"data": {
"queryForMenu": {
"nodes": [
{
"id": 1,
"menuName": "Example name",
"menuCode": "EX235",
"startDate": "2025-01-05T00:00:00.000Z",
"endDate": null
}
],
"pageInfo": {
"hasNextPage": false,
"endCursor": "XY=="
}
}
}
}
The content type of this request needs to be multipart/form-data, To make a valid request you will need the following:
Query String parameters
Parameter name | Data type | Permitted values |
---|---|---|
HgemClientId |
Integer | Must be a value greater than zero |
Form values
Parameter name | Data type | Info / Permitted |
---|---|---|
- | File | Must be an image file |
json | JSON | Dish JSON parameters |
Dish JSON parameters | Parameter name | Data type | Required | Info / Permitted values | | --------------------- |-------------------------- | -------- | --------------------------------------------- | | menuId | Integer | Y | HGEM Identifier of a menu, you can get this from the GET /menus endpoint response | | code | String | Y| Unique identifier for dish, max length is 50 characters | | description | String | Y | Max length is 250 characters | | type | String | Y | Max length is 50 characters | | order | Integer | - | Display order dish is displayed on a menu | | expiryDate | ISO date | - | Date the dish expires |
curl --location 'https://results-api.hgem.com/menus/dishes?HgemClientId=123456' \
--header 'hgem-api-key: YOUR-API-KEY-GOES-HERE' \
-H "Authorization: Bearer Some_really_long_base64_encoded_text_that_makes_up_your_JWT_access_token" \
--form '=@"/C:/Some/Image/File/For/The/Dish/Image.png"' \
--form 'json="{
\"menuId\": 1,
\"code\": \"example_dish_code\",
\"description\": \"example_dish_description\",
\"type\": \"example_dish_type\",
\"order\": 1,
\"expiryDate\": \"2025-04-16\"
}"'
Below is an example request made by Postman
POST /menus/dishes?HgemClientId=171667 HTTP/1.1
Host: results-api.hgem.com
hgem-api-key: YOUR-API-KEY-GOES-HERE
Authorization: Bearer Some_really_long_base64_encoded_text_that_makes_up_your_JWT_access_token
Content-Length: 465
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary1AB2CDefGhIj3kL
------WebKitFormBoundary1AB2CDefGhIj3kL
Content-Disposition: form-data; name=""; filename="/C:/Some/Image/File/For/The/Dish/Image.png"
Content-Type: <Content-Type header here>
(data)
------WebKitFormBoundary1AB2CDefGhIj3kL
Content-Disposition: form-data; name="json"
{
"menuId": 1,
"code": "example_dish_code",
"description": "example_dish_description",
"type": "example_dish_type",
"order": 1,
"expiryDate": "2025-04-16"
}
------WebKitFormBoundary1AB2CDefGhIj3kL--
HTTP Response Status | Description |
---|---|
200 - OK |
Success - response body will contain your data |
400 - Bad Request |
You have made a malformed request that cannot be processed (with the same parameters), even if you were to retry |
401 - Unauthorized |
You have either failed to provide an API Key, an access token, or requested an endpoint you are not entitled to use |
403 - Forbidden |
You have requested results data you are not entitle to access. Change your query |
429 - Too Many Requests |
You have breached our API rate limits, try again later |
500 - Internal Server Error |
The API request has resulted in an error which we have not been able to provide further information for. |
503 - Service Unavilable |
The API is currently unavailable, try again later |
See here for further information on HTTP response codes.
When you make a successful request on the /menus/dishes endpoint, the response will be as per the example below:
Please review the Data Dictionary page for information on interpreting the data returned from your requests.
Content-Type
: application/graphql-response+json
{
"data": {
"upsertDishToMenu": {
"menuId": 1,
"dishCode": "example_dish_code",
"dishDescription": "example_dish_description",
"dishType": "example_dish_type",
"dishOrder": 1,
"dishExpiryDate": "2025-04-15T23:00:00.000Z",
"updatedDishImage": true
}
}
}
Please review the Rate Limiting page for information on request rate limits that HGEM impose.