Virtual balance
The platform allows managing the virtual balance from the Connect API.
important
The virtual balance can be of type wallet or battery. The wallet unit is in euros (EUR) and the battery unit is in kilowatt-hours (kWh). This has been developed this way because there are clients who manage the virtual balance in different currencies.
After updating, this balance can be viewed both in the portal, for management by an operations person, and in the mobile application, where the client can visualize it.
Example usage
Here is an example of how to use cURL to update the virtual balance:
Request to update the user's virtual balance
curl --request POST \
--url https://connect.clever.gy/users/userId/virtual-balance \
--header 'accept: application/json' \
--header 'clevergy-api-key: BIzaSyDwdq8dknwUxE8kfi3sdcnwknccK8dlBE1ec' \
--header 'content-type: application/json' \
--data '{
"date": "2024-11-06",
"amount": 25,
"totalBalance": 125
}'
Wallet operations
Overview of wallet-related operations.
createVirtualWalletTransaction
Battery operations
Overview of battery-related operations.