Skip to content

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"
}
  • employeeId employee ID
  • balance current balance
  • startingBalance starting balance
  • percentages available discount percentages * articleCharacteristicName / articleCharacteristicValue whether this discount percentage is limited to specific article characteristic * articleGroupId whether this discount percentage is limited to a certain item group
  • bookingPeriod the current booking period

Load

Loads balance for employee and booking period.

/api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Load

Request:

{
  "amount": 0.01
}

Parameters:

  • EmployeeId account number
  • BookingPeriod booking period obtained from get-balance
  • amount amount 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"
}
  • cancelId provide the cancel-id returned in the /Load response.

Redeem

Redeems balance for employee and booking period.

/api/v1.0/EmployeeDiscount/{employeeId}/Balance/{bookingPeriod}/Load

Request:

{
  "amount": 0.01
}

Parameters:

  • EmployeeId account number
  • BookingPeriod booking period obtained from get-balance
  • amount amount 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"
}
  • cancelId provide the cancel-id returned in the /Redeem response.