Table of Contents
Table of Contents | ||
---|---|---|
|
...
With this step-by-step doc we can create new restaurants in the WL App with an integrated and functional menu.
PUT a restaurant
Important: tried to add more items later and noticed that we have some delays in this sync where the items take a lot of time to be shown in the menu (at least 20 minutes in my tests)
Method: PUT
Url: https://{{awsRegion}}-{{env}}-{{brand}}-partners-admin.rbictg.com/api/v1/admin/restaurants
Example: https://euw3-dev-plk-partners-admin.rbictg.com/api/v1/admin/restaurants
...
Token: partners api secret (dynamodb)Example: 6dfnPNxMuF1MA5zi5iDY
Header:
key: x-ui-region
value: ES
...
Code Block | ||
---|---|---|
| ||
{ "address": { "address1": "Calle de Bravo Murillo 100, 28850", "address2": "", "city": "Madrid", "country": "Spain", "postalCode": "28020", "stateProvince": "", "stateProvinceShort": "" }, "coordinates": { "latitude": 40.447520, "longitude": -3.703660 }, "menuItems": [{"plu":"940270","price": 2500}], "restaurantName": "CIT Shop Rapha", "storeId": "7788", "timezone": "Europe/Madrid" } |
Generate an integrationId and a partnerId
...
Token: partners api secret (dynamodb)
Example: 6dfnPNxMuF1MA5zi5iDY
Header:
key: x-ui-region
value: ES
...
Code Block |
---|
{ "brand": "PLK", "country": "ES", "storeIds": ["7788"], "integrationId": "dd58dca8-abca-4722-9893-e39dbde8f8f1", "partnerId": "db5c3402-50e1-433a-876b-c10ddc439e8f" } |
Note that the storeIds were inputted above, but later, you’ll that this association really didn’t work. According to the swagger, it could work using an object like
...
Alternatively, you can update your integration as you can see in the following steps.
Validate the integration
Method: GET
Url: https://{{awsRegion}}-{{env}}-{{brand}}-partners-admin.rbictg.com/api/v1/admin/integrations/{integrationId}
...
Token: partners api secret (dynamodb)
Example: 6dfnPNxMuF1MA5zi5iDY
Header:
key: x-ui-region
value: ES
...
Note: See the missing stores.
Update your integration to include your restaurant
Method: PUT
Url: https://{{awsRegion}}-{{env}}-{{brand}}-partners-admin.rbictg.com/api/v1/admin/integrations/{integrationId}
...
Token: partners api secret (dynamodb)
Example: 6dfnPNxMuF1MA5zi5iDY
Header:
key: x-ui-region
value: ES
...
The following cart page will only be available if the restaurant webhooks are well configured
...
Copy a restaurant menu to the new restaurant
After creating the restaurant, we can copy the Zaragoza (1111) menu to the newly created restaurant. In this way, we’ll have a restaurant with a menu that we know will work.
...
Created restaurants
BK ES → In the moment I’m writing this we can’t reach the success page
Metro Sol, C. de Esparteros, 3, 28012 Madrid, Spain
BK PT → In the moment I’m writing this we can reach the success page
R. Maria Amália Vaz de Carvalho 47, 1700-333 Lisboa, Portugal
PLK ES → In the moment I’m writing this we can reach the success page
C. de Eduardo Torroja, 28914 Leganés, Madrid, Spain