# getCustomerLocationsv2

Provides access to location information for a given customer.

`GET /v2/customers/{customerid}/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/getCustomerLocationsv2/

## Description

The locations endpoint returns status information about all partner location listings for a given customer that have been synced to the MyLodgeTax system.  Locations can be synced via the partnerLeads POST prior to onboarding or the locations PUT after the customer is onboarded.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `customerid` | string | path | Yes | Unique, partner-specific customer identifier assigned when posting a partnerLead (_customerId_). |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `GetCustomerLocationsResponseV2` |
| 400 | Bad request: check response body message for details | `ErrorResponse` |
| 401 | Unauthorized | `ErrorResponse` |
| 404 | Customer Not Found | `ErrorResponse` |
| 429 | Exceeded API Rate Limits | `ErrorResponse` |
| 500 | Unknown Error | `ErrorResponse` |

### 200 Response: `GetCustomerLocationsResponseV2`

Representation of a successful response from a GET /v2/customers/{customerId}/locations

| Property | Type | Required | Description |
|---|---|---|---|
| `locations` | ArrayOfLocationsV2 | No |  |

## Example Request

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