Employee Balance Vault - Frontend API¶
Employee Balance Vault api requires api_employeediscount scope.
Get balance¶
Get balance for employee: /api/v1.0/EmployeeDiscount/{employeeId}/Balance
Get balance for employee card: /api/v1.0/EmployeeDiscount/Card/{employeeCardId}/Balance
Response:
{
"employeeId": "string",
"balance": 0,
"startingBalance": 0,
"percentages": [
{
"percentage": 0,
"articleCharacteristicName": "string",
"articleCharacteristicValue": "string",
"articleGroupId": "string"
}
],
"bookingPeriod": "string"
}
employeeIdemployee IDbalancecurrent balancestartingBalancestarting balancepercentagesavailable discount percentages *articleCharacteristicName/articleCharacteristicValuewhether this discount percentage is limited to specific article characteristic *articleGroupIdwhether this discount percentage is limited to a certain item groupbookingPeriodthe current booking period
Load¶
Loads balance for employee and booking period.
/api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Load
Request:
{
"amount": 0.01
}
Parameters:
EmployeeIdaccount numberBookingPeriodbooking period obtained from get-balanceamountamount to load to balance
Response:
{
"balance": 0,
"cancelId": "string",
"success": true
}
Hint
Load is generally not necessary to implement. Balance is loaded in Backend API and purchases are redeemed from this balance. In case of reversal/refund load must be used.
Cancel¶
Cancels load of employee balance. Can only be executed immediately after load.
Endpoint: /api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Load/Cancel
Request:
{
"cancelId": "string"
}
cancelIdprovide the cancel-id returned in the/Loadresponse.
Redeem¶
Redeems balance for employee and booking period.
/api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Load
Request:
{
"amount": 0.01
}
Parameters:
EmployeeIdaccount numberBookingPeriodbooking period obtained from get-balanceamountamount to redeem from balance
Response:
{
"balance": 0,
"cancelId": "string",
"success": true
}
Cancel¶
Cancels redemption of employee balance. Can only be executed immediately after redemption.
Endpoint: /api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Redeem/Cancel
Request:
{
"cancelId": "string"
}
cancelIdprovide the cancel-id returned in the/Redeemresponse.