aid_customers_get
Get all customers, limited by parameters. The result will match all parameters with AND. Search is done by prefix match, and + in phone_number/email must be URL encoded, (+4799999999 => %2B4799999999)
Users with type contact are by default excluded from the result, use type=contact or type=any to include contact users
The response from a request that match contact users will include the users that are linked from the contact
scopes:
- admin:customers
- read:customers
Path parameters
An id that uniquely identifies the account.
Query parameters
lookup customers by token value
lookup customer by token type
lookup customer by email
lookup customer by phone_number
lookup customer by type
lookup customer where search term match name, phone number, customer_id or email. The search term will be matched with the user details
lookup customers by tag id
include deleted customers in the response. A deleted user will only have an id/customer_id, created_at/created_by and deleted_at/deleted_by set All other details of a customer, like email or phone_number will be deleted.
include customers that has all the attributes.
Combine with attributes_keys to include customers with match on attribute values
lookup customers that has been added or modified since an ISO timestamp. NOTE: this parameter can't be combined with starting_after parameter. Retrieve next page by updating since_datetime to the latest updated_at value found in the result
A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.
cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, end the result contains paging_token=pt1, your subsequent call can include starting_after=pt1 in order to fetch the next page of the list.
include total-count header in the response
Response
Customer collection
Example response
[
{
"metadata": {
"dob_year": 1985
},
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"enrolled_by": {
"type": "url",
"value": "https://facebook.com"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"addresses": [
{
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"country": "NO",
"latitude": 59.942112,
"longitude": 10.716991,
"comment": "5th floor, use doorbell."
}
],
"company": {
"organization_number": "123456789MVA",
"bussiness_name": "TKP tech AS",
"department": "sales department",
"industry": "computer industry"
},
"gender": "male",
"date_of_birth": "1990-09-20"
}
]