Recharge RFID
#
DescriptionThis endpoint is used to change the budget of a RFID card
#
Request formatMethod: POST
Endpoint: https://api.thor.tools/latest/integration/rfid/recharge
Body format: JSON
Key | Type | Description |
---|---|---|
id | String | The unique RFID card identifier. |
amount | Float | Amount to add to the budget. If amount is negative it will be subtracted. |
reason | String | Reason of the change to the budget. |
Request schema:
#
Response formatThe response is a JSON containing the information related to the deleted RFID card with the following fields:
Field name | Type | Description |
---|---|---|
active | Boolean | The RFID card is set as active in the administration dashboard. |
alias | String | The RFID card name. |
id | String | The unique RFID card identifier. |
budget | Object | The budget of the RFID card (if null the budget is infinite). |
budget.amount | Float | The amount of the budget of the RFID card. |
budget.locked | Float | Part of the amount blocked by running transactions. |
lc_alias | String | The RFID card name in lower case. |
infiniteOn | Object | List of chargeboxes on which the RFID ignores its budget. |
infiniteOn.enabled | Boolean | If the infiniteOn feature is enabled or not. |
infiniteOn.chargeboxes | Array | List of ids of chargeboxes on which the RFID ignores the budget. |
A succesful response is returned with an HTTP status code 200 - OK
#
Example response#
Error responseThe following errors are returned if something went wrong while processing the request:
HTTP status code | Message | Description |
---|---|---|
403 | APIKeyNotFound | An invalid API key was given in the header of the request. |
403 | RestAPINotEnabled | REST API integration is set as disabled in the administration dashboard. |
403 | InvalidSourceIPAddr | The request comes from an IP address that is different from the one given in the REST API integration configuration. |
404 | InvalidIDField | The type or content of the id parameter is invalid. |
404 | RFIDNotFound | No RFID card with the give id was found. |
500 | InternalServerError | Something unexpected went wrong while executing the request. |