Skip to main content
GET
/
v2
/
customers
cURL
curl --request GET \
  --url https://api.spirii.com/v2/customers \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "name": "John Smith",
      "contactDetails": {
        "name": "John Smith",
        "email": "john.smith@email.com",
        "phone": "+11 22 33 44"
      },
      "billingDetails": {
        "paymentMethod": "Invoice",
        "invoiceFormat": "Email",
        "gln": "0799439112768",
        "invoiceEmail": "john.smith@email.com",
        "vatNumber": "87687766",
        "address": "Street Avenue, 123",
        "city": "Copenhagen",
        "zipCode": "2300"
      },
      "id": 123,
      "cpo": {
        "id": 123,
        "name": "Charge Point Operator Inc."
      },
      "locations": [
        1,
        2,
        3
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "externalId": "CU-12345",
      "country": "DK",
      "payoutInformation": {
        "iban": "DK5000400440116243",
        "swiftCode": "ROYCCAT2XXX",
        "bankAccountHolderName": "John Smith",
        "bankRegistrationNumber": "1234",
        "bankAccount": "1234567890"
      },
      "financialSetup": {
        "language": "EN",
        "currency": "EUR"
      },
      "billingSettings": {
        "chargeKeyDocumentAggregation": "customer",
        "chargeKeyLineAggregation": "location",
        "companyCarReimbursementMethod": "MANUAL"
      },
      "owner": {
        "id": 234,
        "name": "Company Inc."
      }
    }
  ],
  "count": 123,
  "limit": 123,
  "offset": 123
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <SPIRII_API_KEY>

Query Parameters

limit
integer
default:50

Filter the total amount of items returned.

offset
integer
default:0

Skip the first N items in the result set.

sortBy
enum<string>
default:id

When set, returned customers will be sorted by one of the available properties, descending if not otherwise specified by sortDirection. When used with createdAt* default is createdAt. When used with updatedAt* default is updatedAt (even if combined with createdAt*).

Available options:
id,
name,
type,
ownerName,
cpoName,
createdAt,
updatedAt
sortDirection
enum<string>
default:desc

When set, returned customers will be sorted either descending or ascending. When used with createdAtFrom or updateAtFrom, default is asc.

Available options:
desc,
asc

Search across customer names and IDs. This includes externalId.

customerIds
integer[]

Ids of the customers to return. Other filters (and permissions requirement) will still apply.

types
enum<string>[]

Types of the customers to filter. Multiple types can be selected.

Available options:
Private,
Business,
CPO,
CPOSubsidiary
ownerId
integer

ID of the owner of the customer, also known as parent. This will return direct descendant of the provided customer ID. Only available for filtering if you are the owner or have appropriate permissions.

ownedBy
integer

ID of the owner of the customer, also known as parent. This will return all customers owned by this ownerId. Only available for filtering if you are the owner or have appropriate permissions.

cpoId
integer

ID of the CPO above the customer, also known as Operator. Only available for filtering if you are the CPO or have appropriate permissions.

createdAt
string<date-time>

Creation date of the customer.

createdAtFrom
string<date-time>

Start date for filtering by creation date. When set, filter sortBy defaults to createdAt.

createdAtTo
string<date-time>

End date for filtering by creation date. When set, filter sortBy defaults to createdAt.

updatedAt
string<date-time>

Last update date of the customer.

updatedAtFrom
string<date-time>

Start date for filtering by last update date. When set, filter sortBy defaults to updatedAt.

updatedAtTo
string<date-time>

End date for filtering by last update date. When set, filter sortBy defaults to updatedAt.

Response

data
object[]
required

Array of Customer objects.

count
integer
required

Total count of customers.

limit
integer
required

Limit of customers per page.

offset
integer
required

Offset for pagination.