Retrieving all locations

GET {{api-url}}/customer-management/{{tenant}}/locations?pageNumber=1&pageSize=16&sort=name,metadata.createdAt:desc&name=proident&type=WAREHOUSE

Preview Retrieves all locations assigned to the tenant. You can filter, sort and paginate the results with query parameters.


### Required scopes * clientmanagement.location_read

Request Params

KeyDatatypeRequiredDescription
pageNumbernumberThe 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.
pageSizenumberThe number of documents being retrieved on the page.
sortstringFields 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.
namestringLocation name. When specified, only locations 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. | | type | string | | The type of the location. When specified, only contact locations of the specified type will be returned.

Note: When filtering the results with this field, the equals operator is used. |

HEADERS

KeyDatatypeRequiredDescription
X-Total-CountbooleanIn 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.
Acceptstring

RESPONSES

status: OK

[{"id":"627e06ecf0452c2d6c0b81391","name":"Main HQ","type":"HEADQUARTER","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":"627e06ecf0452c2d6c0b81311","name":"Main Warehouse","type":"WAREHOUSE","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}}]