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

Referral Program Technical Documentation

https://www.figma.com/design/J32zfGcr13Y5CRLgKzqLNM/Referral-Program?node-id=0-1&t=qImkyGUOXRJY7HTT-0 Private (https://app.clickup.com/t/86cvk7r37) For this feature we'll make in both web and native app. The difference is only on contact features. Because web doesn't support contact.

For the main page we'll use URL https://web.hungryhub.com/en/member/referral please make sure if open that page redirect to this page: Another case for register url will use this URL: https://web.hungryhub.com/register?referral_code=B4CE68 If open that URL will open registration page will referred by a friend banner. If this banner is applied, when user tries to register needs to add r_code with that referral code value in the example:

{
	"minor_version": "{{ minor_version  }}",
	"name": "Pikachu",
	"password": "pikapika",
	"email": "pikapika@gmail.com",
	"phone": "872817222",
	"calling_code": "+66",
	"provider": "hungryhub",
	"language": "en",
	"subscribe_marketing_email": true,
	"r_code": "B4CE68"
}

We need to keep that state referral code until this pop up shown up: And if we click go to my offers & gift card will open my offers & gift card page.

API Invite Referral Program

(this is expected API to provided by BE, client can set up HTTP request and payload first for now) This API to send SMS or Email to the contact list. API URL: {base_api}/users/request_referral Method: POST Payload SMS:

{
	"access_token": "1ul_ocPBQR9TUG825ecKodtPHasWkI6I1QcBmvjUVSA",
	"type": "sms",
	"data": [
		"0812931234",
		"0812931235",
		"0812931236"
	]
}

Payload Email:

{
	"access_token": "1ul_ocPBQR9TUG825ecKodtPHasWkI6I1QcBmvjUVSA",
	"type": "email",
	"data": [
		"emailone@gmail.com",
		"emailtwo@gmail.com",
		"emailthree@gmail.com"
	]
}

Response:

{
	"success": true,
	"message": "Successfully sent!"
}

API Total Referral Earned

This API shows progress on how many friends successfully booked with their referral code. API URL: {base_api}/users/my_referral Method: GET Payload:

{
	"access_token": "1ul_ocPBQR9TUG825ecKodtPHasWkI6I1QcBmvjUVSA",
}

Response:

{
	"success": true,
	"message": "",
	"data": {
		"total_points_earn": 400,
		"total_referrer": 4
	}
}