Read customers
GET
/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.
GET /customers
curl \
-X GET https://rest.api.24sevenoffice.com/v1/customers \
-H "Authorization: string"
Response examples (200)
# Headers
link: string
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string
# Payload
[
{
"id": 12345,
"name": "ABC Corporation",
"isCompany": true,
"isSupplier": false,
"organizationNumber": "123456789",
"address": {
"visit": {
"street": "Hovedgata 1",
"postalCode": "0123",
"postalArea": "Fornebu",
"countryCode": "NO",
"countrySubdivision": "Viken"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"email": {
"contact": "contact@example.com",
"billing": "billing@example.com"
},
"phone": "+47-12345678",
"createdAt": "2022-01-01 18:00:00.000Z",
"modifiedAt": "2023-12-31 18:00:00.000Z"
},
{
"id": 54321,
"name": "John Doe",
"person": {
"firstName": "John",
"lastName": "Doe"
},
"isCompany": false,
"isSupplier": false,
"address": {
"visit": {
"street": "Hovedgata 2",
"postalCode": "0123",
"postalArea": "Fornebu",
"countryCode": "NO",
"countrySubdivision": "Viken"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"email": {
"contact": "contact@example.com",
"billing": "billing@example.com"
},
"phone": "+47-87654321",
"createdAt": "2022-01-01 18:00:00.000Z",
"modifiedAt": "2023-12-31 18:00:00.000Z"
},
{
"id": 67890,
"name": "XYZ Inc.",
"isCompany": true,
"isSupplier": true,
"organizationNumber": "987654321",
"address": {
"visit": {
"street": "123 Main St, Cityville",
"postalCode": "98101",
"postalArea": "Seattle",
"countryCode": "US",
"countrySubdivision": "Washington"
},
"postal": "{...}",
"billing": "{...}",
"delivery": "{...}"
},
"email": {
"contact": "contact@example.com",
"billing": "billing@example.com"
},
"phone": "+1 555-123-4567",
"createdAt": "2022-01-01 18:00:00.000Z",
"modifiedAt": "2023-12-31 18:00:00.000Z"
}
]