Apply the account balance update to the appropriate account balance
Service URL: POST /accountBalances/update
Service URL: PATCH /accountBalances
Request Headers:
Header | Description | Example |
---|
Header | Description | Example |
---|---|---|
enactor-device-id | This header will identify the id of the device making the request | pos1@0001.enactor |
enactor-location-id | This header will specify the location of the device making the request | 0001 |
enactor-user-id | This header will specify the id of the user making the requestNote that unlike the subject header, this identifier should be for information only and should not be used for authorisation. | 1 |
subject | Customer number to identify and verify the customer who is making the request has the required permission to access an account | 1 |
Request Body: AccountBalanceUpdate
Response Body: AccountBalanceUpdateResponse
Example Request:
POST: http://localhost:8080/WebRestApi/rest/accountBalances/update
enactor-device-id: pos1@0001.enactor
enactor-location-id: 0001
enactor-user-id: 1
subject: 1
Content-Type: application/json
Example Request Body:
{
"@type" : "accountBalanceUpdate",
"transactionId" : 978789,
"deviceId" : {
"@type" : "deviceKey",
"id" : "pos1@0001.enactor"
},
"accountId" : "0101025190527144502028",
"accountType" : "customerLoyalatyAccount",
"cardNumber" : "8934736829037",
"updateAmount" : 88,
"dateTimeUpdated" : 1624295653842,
"expiryTime" : 1625591653000,
"status" : "PENDING",
"referenceId": "34546344543",
"locationId": "Store1"
}
Example Response:
{
"@type": "accountBalanceUpdateResponse",
"accountBalanceUpdateOutput": {
"@type": "accountBalanceUpdateOutput",
"accountBalanceUpdate": {
"@type": "accountBalanceUpdate",
"transactionId": 978789,
"deviceId": {
"@type": "deviceKey",
"id": "pos1@0001.enactor"
},
"originalTransactionDeviceId": {
"@type": "deviceKey",
"id": "pos1@0001.enactor"
},
"originalTransactionId": "123456789012345",
"locationId": "Store1",
"accountId": "0101025190527144502028",
"accountType": "customerLoyalatyAccount",
"cardNumber": "8934736829037",
"updateAmount": 88,
"dateTimeUpdated": 1624300226258,
"expiryTime": 1625596226000,
"status": "PENDING",
"referenceId": "343435423"
}
},
"errorMessage": {}
}