This is a demo application meant to illustrate how to integrate your application with Safe Entry
For the demo application to run, you will need to install Node and NPM.
Follow the instructions given by the links below depending on your OS.
Run the following command in the folder you unzipped the application:
npm install
Execute the following command to call the Entry API:
To test with payload encryption and signing.
npm run entry
To test without payload encryption and signing.
npm run entry-sandbox
You are allowed to change the following configurations in the files below:
File | Configs |
---|---|
index.js |
Sample checkin or checkout data |
config.js |
Application ID (AppId) and certificates |
Sample data | Response (Body) |
---|---|
Success | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
"mobileno": "92376345"
}
|
Http status code: 201 Body: < empty > |
Fail - Missing field | |
{
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
"mobileno": "92376345"
}
|
Http status code: 400 Body: {"code":400,"message":"Missing subType"} |
Fail - Invalid sub type. Only allow "uinfin" or "others | |
{
"subType": "test",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
"mobileno": "92376345"
}
|
Http status code: 400 Body: {"code":400,"message":"Invalid subType"} |
Fail - Invalid venue | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "test",
"mobileno": "92376345"
}
|
Http status code: 400 Body: {"code":400,"message":"Invalid venue"} |
Fail - Invalid uinfin | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "test",
"venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
"mobileno": "92376345"
}
|
Http status code: 400 Body: {"code":400,"message":"Invalid uinfin"} |
Fail - Invalid mobileno | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
"mobileno": "test"
}
|
Http status code: 400 Body: {"code":400,"message":"Invalid mobileno"} |
Sample data | Response (Body) |
---|---|
Success | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
"mobileno": "92376345",
"tenantId": "VENUE1"
}
|
Http status code: 201 Body: < empty > |
Fail - Missing tenantId. TenantId is mandatory for Multiple tenant SafeEntry QR app | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
"mobileno": "92376345"
}
|
Http status code: 400 Body: {"code":400,"message":"Missing tenantId"} |
Fail - Invalid tenantId. TenantId does not exist in SafeEntry QR app | |
{
"subType": "uinfin",
"actionType": "checkin",
"sub": "S9960846C",
"venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
"mobileno": "92376345",
"tenantId": "test"
}
|
Http status code: 400 Body: {"code":400,"message":"Invalid tenantId"} |
You may contact our support for any other technical issues, and we will respond to you within 5 working days.