Skip to main content

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:

NameDefault valueAccepted ValuesDescription
chargeboxnullAny valid chargebox IDReturns only the reservations for the given chargebox
[//]: # (usernullAny valid user ID

Response format#

The response is an array of chargeboxes, each containing the following fields:

Field nameTypeDescription
countIntegerThe number of reservations found
itemsArrayThe list of all the reservations found
items[].date_acceptedIntegerThe time in ms epoch format of the date of reservation accepted.
items[].paymentObjectThe reservation payment.
items[].payment.methodObjectThe reservation payment method.
items[].payment.transactionObjectThe reservation payment transaction code.
items[].userStringThe user plays the reservation.
items[].id_tagStringThe idTag of the reservation.
items[].expiry_dateIntegerThe time in ms epoch format of the date of reservation expiration.
items[].clientStringThe client owner of the chargebox.
items[].statusIntegerThe current state of the reservation.
items[].chargeboxStringThe chargebox reserved.
items[].connectorIntegerThe connector reserved.

A succesful response is returned with an HTTP status code 200 - OK

Example response#

{
"date_accepted": 1634305373064,
"payment": {
"method": "stripe",
"transaction": "pi_1IRbAxF4cj9Jhreuipv"
},
"user": "test-12",
"id_tag": "17c8430f387t7tim5m",
"expiry_date": 1634326952000,
"client": "test",
"chargebox": "smartbit-17490adfa4f",
"connector": 1
}

Error response#

The following errors are returned if something went wrong while processing the request:

HTTP status codeMessageDescription
400BoundsTooBigThe coordinates bounds given in the querystring are too big. The latitude and longitude ranges must be less than or equal to 2.
403APIKeyNotFoundAn invalid API key was given in the header of the request.
403RestAPINotEnabledREST API integration is set as disabled in the administration dashboard.
403InvalidSourceIPAddrThe request comes from an IP address that is different from the one given in the REST API integration configuration.
500InternalServerErrorSomething unexpected went wrong while executing the request.