Get reservations
Description#
This endpoint is used to get your reservations general registry.
Request format#
Method: GET
Endpoint: https://api.thor.tools/latest/integration/reservations
Querystring parameters:
| Name | Default value | Accepted Values | Description |
|---|---|---|---|
| chargebox | null | Any valid chargebox ID | Returns only the reservations for the given chargebox |
| [//]: # ( | user | null | Any valid user ID |
Response format#
The response is an array of chargeboxes, each containing the following fields:
| Field name | Type | Description |
|---|---|---|
| count | Integer | The number of reservations found |
| items | Array | The list of all the reservations found |
| items[].date_accepted | Integer | The time in ms epoch format of the date of reservation accepted. |
| items[].payment | Object | The reservation payment. |
| items[].payment.method | Object | The reservation payment method. |
| items[].payment.transaction | Object | The reservation payment transaction code. |
| items[].user | String | The user plays the reservation. |
| items[].id_tag | String | The idTag of the reservation. |
| items[].expiry_date | Integer | The time in ms epoch format of the date of reservation expiration. |
| items[].client | String | The client owner of the chargebox. |
| items[].status | Integer | The current state of the reservation. |
| items[].chargebox | String | The chargebox reserved. |
| items[].connector | Integer | The connector reserved. |
A succesful response is returned with an HTTP status code 200 - OK
Example response#
Error response#
The following errors are returned if something went wrong while processing the request:
| HTTP status code | Message | Description |
|---|---|---|
| 400 | BoundsTooBig | The coordinates bounds given in the querystring are too big. The latitude and longitude ranges must be less than or equal to 2. |
| 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. |