Get running charges
#
DescriptionThis endpoint is used to retrieve the currently running charges on your chargeboxes.
#
Request formatMethod: GET
Endpoint: https://api.thor.tools/latest/integration/charges/running
Querystring parameters:
Name | Default value | Description |
---|---|---|
chargebox | null | Optional. If you want to retrieve only the charges performed on a specific chargebox, please provide here its ID. |
#
Response formatThe response is a JSON containing the information related to the requested chargebox with the following fields:
Field name | Type | Description |
---|---|---|
count | Integer | The number of charges retrieved. |
items | Array | The list of charges. |
items[].chargebox | String | The chargebox id. |
items[].connector | Integer | The connector number of the charge . |
items[].date_started | Integer | The epoch in milliseconds that represents the time of the charge start. |
items[].energy | Integer | The energy in Wh that was delivered to the vehicle. |
items[].id | Integer | The transaction identifier. |
items[].id_tag | String | The RFID used to start the charge (null if the charge was started remotely or using the API). |
items[].payment | Object | The payment information (null if the charge was free). |
items[].payment.start | Float | The amount added at the start of the transaction. |
items[].payment.method | Method | The payment method used to pay for the charge. |
items[].payment.amount | Float | The amount paid for the charge. |
items[].payment.transaction | String | The transaction ID given by the payment provider. |
items[].payment.nayaxID | String | The transaction ID given by Nayax in their dashboard. |
items[].payment.machineID | String | The machine ID given by Nayax in their dashboard. |
items[].payment.siteID | String | The ID of the Nayax server that processed the transaction. |
items[].type | ChargeType | The type of transaction. |
items[].user | String | The Thor registered user identifier who started the charge. |
users | Object | The details of the users who started the charges provided in the items element. |
users[].address | String | The user's address. |
users[].city | String | The user's city. |
users[].country | String | The user's country. |
users[].email | String | The user's e-mail address. |
users[].name | String | The user's name. |
users[].tax_vat | String | The user's tax code or VAT number. |
users[].zip_code | String | The user's zip code. |
A succesful response is returned with an HTTP status code 200 - OK
caution
The energy fields might be equal to 0 if the chargebox does not provide metering data related to the charges.
#
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. |
500 | InternalServerError | Something unexpected went wrong while executing the request. |
#
Enums#
MethodThese are the possible types of payment method:
"stripe"
for charges started with Stripe"paypal"
for charges started with PayPal"nayax"
for charges started with Nayax"free"
for charges started from Thor dashboardnull
for charges started on a chargebox with a free payment payment set from webappundefined
for charges started with a RFID card
#
ChargeTypeThese are the possible types of charge:
remote
for charges started using the web applocal
for charges started using an RFID cardapi
for charges started using an API request