Skip to main content
GET
/
v2
/
tokens
Get a list of tokens
curl --request GET \
  --url https://api.spirii.com/v2/tokens \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "id": 67890,
      "customerId": 67890,
      "identifier": {
        "type": "rfid",
        "uid": "A7E942F1C8D036B5A429",
        "label": "DK.SPI.V03198",
        "appUserId": 12345
      },
      "createdAt": "2025-06-03T12:00:00.000Z",
      "updatedAt": "2025-06-03T12:00:00.000Z",
      "validFrom": "2025-06-03T12:00:00.000Z",
      "expiresAt": "2025-12-31T23:59:59.999Z",
      "isActive": true,
      "roamingEnabled": true,
      "priorityChargingEnabled": true,
      "billingReference": "Bil 246",
      "comment": "This is a comment",
      "tokenGroupIds": [
        1,
        2,
        5
      ]
    }
  ],
  "count": 2
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <SPIRII_API_KEY>

Query Parameters

Search for tokens by tokenId, label or uid.

Maximum string length: 50
Example:

"DK.SPI.V03198"

type
enum<string>

Filter by token type.

Available options:
rfid,
virtual,
vehicleId
customerId
integer<integer>

Filter by a specific customer ID.

Required range: x >= 1
Example:

67890

isActive
boolean

Filter by active or inactive tokens.

roamingEnabled
boolean

Filter by roaming enabled or disabled.

priority
boolean

Retrieve only priority/non-priority tokens.

validFrom
string<date-time>

Filter for tokens valid from the specified timestamp.

Example:

"2025-12-31T23:59:59Z"

expiresFrom
string<date-time>

Filter for tokens expiring from the specified timestamp.

Example:

"2025-12-31T23:59:59Z"

sortBy
enum<string>
default:id

When set, returned tokens will be sorted by one of the available properties.

Available options:
id,
createdAt,
updatedAt,
validFrom,
expiresAt
sortDirection
enum<string>
default:desc

Set the direction of sorting.

Available options:
asc,
desc
offset
number
default:0

Skip the first N items in the result set.

Required range: x >= 0
limit
number
default:500

Limit the returned amount of tokens.

Required range: 1 <= x <= 1000

Response

The returned list of tokens.

data
object[]
required

A list of Tokens.

count
integer
required

Total number of tokens matching the query.

Required range: x >= 1