cURL
curl -X GET \
/customers \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"countryCode": "DE",
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"vatId": "DE123456789",
"isVatIdValid": true,
"datevId": "123456789",
"commercialRegisterName": "Amtsgericht Berlin (Charlottenburg)",
"commercialRegisterNumber": "HRB 123456",
"status": "STATUS_ACTIVE",
"gender": "male",
"phone": "+49 123 456789",
"language": "de",
"totalTurnOverRank": 10,
"createdAt": "2020-01-01T00:00:00+00:00",
"customFields": {
"field1": "value1",
"field2": "value2"
},
"businessCustomer": true,
"defaultAddress": {
"id": "<string>",
"vatId": "DE123456789",
"type": "TYPE_DEFAULT",
"default": "true",
"status": "active",
"city": "Berlin",
"zip": "12345",
"street": "Musterstraße",
"houseNumber": "1a",
"countryCode": "DE",
"companyName": "ACME Inc.",
"salutation": "Herr",
"addition": "c/o John Doe",
"costCentre": "123456789",
"firstName": "John",
"lastName": "Doe"
},
"defaultInvoiceAddress": {
"id": "<string>",
"vatId": "DE123456789",
"type": "TYPE_DEFAULT",
"default": "true",
"status": "active",
"city": "Berlin",
"zip": "12345",
"street": "Musterstraße",
"houseNumber": "1a",
"countryCode": "DE",
"companyName": "ACME Inc.",
"salutation": "Herr",
"addition": "c/o John Doe",
"costCentre": "123456789",
"firstName": "John",
"lastName": "Doe"
},
"defaultEmailAddress": {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"type": "TYPE_COMPANY",
"id": "00000000-0000-0000-0000-000000000000",
"default": "true"
},
"defaultInvoiceEmailAddress": {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"type": "TYPE_COMPANY",
"id": "00000000-0000-0000-0000-000000000000",
"default": "true"
},
"defaultPaymentMethod": {},
"isPartner": true,
"parentCustomer": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Klinik Musterstadt"
},
"childrenCount": 3,
"isParent": true,
"isChild": true,
"salesChannel": {
"id": "<string>",
"name": "<string>",
"brandName": "<string>"
}
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}Customer
Get customers
Get customers
Required permissions:customer:readGET
/
customers
cURL
curl -X GET \
/customers \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"countryCode": "DE",
"id": "00000000-0000-0000-0000-000000000000",
"customerNumber": "CUSTOMER-000",
"timeZone": "Europe/Berlin",
"firstName": "John",
"lastName": "Doe",
"currencyCode": "EUR",
"companyName": "Acme Inc.",
"vatId": "DE123456789",
"isVatIdValid": true,
"datevId": "123456789",
"commercialRegisterName": "Amtsgericht Berlin (Charlottenburg)",
"commercialRegisterNumber": "HRB 123456",
"status": "STATUS_ACTIVE",
"gender": "male",
"phone": "+49 123 456789",
"language": "de",
"totalTurnOverRank": 10,
"createdAt": "2020-01-01T00:00:00+00:00",
"customFields": {
"field1": "value1",
"field2": "value2"
},
"businessCustomer": true,
"defaultAddress": {
"id": "<string>",
"vatId": "DE123456789",
"type": "TYPE_DEFAULT",
"default": "true",
"status": "active",
"city": "Berlin",
"zip": "12345",
"street": "Musterstraße",
"houseNumber": "1a",
"countryCode": "DE",
"companyName": "ACME Inc.",
"salutation": "Herr",
"addition": "c/o John Doe",
"costCentre": "123456789",
"firstName": "John",
"lastName": "Doe"
},
"defaultInvoiceAddress": {
"id": "<string>",
"vatId": "DE123456789",
"type": "TYPE_DEFAULT",
"default": "true",
"status": "active",
"city": "Berlin",
"zip": "12345",
"street": "Musterstraße",
"houseNumber": "1a",
"countryCode": "DE",
"companyName": "ACME Inc.",
"salutation": "Herr",
"addition": "c/o John Doe",
"costCentre": "123456789",
"firstName": "John",
"lastName": "Doe"
},
"defaultEmailAddress": {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"type": "TYPE_COMPANY",
"id": "00000000-0000-0000-0000-000000000000",
"default": "true"
},
"defaultInvoiceEmailAddress": {
"email": "john.doe@example.com",
"receiverName": "John Doe",
"type": "TYPE_COMPANY",
"id": "00000000-0000-0000-0000-000000000000",
"default": "true"
},
"defaultPaymentMethod": {},
"isPartner": true,
"parentCustomer": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Klinik Musterstadt"
},
"childrenCount": 3,
"isParent": true,
"isChild": true,
"salesChannel": {
"id": "<string>",
"name": "<string>",
"brandName": "<string>"
}
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Abfrageparameter
The collection page number
The number of items per page
Erforderlicher Bereich:
0 <= x <= 100Filter by parent customer ID. Returns only direct children of the specified parent.
Filter customers that have child customers (true) or do not have child customers (false).
Filter customers that have a parent customer (true) or are root-level customers (false).
War diese Seite hilfreich?
⌘I