Empowering Restaurants through Integration

Follow

As part of the newly launched Rapid Onboarding feature set, for any restaurant to go fully live on Grubhub via POS Integration, there are 4 main steps that need to be completed:

 

  1. Grubhub configures the merchants for POS integration
  2. Integrating partner successfully ingests a menu to those merchants
  3. Integrating partner successfully sets Integration Status Live for those merchants
  4. Integrating partner successfully sets Restaurants Online


1. Merchant POS Integration Config Webhook 

This is a new outbound webhook being offered by Grubhub’s API suite that notifies a partner with a list of merchant IDs that have been successfully configured for menu ingestion and ordering integration. The assumption is that once a partner receives a webhook with a list of merchants, they should be able to ingest menus for those merchants and follow that up with setting integration live using the second new feature highlighted below. 

A partner is required to host a new webhook URL to receive these webhooks and let the GH team know the full path. 

Example payload: 

The Partner entity ID is the identifier of the integrating partner on GH systems. 

{
  "entity_id": "_VlT0LatEey5LYkEYkxznw",
  "merchant_ids": [
"10002300544","10002440533"
  ],
  "status": "SUCCESS"
}

 

2. Upload a menu

 

3. Set Integration Live 

 

This new endpoint lets partners enable / disable POS integration status for merchant(s) configured under their partner setup on Grubhub. The only requirement for this endpoint is at least one successful menu ingestion for the merchants being sent in the request. (Limit 100 merchants per request)

 

PUT /pos/v1/merchant/integrationlive 

 

Request

[
    {"merchant_id":"1240234416","enabled":true},
    {"merchant_id":"10001169024","enabled":false},
    {"merchant_id":"10001170040","enabled":true}
]

 

Response

{
  "batch_id": "Lmw4vJEcSYe1YDN1C0DnBA",
  "merchant_ids": [
"1240234416",
"10001169024",
"10001170040"
  ]
}







Check Integration Live Request status 

To retrieve the status of Integration live requests, partners can check status one of two ways: 

GET /pos/v1/merchant/integrationlive/{batch_id}/status 

Returns status for all requested items in progress

 

Response

{
   "batch_id": "T58amO2BRYqV6-HD0hb2Aw",
   "processing_complete": true,
   "merchant_status": {
       "100000": "SUCCESSFUL",
       "111111": "NOT_FOUND",
       "222222": "INVALID",
       "333333": "FAILED",
       "444444": "FAILED_TO_QUEUE",
       "555555": "IN_PROGRESS",
       "666666": "REQUESTED"
   },
   "merchant_statuses": [
       {
           "merchant_id": "100000",
           "status": "SUCCESSFUL"
       },
       {
           "merchant_id": "111111",
           "status": "NOT_FOUND",
           "details": "Merchant with ID=111111 not found."
       },
       {
           "merchant_id": "222222",
           "status": "INVALID",
           "details": "Request to update merchant is invalid for merchantId=222222;
validation errors: [client errors will go here]"

       },
       {
           "merchant_id": "333333",
           "status": "FAILED"
       },
       {
           "merchant_id": "444444",
           "status": "FAILED_TO_QUEUE"
      },
       {
           "merchant_id": "555555",
           "status": "IN_PROGRESS"
       },
       {
           "merchant_id": "666666",
           "status": "REQUESTED"
       }
   ]
}

 

Merchant_status is a legacy field and will be deprecated in the future. Please refer to merchant_statuses.

 

GET /pos/v1/merchant/integrationlive/{batch_id}/status?merchant_id=11111 

Returns status for only individual merchant IDs passed

 

Response

{
"batch_id":
"BgAPKjIATE6Xmot9N0JLZw","processing_complete":true,
"merchant_status":{"111111":"SUCCESSFUL"}”,
"merchant_statuses":{"111111":
"SUCCESSFUL"}
}


The above examples only show a status check for the /integrationliverequest. A partner can check the status of any 86-ing job via job_id.   

 


4. Set Restaurant Online/Offline (individual and bulk operations)

 

Individual Merchants 

Provides the ability to set a restaurant online/offline on Grubhub. When offline, the restaurant will not be listed on the site; when online, the restaurant will be listed on the site and be able to accept orders.

 

PUT/pos/v1/merchant/{merchant_id}/pos-status

 

Body Request

{"new_pos_status”:"ONLINE"}

 

Response

204

 

 

Bulk Merchants

Returns the status of the merchant online/offline batch together with the progress for each individual merchant, or, if present, only for the specified merchant ID. Limit 100 merchants per request

 

PUT/pos/v1/merchant/pos-status

 

Request

[
  {
    "merchant_id": "123",
    "new_pos_status": "ONLINE",
    "details": "going Live"
  },
  {
    "merchant_id": "456",
    "new_pos_status": "OFFLINE",
    "details": "temporary pause"
  } 
]

 

Response

{
  "batch_id": "Lmw4vJEcSYe1YDN1C0DnBA",
  "merchant_ids": [
"123",
"456"
  ]
}

 

Check Restaurant Online/Offline Request Status

Returns status for all requested merchants in progress.

 

GET/pos/v1/merchant/pos-status/{batch_id}/status 

 

Response

{
    "batch_id": "SEgIPIjUTaeNtxl8w9AV3g",
    "processing_complete": true,
    "merchant_status": {
        "123": "FAILED",
        "456": "SUCCESSFUL"
  },
"merchant_statuses": [

       {
           "merchant_id": "123",
           "status": "FAILED"
       },
{

           "merchant_id": "456",
            "status": "SUCCESSFUL"
       }
    ]
}