Retrieving all contacts
GET {{api-url}}/customer-management/{{tenant}}/contacts?pageNumber=1&pageSize=16&sort=name,metadata.createdAt:desc&name=proident&surname=proident&contactDetails.email=proident&contactDetails.phone=proident&contactDetails.address=proident&contactDetails.city=proident&contactDetails.state=proident&contactDetails.postcode=proident&contactDetails.countryCode=proident
Retrieves all contacts assigned to the tenant. You can filter, sort and paginate the results with query parameters.
### Required scopes
* clientmanagement.contact_read
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
pageNumber | number | The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. | |
The number of the first page is 1. | |||
pageSize | number | The number of documents being retrieved on the page. | |
sort | string | Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case. | |
name | string | Contact name. When specified, only contacts containing the specified name will be returned. |
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| surname
| string | | Contact name. When specified, only contacts containing the specified surname will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.email
| string | | The email of the contact. When specified, only contact details containing the specified email will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.phone
| string | | The phone number of the contact. When specified, only contact details containing the specified phone number will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.address
| string | | The address of the contact. When specified, only contact details containing the specified address will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.city
| string | | The address of the contact. When specified, only contact details containing the specified city will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.state
| string | | The address of the contact. When specified, only contact details containing the specified state will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.postcode
| string | | The postcode of the contact. When specified, only contact details containing the specified postcode will be returned.
Note: When filtering the results with this field, the contains
operator is used. The operator is case-insensitive.
|
| contactDetails.countryCode
| string | | The country code of the contact. When specified, only contact details having the specified country code will be returned.
Note: When filtering the results with this field, the equals
operator is used.
|
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Total-Count | boolean | In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn’t ask for it. | |
Accept | string |
RESPONSES
status: OK
[{"id":"627e06ecf0452c2d6c0b81391","name":"John","surname":"Doe","customer":{"id":"john-doe-customer","name":"JohnCustomer","surname":"DoeCustomer"},"contactDetails":{"emails":["jon.doe@example.com","adam.smith@sample.org"],"phones":[1234567890,"0123456789"],"addressLine1":"W Sample St","addressLine2":"3601-3799","city":"South Bend","state":"Indiana","postcode":46619,"countryCode":"US"},"metadata":{"createdAt":"2022-03-31T13:18:02.379Z","modifiedAt":"2022-03-31T13:18:02.379Z","version":1}},{"id":"123e06ecf0452c2d6c0b81390","name":"Adam","surname":"Smith","contactDetails":{"emails":["adam.klein@email.com","dirk.davis@mail.org"],"phones":[6475837467,"0987654321"],"addressLine1":"Dircksenstraße","addressLine2":136,"city":"Berlin","state":"Berlin","postcode":10178,"countryCode":"DE"},"metadata":{"createdAt":"2022-04-31T13:18:02.379Z","modifiedAt":"2022-05-31T13:18:02.379Z","version":2}}]