Read customers
Read a list of all customers, including their details, with pagination, or a subset of customers based on query parameters. Whether a customer is a company or a private person is controlled by "isCompany" flag property. The schemas are also slightly different for a company (no "person" property) or a person (no "organizationNumber").
Query parameters
-
limit number(int32)
Maximum length is
100
. Default value is25
. -
isCompany boolean
A flag variable to filter customers by company or person.
-
isSupplier boolean
A flag variable to filter customers by being a supplier or not.
-
modifiedFrom string
Filter customers by date of last modification. Compares dates by greater or equal and accepts dates in ISO8601 format
-
createdFrom string
Filter customers by date created. Compares dates by greater or equal and accepts dates in ISO8601 format
-
sortBy string
Sort customers by field and direction. Takes in a pair of field and direction separated by a colon symbol ':'
Format should match the following pattern:
^(name|createdAt|modifiedAt|organizationNumber|id):(asc|desc)$
.
curl \
-X GET https://rest.api.24sevenoffice.com/v1/customers \
-H "Authorization: string"
[
{
"id": 12345,
"name": "ABC Corporation",
"email": {
"billing": "billing@example.com",
"contact": "contact@example.com"
},
"phone": "+47-12345678",
"address": {
"visit": {
"street": "Hovedgata 1",
"postalArea": "Fornebu",
"postalCode": "0123",
"countryCode": "NO",
"countrySubdivision": "Viken"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"createdAt": "2022-01-01 18:00:00.000Z",
"isCompany": true,
"isSupplier": false,
"modifiedAt": "2023-12-31 18:00:00.000Z",
"organizationNumber": "123456789"
},
{
"id": 54321,
"name": "John Doe",
"email": {
"billing": "billing@example.com",
"contact": "contact@example.com"
},
"phone": "+47-87654321",
"person": {
"lastName": "Doe",
"firstName": "John"
},
"address": {
"visit": {
"street": "Hovedgata 2",
"postalArea": "Fornebu",
"postalCode": "0123",
"countryCode": "NO",
"countrySubdivision": "Viken"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"createdAt": "2022-01-01 18:00:00.000Z",
"isCompany": false,
"isSupplier": false,
"modifiedAt": "2023-12-31 18:00:00.000Z"
},
{
"id": 67890,
"name": "XYZ Inc.",
"email": {
"billing": "billing@example.com",
"contact": "contact@example.com"
},
"phone": "+1 555-123-4567",
"address": {
"visit": {
"street": "123 Main St, Cityville",
"postalArea": "Seattle",
"postalCode": "98101",
"countryCode": "US",
"countrySubdivision": "Washington"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"createdAt": "2022-01-01 18:00:00.000Z",
"isCompany": true,
"isSupplier": true,
"modifiedAt": "2023-12-31 18:00:00.000Z",
"organizationNumber": "987654321"
}
]