Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How To Integrate AOA Booking Webview

Base URL

Production: https://web.hungryhub.com/Old Staging: ~~https://deploy-preview-2013--hungryhub-build-staging.netlify.app~~ New Staging: https://hh-aoa.netlify.app

Requirement

  1. Use the mobile view or a screen size below 767px before accessing. Currently, we detect whether it's mobile or not based on the screen size.
  2. Don't jump to the step-1 route /restaurants/audrey-cafe-thonglor-soi-11/mobile-book/step-1?token=XX&layout=plain&locale=th .
  3. Instead, you should start from the mobile-book route /restaurants/audrey-cafe-thonglor-soi-11/mobile-book?token=XX&layout=plain&locale=th . Because we validate the token and inject the data in the mobile-book route, not in the step-1 route.

Path & Query Params

DescriptionExampleIs Required
Restaurant slugpizza-den-137required
Token query paramstoken=123required
Layout query paramslayout=plainrequired
Locale query params (en/th)locale=enoptional

For example (Base URL + Path):

https://hh-aoa.netlify.app/restaurants/cafe-claire-by-oriental-residence/mobile-book?token=MzE4NGI4YjgtYzZlNi0xMWVkLWFmYTEtMDI0MmFjMTIwMDAy&layout=plain&locale=en

How To Generate Token

  1. Go to insomnia
  2. Select Authentication
  3. Fill in your payload data, e.g.
{
	"contact_id": "3184b8b8-c6e6-11ed-afa1-0242ac120002",
	"first_name": "Luthfi",
	"last_name": "",
	"phone": "08123456789",
	"phone_code": "+66",
	"phone_country_code": "th",
	"email": "luthfi@hungryhub.com"
}

contact_id = aoa user id
email is optional

  • If the email payload is null, then the user must input their email on the app
  • If prefilled, then the user is able to edit the email later 4. And then click send 5. You will get the token in the response to make AOA Booking e.g.
{
	"data": {
		"token": "MzE4NGI4YjgtYzZlNi0xMWVkLWFmYTEtMDI0MmFjMTIwMDAy"
	},
	"success": true
}

6. And then you can make a booking with the token