# listCustomersLocations

Get customers and their associated locations with pagination and filtering

`GET /v2/customers/locations`

**API:** Avalara MyLodgeTax API
**Tag:** Customer Information
**API Version:** v1.2
**Base URL:** https://mylodgetaxapi-sbx.avalara.net
**Content-Type:** `application/json`
**Authentication:** API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/mylodge/api/methods/Customer%20Information/listCustomersLocations/

## Description

Returns a paginated list of customers, where each customer includes their associated location IDs. Supports optional filtering by date range, sorting by creation date, and pagination using page and pageSize parameters.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `startDate` | string | query | No | Start date in YYYY-MM-DD format. Optional parameter. Filters customers created on or after this date. |
| `endDate` | string | query | No | End date in YYYY-MM-DD format. Optional parameter. Filters customers created on or before this date. |
| `skip` | integer | query | No | Number of records to skip for pagination. Must be >= 0. Defaults to 0 if not provided. |
| `take` | integer | query | No | Number of records to return per page. Must be between 1 and 1000. Defaults to 50 if not provided. |
| `sortColumn` | string | query | No | Field to sort by. Valid values are 'createddate' or 'customerid'. |
| `sortDirection` | string | query | No | Sort order. Valid values are 'asc' or 'desc'. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK |  |
| 400 | Bad request. Possible reasons: Invalid date format (must be YYYY-MM-DD), Invalid skip value (must be >= 0), Invalid take value (must be between 1 and 1000), Invalid sortBy value (must be 'createddate' or 'customerid'), Invalid sortOrder value (must be 'asc' or 'desc') | `ErrorResponse` |
| 401 | Unauthorized | `ErrorResponse` |
| 404 | No data found for the given parameters | `ErrorResponse` |
| 500 | Internal Server Error | `ErrorResponse` |

## Example Request

```bash
curl -X GET "https://mylodgetaxapi-sbx.avalara.net/v2/customers/locations" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```