Skip to main content
GET
/
v2
/
transactions
Get a list of transactions
curl --request GET \
  --url https://api.spirii.com/v2/transactions \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "auth": {
        "idTag": {
          "uid": "<string>",
          "id": 123,
          "type": "<string>",
          "label": "<string>",
          "customerId": 123,
          "operatorId": 123,
          "companyId": 123,
          "familyTreeCompanyIds": [
            "<string>"
          ],
          "crmCustomerId": 123,
          "comment": "<string>",
          "billingReference": "<string>",
          "customerCrmCustomerId": 123,
          "companyCrmCustomerId": 123,
          "operator": {
            "id": 123,
            "name": "<string>",
            "crmId": 123
          },
          "company": {
            "id": 123,
            "name": "<string>"
          },
          "customer": {
            "id": 123,
            "firstName": "<string>",
            "lastName": "<string>",
            "operator": {
              "id": 123,
              "name": "<string>"
            },
            "company": {
              "id": 123,
              "name": "<string>"
            },
            "familyTreeCompanyIds": [
              "<string>"
            ]
          }
        }
      },
      "chargeBoxId": 123,
      "chargingDetails": {
        "consumed": 123,
        "meterStart": 123,
        "meterStop": 123,
        "co2Emitted": 123,
        "highestPowerDrawn": 123,
        "vehicleStateOfCharge": {}
      },
      "company": {
        "id": 123456,
        "name": "Spirii"
      },
      "duration": {
        "charging": 123,
        "idle": 123,
        "total": 123
      },
      "evseId": "FR.SPI.Z000001*1",
      "id": 123456,
      "isRoaming": true,
      "location": {
        "id": 654321,
        "name": "Boulevard Garibaldi",
        "address": "14-16 Boulevard Garibaldi",
        "zipCode": "12345",
        "city": "Paris",
        "crmId": 123,
        "crmCustomerId": 123,
        "isEligibleForRefund": true,
        "countryCode": "FR"
      },
      "price": {
        "amount": 100.5,
        "amountExVat": 80.9,
        "currency": "EUR",
        "vatRate": 19.6,
        "isDynamic": true,
        "perKwh": 0.5
      },
      "startedAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "isPriority": true,
      "appUserId": 123,
      "endedAt": "2023-11-07T05:31:56Z",
      "roamingDetails": {
        "roamingOperator": "<string>",
        "roamingEvcoId": "<string>",
        "roamingIdTagUid": "<string>",
        "sessionStatus": "<string>",
        "type": "Hubject",
        "sessionPayload": {}
      },
      "tariff": {
        "id": "79804bf6-0d6d-4e74-ae00-16c7238c4e77",
        "name": "Spirii Tariff",
        "type": "standard"
      },
      "voucher": {
        "id": 123,
        "groupId": 123,
        "code": "<string>"
      },
      "voucherGroup": {
        "id": 123,
        "type": "<string>",
        "name": "<string>",
        "notes": "<string>",
        "perKwh": 123,
        "currency": "<string>"
      }
    }
  ],
  "nextPageCursor": "2000-01-01T00:00:00.000Z-123456",
  "previousPageCursor": "2000-01-01T00:00:00.000Z-123456"
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <SPIRII_API_KEY>

Query Parameters

nextPageCursor
string<<date-time>--<transactionId>>

Cursor to be used to request the next page.

Example:

"2000-01-01T00:00:00.000Z-123456"

previousPageCursor
string<<date-time>--<transactionId>>

Cursor to be used to request the previous page.

Example:

"2000-01-01T00:00:00.000Z-123456"

limit
integer
default:500

Limit returned amount of transactions.

Required range: 1 <= x <= 2500
locationId
integer

Filter by a location ID.

locationType
enum<string>

Filter by a location type.

Available options:
PublicRoad,
Residential,
ParkingLot,
ParkingLotIndoor,
ParkingLotUnderground,
Hotel
transactionType
enum<string>

Filter by a transaction type.

Available options:
roamingEmp,
roamingCpo,
roaming,
nonRoaming
idTagUid
string

Filter by an IdTag unique ID.

appUserId
integer

Filter by an app user ID.

voucherId
integer

Filter by voucher ID.

startedAt
string<date-time>

Filter transactions started from the specified timestamp. When this filter is applied, results are sorted by startedAt in ascending order by default, unless another sortBy parameter is provided.

Example:

"2000-12-01T00:00:00.000Z"

updatedAt
string<date-time>

Filter transactions updated from the specified timestamp. When this filter is applied, results are sorted by updatedAt in ascending order by default, unless another sortBy parameter is provided.

Example:

"2000-12-01T00:00:00.000Z"

updatedAtMax
string<date-time>

Filter transactions up to the specified updated time. When this filter is applied, results are sorted in ascending order by updatedAt by default, unless another sortBy parameter is specified.

Example:

"2000-12-01T00:00:00.000Z"

endedAt
string<date-time>

Filter transactions ended from the specified timestamp. When this filter is applied, results are sorted by endedAt in ascending order by default, unless another sortBy parameter is provided.

Example:

"2000-12-01T00:00:00.000Z"

endedAtMax
string<date-time>

Filter transactions up to the specified end time. When this filter is applied, results are sorted in ascending order by endedAtMax by default, unless another sortBy parameter is specified

Example:

"2000-12-01T00:00:00.000Z"

evseId
string

Filter by an EVSE ID.

chargeBoxId
integer

Filter by an Charge Box ID.

sortBy
enum<string>
default:createdAt

When set, returned transactions will be sorted by one of the available property, descending.

Available options:
createdAt,
startedAt,
updatedAt,
endedAt
ongoing
boolean
default:false

Filter transactions that are still ongoing. A transaction is considered ongoing if it remains incomplete, such as when the electric vehicle is still charging or the cable is still connected.

priority
enum<number>

Retrieve only priority/non-priority transactions

Available options:
0,
1

Response

data
object[]
required
nextPageCursor
string<<date-time>-<uuid>>
Example:

"2000-01-01T00:00:00.000Z-123456"

previousPageCursor
string<<date-time>-<uuid>>
Example:

"2000-01-01T00:00:00.000Z-123456"