Empowering Restaurants through Integration

Follow

Get Menu Status Info by Location

Returns a list of merchants associated with a given access token. Without the optional parameters outlined below, the endpoint will return all merchants associated with your unique access token along with all of their respective locations, menu data and menu ingestion data where applicable.

Request Endpoint

GET /api/v15/merchant_management/merchants

Authorization

An access token is required for this request. Contact your partner Solutions or Operations Engineer to get one:
Authorization: token YOUR-ACCESS-TOKEN

Request Parameters

Name Type Description
provider_merchant_ids Object
Comma separated list of Provider Merchant IDs. Optional.
expand_locations Boolean
When set to true, the returned locations additionally include the menu state and state_reason_message along with a link to the menu on Marketplace and menu ingestion data if they exist. Default is true. Optional.
page Integer
The page of results to request. Index starts at one. Maximum number of locations returned is 50. Optional.

Example Response Body

{
"name": "Grubhub Cafe",
"provider_merchant_id": "abc123",
"locations": [
{
"name": "Siam Bistro Pearl St.",
"provider_location_id": "1",
"menu": {
"state": "exported",
"state_reason_message": null
},
"link_to_menu_on_marketplace": "https://pp.grubhub.com/restaurant/12345",
"last_menu_ingestion_data": {
"time_of_last_successful_ingestion": "2020-04-02T13:36:17.872Z",
"status": "SUCCESS",
"json_byte_size": "0.7932 MB",
"time_of_last_ingestion_attempt": "2020-04-02T13:36:17.872Z",
"details": "Ingestion completed."
}
},
{
"name": "Siam Bistro #2 Main St.",
"provider_location_id": "2",
"menu": {
"state": "failed_to_import",
"state_reason_message": "Menu refresh request failed. code=404"
}
}
]
}

Response Parameters

Name Type Description
name String The name of the merchant
provider_merchant_id String A string the identifies the merchant
locations Array of objects A list of objects defining the locations belonging to the merchant
name String The name of the location
provider_location_id String A string that identifies the location
menu Object Menu-level data
state String State can be one of importing, imported, failed_to_import, exporting, exported, or failed_to_export depending on whether the import/export is in progress or complete and whether or not any errors occurred
state_reason_message String Is null if no errors occur; if errors occur during import or export they are listed here
link_to_menu_on_marketplace String Link to view the menu on Grubhub Marketplace
time_of_last_successful_ingestion String ISO 8601-formatted timestamp representing the time at which the most recent menu ingestion successfully completed processing
status String

Status can be one of: SUCCESS, SENT_TO_GRUBHUB, FAILED, MANUALLY_FAILED, FAILED_TO_SEND_TO_GRUBHUB, or FAILED_VALIDATION depending on whether the ingestion is in-progress (SENT_TO_GRUBHUB) or complete, and whether or not there errors occurred

json_byte_size String Menu ingestion JSON byte size
time_of_last_ingestion_attempt String
ISO 8601-formatted timestamp representing the time at which the most recent menu ingestion completed processing, regardless of state
details String
Ingestion details including success messages and detailed error messages

 

Possible State Reason Messages

Message Description
Menu refresh request failed. Location marked as unwanted. code=404 The menu refresh request failed with a response code of 404. Location marked as unwanted.
Menu refresh failed. error_class=ApiRequestError error_message="Request to get menus failed" error_backtrace="/app/lib/provider_apis/toast_api/requests/get_menus_request.rb:15:in `failed_request' /app/lib/provider_apis/toast_api/requests/base_request.rb:13:in `run' /app/lib/provider_api_clients/toast_api.rb:32:in `get_menus' /app/app/models/providers/toast_api/raw_menu_downloader.rb:30:in `raw_menus' /app/app/models/providers/toast_api/raw_menu_downloader.rb:10:in `download'"

The request to get menus failed.

 

Menu refresh failed. error_class=ProviderApiClients::ProviderClientError error_message="Error making request url=https://orderservice.wendys.com/OrderingServices/rest/menu/getSiteMenu class=provider_api_clients/wendys_api code=200 body={\"serviceMessages\"=>[\"We're sorry, an error was detected.\"], \"serviceStatus\"=>\"ERROR\"}" error_backtrace="/app/lib/provider_api_clients/wendys_api.rb:35:in `get' /app/lib/provider_api_clients/wendys_api.rb:9:in `get_menu' /app/app/models/providers/wendys_api/raw_menu_downloader.rb:23:in `unparsed_menu' /app/app/models/providers/wendys_api/raw_menu_downloader.rb:9:in `download' /app/app/models/providers/wendys_api/menu_importer.rb:66:in `raw_menu'" The menu refresh failed: "Error making request to https://orderservice.wendys.com/OrderingServices/rest/menu/getSiteMenu
Menu refresh failed. error_class=NoMethodError error_message="undefined method `[]' for nil:NilClass" error_backtrace="/app/app/models/providers/canonical_api/menu_parser.rb:17:in `parse' /app/app/models/providers/canonical_api/menu_importer.rb:83:in `parsed_menu' /app/app/models/providers/canonical_api/menu_importer.rb:12:in `import' /app/app/models/menu.rb:266:in `import_menu_data' /app/app/jobs/import_menu_job.rb:16:in `perform'" Please contact Grubhub with error message details.
Menu refresh failed. error_class=ConfigurationError error_message="You must provide a base URI in provider config to use a Zero-Code Canonical implementation." error_backtrace="/app/lib/provider_apis/canonical_api/config.rb:13:in `base_uri' /app/lib/provider_api_clients/canonical_api.rb:12:in `base_uri' /app/lib/provider_api_clients/canonical_api.rb:129:in `get' /app/lib/provider_api_clients/canonical_api.rb:88:in `refresh_menu' /app/app/models/providers/canonical_api/menu_importer.rb:119:in `refresh_menu_and_enqueue_refresh_status_check_job'" Configuration Error: You must provide a base URI in provider config to use a Zero-Code Canonical implementation.
Menu refresh failed. error_class=ApiRequestError error_message="Request to get menus failed" error_backtrace="/app/lib/provider_api_clients/toast_api.rb:64:in `get_menus_v2' /app/app/models/providers/toast_api/raw_menu_downloader.rb:44:in `raw_menus' /app/app/models/providers/toast_api/raw_menu_downloader.rb:10:in `download' /app/app/models/providers/toast_api/menu_importer.rb:36:in `raw_menu_download_data' /app/app/models/providers/toast_api/menu_importer.rb:44:in `raw_menus'" Request to get menus failed