Frontend API List
1. Overview
This document captures the system interface specification.
No Interface Interface Method Data Verify
Url Desc
1.1 /api/external/ Man- POST JSON /
enrollment/u machine
ser/v1/verific validation,
ation generating
jwt sessions
1.2 /api/external/ Query GET JSON /
enrollment/c configuratio
onfiguration/ n content
v1/initializati initializatio
on n
1.3 /api/external/ User POST JSON jwt
enrollment/u Registration
ser/v1/create
Guest
1.4 /api/external/ Query grid GET JSON /
enrollment/c images
onfiguration/
v1/grid
1.5 /api/external/ Query GET JSON /
content/enrol password
l/v1/isPasswo required by
rd ocode
2. Interface Security
• JSON Web Token (jwt)
A JSON Web Token is generated after passing through the panel validation interface, and
this token is passed in from the x-token field of the header to be validated
3. Interface Definition
1.1 [POST] /api/external/enrollment/user/v1/verification
• Header
Field_EN required Field Type Remarks
x-transaction-id Y string Request transaction
id, randomly
generated non-
repeating strings
• Input
Field_EN required Field Type Remarks
sign Y string Browser data
encrypted with AES-
256-GCM
• Output
Field_EN Field Type Remarks
code string Status code, refer to error cod
e
message string Request description
timestamp string Request timestamp
data object Response parameter
- token string Generated JSON Web Token
• Sample
Input:
JSON
1 {
2 "sign": "xxxxxxxxxx"
3 }
Output:
JSON
1 {
2 "code": 200,
3 "data": {
4 "token": "xxxxxxxxxx"
5 },
6 "message": "Request successful",
7 "timestamp": 1691660556702
8 }
1.2 [GET] /api/external/enrollment/configuration/v1/initialization
• Header
Field_EN required Field Type Remarks
x-transaction-id Y string Request transaction
id, randomly
generated non-
repeating strings
• Input
Field_EN required Field Type Remarks
country Y string Country code
(Japan: JP, Korea:
KR, Inida: IN)
• Output
Field_EN Field Type Remarks
code string Status code, refer to error cod
e
message string Request description
timestamp string Request timestamp
data object Response parameter
- uniqueKey string Unique identification key
- configType number 1 Terms Agreement Config, 2
Image Config, 3 Text Config, 4
Jump Address Config, 5
System Config, 6 Grid Images
- country string Country code (Japan: JP,
Korea: KR, Inida: IN)
- title string Title of the terms and
conditions agreement
- content string Content of the terms and
conditions agreement
- imageUrl string Image address
- actionUrl string Click to jump to the address
- jumpType number 0 current page jump, 1 new
page jump
- sort number Terms agreement arrange in
order
- required number 0 not required, 1 required
- checked number 0 unchecked, 1 checked
- visible string 0 not visible, 1 visible
- effectiveDate string
- expiryDate string
- createTime string
- updateTime string
• Sample
Output:
JSON
1 {
2 "code": 200,
3 "data": [{
4 "uniqueKey": "BANNER_IMAGE",
5 "configType": 2,
6 "country": "IN",
7 "title": null,
8 "content": null,
9 "imageUrl": "[Link]
10 "actionUrl": "[Link]
11 "jumpType": 0,
12 "sort": null,
13 "required": null,
14 "checked": null,
15 "visible": null,
16 "effectiveDate": null,
17 "expiryDate": null,
18 "createTime": null,
19 "updateTime": null
20 },
21 {
22 "uniqueKey": "WELCOME_TEXT",
23 "configType": 3,
24 "country": "IN",
25 "title": null,
26 "content": "Join Now!",
27 "imageUrl": null,
28 "actionUrl": null,
29 "jumpType": null,
30 "sort": null,
31 "required": null,
32 "checked": null,
33 "visible": null,
34 "effectiveDate": null,
35 "expiryDate": null,
36 "createTime": null,
37 "updateTime": null
38 },
39 {
40 "uniqueKey": "HILTON_MARKETING",
41 "configType": 1,
42 "country": "IN",
43 "title": "ヒルトンのマーケティング",
44 "content": "私は、ヒルトンのグローバルプライ...",
45 "imageUrl": null,
46 "actionUrl": null,
47 "jumpType": null,
48 "sort": 1,
49 "required": 0,
50 "checked": 1,
51 "visible": null,
52 "effectiveDate": null,
53 "expiryDate": null,
54 "createTime": null,
55 "updateTime": null
56 }
57 ],
58 "message": "Request successful",
59 "timestamp": 1691660556702
60 }
1.3 [POST] /api/external/enrollment/user/v1/createGuest
• Header
Field_EN required Field Type Remarks
x-transaction-id Y string Request transaction
id, randomly
generated non-
repeating strings
x-token Y string 1.1 Interface
generated token
• Input
Field_EN required Field Type Remarks
firstName Y string Member's Japanese
Name
firstNameEn Y string Member's English
Name
lastName Y string Member's Japanese
Surname
lastNameEn Y string Member's English
Surname
postalCode N string Postal code
country Y string Country code (JP,
KR, IN)
preferredLanguage Y string Preferred language
(ja, ko, en-IN)
state Y string English State
city Y string English City
addressLine1 Y string English District
addressLine2 N string English Address
detail
emailAddress Y string Email
phoneCountry Y string Phone country
phoneNumber Y string Phone number
password Y string Password
ocode N string Source code
bindSocial Y number 0 unbound, 1 bound
socialPlatform N number 1 LINE
subscription Y array The json object to
which members
agree and refuse to
subscribe
- uniqueKey Y string subscription unique
key
- status Y number 0 reject, 1 confirm
sign Y string The entire request
body (excluding the
sign field) is signed
using the following
code
• Sign
JavaScript
1 const crypto = require('crypto');
2 let hash = [Link]('sha256');
3 let str = '';
4 // 根据字段进行排序后拼接
5 for (let key of [Link](data).sort()) {
6 // 嵌套数组排序后拼接
7 if (key === 'subscription') {
8 let tempStr = '';
9 body[key].sort((a, b) => [Link]([Link])).f
orEach((item) => (tempStr += `${[Link]}=${[Link]}&`));
10 str += `${key}:${[Link](0, [Link] - 1)},`;
11 } else {
12 str += `${key}:${body[key]},`;
13 }
14 }
15 let sign = [Link]([Link](0, [Link] - 1)).digest('he
x');
• Output
Field_EN Field Type Remarks
code string Status code, refer to error cod
e
message string Request description
timestamp string Request timestamp
data object Response parameter
- honorAccount string Original honors membership
number
- actionUrl string Page redirect links
• Sample
Input:
JSON
1 {
2 "firstName": "EASON",
3 "firstNameEn": "EASON",
4 "lastName": "ZHENG",
5 "lastNameEn": "ZHENG",
6 "country": "IN",
7 "preferredLanguage": "en-IN",
8 "state": null,
9 "city": "DEFAULT",
10 "addressLine1": "DEFAULT",
11 "addressLine2": null,
12 "emailAddress": "yamada@[Link]",
13 "phoneCountry": "91",
14 "phoneNumber": "0123456789",
15 "password": "xxxxxxxx",
16 "ocode": "xxx",
17 "bindSocial": 0,
18 "subscription": [{
19 "uniqueKey": "HILTON_MARKETING",
20 "status": 1
21 }],
22 "sign": "57a15b8735a4afc06c3ddc915ba421716e5167fab46289605f36eebee9
2c409d"
23 }
Output:
JSON
1 {
2 "code": 200,
3 "data": {
4 "honorAccount": "1475845945",
5 "actionUrl": "[Link]
6 },
7 "message": "Request successful",
8 "timestamp": 1691660556702
9 }
1.4 (Optional) [GET] /api/external/enrollment/configuration/v1/grid
• Header
Field_EN required Field Type Remarks
x-transaction-id Y string Request transaction
id, randomly
generated non-
repeating strings
• Input
Field_EN required Field Type Remarks
country Y string Country code
(Japan: JP, Korea:
KR, India: IN)
• Output
Field_EN Field Type Remarks
code string Status code, refer to error cod
e
message string Request description
timestamp string Request timestamp
data object Response parameter
- type string layout type ( Grid Design D
ocumentation )
- list array
- desktopCover string desktop image url
- desktopLink string desktop link url
- mobileCover string mobile image url
- mobileLink string mobile link url
- place string image placement
• Sample
Input:
JSON
1 {
2 "country": "IN"
3 }
Output:
JSON
1 {
2 "code": 200,
3 "data": {
4 "type": "grid",
5 "list": [{
6 "desktopCover": "/asset/enroll/images/grid/Enrollment_PC_ME
MBER_BENEFITS.jpg",
7 "desktopLink": "[Link]
ber-benefits",
8 "mobileCover": "/asset/enroll/images/grid/Enrollment_Mobile
_MEMBER_BENEFITS.jpg",
9 "mobileLink": "[Link]
er-benefits",
10 "place": "topLeft"
11 }, {
12 "desktopCover": "/asset/enroll/images/grid/Enrollment_PC_DI
NING_DISCOUNT.jpg",
13 "desktopLink": "[Link]
p/likeamember",
14 "mobileCover": "/asset/enroll/images/grid/Enrollment_Mobile
_DINING_DISCOUNT.jpg",
15 "mobileLink": "[Link]
p/likeamember",
16 "place": "topRight"
17 }, {
18 "desktopCover": "/asset/enroll/images/grid/Enrollment_PC_FO
LLOW_LINE.jpg",
19 "desktopLink": "[Link]
ype=app&b=4669&v=23330&ref=HHform_desktop",
20 "mobileCover": "/asset/enroll/images/grid/Enrollment_Mobile
_FOLLOW_LINE.jpg",
21 "mobileLink": "[Link]
pe=app&b=4669&v=23330&ref=HHform_mobile",
22 "place": "bottomLeft"
23 }, {
24 "desktopCover": "[Link]
s/logos/[Link]",
25 "desktopLink": "[Link]
26 "mobileCover": "[Link]
logos/[Link]",
27 "mobileLink": "[Link]
28 "place": "bottomRight"
29 }]
30 },
31 "message": "Request successful",
32 "timestamp": 1708940785708
33 }
1.5 [GET] /api/external/content/enroll/v1/isPassword
• Header
Field_EN required Field Type Remarks
x-transaction-id Y string Request transaction
id, randomly
generated non-
repeating strings
• Input
Field_EN required Field Type Remarks
ocode Y string Access Channel
• Output
Field_EN Field Type Remarks
code string Status code, refer to error cod
e
message string Request description
timestamp string Request timestamp
data object Response parameter
- result boolean Return a password required
flag
• Sample
Input:
JSON
1 {
2 "ocode": "10011"
3 }
Output:
JSON
1 {
2 "code": 200,
3 "data": {
4 "result": false,
5 },
6 "message": "Request successful",
7 "timestamp": 1708940785708
8 }
4. Error code
Error Code Error Message
200 Success
4001 Validation fail
4002 Operation fail
4003 The specified e-mail address has already been
registered
4004 Sign encrypted content verification failed
4005 Failed to get core token
4006 Registration failed
4007 Social call failed
4008 ReCaptcha verification fail
4009 Expired access token
4101 Password does not meet minimum
requirements
4102 Country string must match the specified
regular expression
4103 Invalid email address
4104 Name string must match the specified regular
expression
4105 Phone Number string must match the specified
regular expression
4106 State string must match the specified regular
expression
4107 City string must match the specified regular
expression
4108 District string must match the specified regular
expression
4109 Address string must match the specified
regular expression
4110 Postal Code string must match the specified
regular expression
4111 Name transliteration failed for locale
4112 State transliteration failed for locale
4113 City transliteration failed for locale
4114 District transliteration failed for locale
4115 Postal Code transliteration failed for locale