Professional Documents
Culture Documents
Setup 2 - REST API Specs For Reward System v1.05 (Confirm Transaction)
Setup 2 - REST API Specs For Reward System v1.05 (Confirm Transaction)
Setup 2 - REST API Specs For Reward System v1.05 (Confirm Transaction)
Table of Contents
Document Sign Off 3
Revision History 4
Generic Format 5
Overview 6
API 6
3.1 Checkout 7
3.2 Confirm Transaction 8
API Integration Guide Page 3
Version: 0.02
Signature:
Name:
Date:
API Integration Guide Page 4
Revision History
Name Date Reason for Changes Version
Edison Tan 08/08/19 Remove Mobile No. and added Reward Value, 1.03
Reward Name from the response API.
Edison Tan 11/11/19 Change Checkout API to ScanMember API (Removed 1.05
receiptNumber as mandatory)
API Integration Guide Page 5
1. Generic Format
● The APIs are JSON REST APIs
● Request Url: http://{IP Address}:3000, IP address will be different for each Merchant
Terminal App.
2. Overview
a. Simple to add a button in the POS System called “Mall Reward” for OGF Member to
earn points and use rewards.
3. API
Scan Member
This API is to open the Checkout page. This API will take long as waiting merchant terminal
app to complete the transaction with shopper.
3.1 ScanMember
HTTP Post to http://{IPAddress}:3000/ScanMember
Request Body
{
“amount”: 2000,
“posId”: “ABC124”
}
Response Body
{
“error”: “”,
“status”: 0,
“rewardConfirmation”: {
“userId”: “57d5d6e8-bd69-4eec-a814-0fde1737bcb0”,
“posId”: “ABC124”,
“totalAmount”: 2000,
“totalReward”: 1000,
"transNo": "23456789123",
“rewardTransactions”:[
{
“rewardSubtype”: 1,
“serialNumber”: “OGF0000001”,
“rewardValue”: 500,
“rewardName”: “1000 cash voucher”
},
{
“rewardSubtype”: 3,
“ serialNumber”: “OGF0000002”,
“rewardValue”: 500,
“rewardName”: “1000 cash voucher”
API Integration Guide Page 8
}
]
}
}
Confirmed Transaction
This API is to update the Receipt Number once the POS transaction is completed.
3.2 Confirm
HTTP Post to http://{IPAddress}:3000/Confirm
Request Body
{
"amount": 2000,
"posId": "ABC124",
"transNo": "23456789123",
"receiptNumber": "A123123123",
"receiptDateTime": "2019-03-05T11:30:00Z"
}
Response Body
{
"error": "",
"status": 0,
"transactionConfirmation": {
"userId": "57d5d6e8-bd69-4eec-a814-0fde1737bcb0",
"receiptNumber": "A123123123",
"receiptDateTime": "2019-03-05T11:30:00Z",
"posId": "ABC124",
"rewardTransactions": [
{
“rewardSubtype”: 1,
“serialNumber”: “OGF0000001”,
“rewardValue”: 500,
“rewardName”: “1000 cash voucher”
},
{
“rewardSubtype”: 3,
“ serialNumber”: “OGF0000002”,
“rewardValue”: 500,
“rewardName”: “1000 cash voucher”
}
]
API Integration Guide Page 9
"transNo": "23456789123",
"totalAmount": 2000,
"totalReward": 1000
}
}