> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itspropel.com/llms.txt.
> For full documentation content, see https://docs.itspropel.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itspropel.com/_mcp/server.

# Get Customer Locations

GET https://crm/customers/%7Bcustomer_id%7D/locations

Retrieve all locations associated with a specific customer. Supports filtering by location type, status, geographic area, and includes pagination. Use include parameter to load related services, contacts, and equipment data.

Reference: https://docs.itspropel.com/propel-biz/05-crm/customers/customer-location-management/get-customer-locations

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: PropelBiz
  version: 1.0.0
paths:
  /crm/customers/%7Bcustomer_id%7D/locations:
    get:
      operationId: get-customer-locations
      summary: Get Customer Locations
      description: >-
        Retrieve all locations associated with a specific customer. Supports
        filtering by location type, status, geographic area, and includes
        pagination. Use include parameter to load related services, contacts,
        and equipment data.
      tags:
        - >-
          subpackage_05Crm.subpackage_05Crm/customers.subpackage_05Crm/customers/customerLocationManagement
      parameters:
        - name: include
          in: query
          description: 'Optional: Include related data (services,contacts,equipment)'
          required: false
          schema:
            type: string
        - name: sort
          in: query
          description: 'Optional: Sort order (created_at,-updated_at,is_primary,city,state)'
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: 'Optional: Page number for pagination'
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          description: 'Optional: Items per page (max 100)'
          required: false
          schema:
            type: integer
        - name: '{{tenant_key_name}}'
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/05 CRM_Customers_Customer Location
                  Management_Get Customer Locations_Response_200
servers:
  - url: https:/
components:
  schemas:
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAudit:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        created_by:
          type: integer
        deleted_at:
          description: Any type
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: integer
      required:
        - created_at
        - created_by
        - updated_at
        - updated_by
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAudit
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsFlags:
      type: object
      properties:
        is_billing_address:
          type: boolean
        is_primary_location:
          type: boolean
      required:
        - is_billing_address
        - is_primary_location
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsFlags
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAccess:
      type: object
      properties:
        gate_code:
          description: Any type
        instructions:
          type: string
        lockbox_code:
          description: Any type
        parking_instructions:
          type: string
      required:
        - instructions
        - parking_instructions
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAccess
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAddress:
      type: object
      properties:
        city:
          type: string
        state:
          type: string
        county:
          description: Any type
        line_1:
          type: string
        line_2:
          type: string
        country:
          type: string
        postal_code:
          type: string
      required:
        - city
        - state
        - line_1
        - line_2
        - country
        - postal_code
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAddress
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsService:
      type: object
      properties:
        area:
          description: Any type
        zone:
          description: Any type
        zone_id:
          description: Any type
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsService
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCustomer:
      type: object
      properties:
        id:
          type: integer
        display_name:
          type: string
        business_name:
          description: Any type
        customer_type:
          type: string
      required:
        - id
        - display_name
        - customer_type
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCustomer
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsProperty:
      type: object
      properties:
        type:
          type: string
        is_owned:
          type: boolean
        lot_size:
          description: Any type
        occupancy_type:
          type: string
        square_footage:
          description: Any type
      required:
        - type
        - is_owned
        - occupancy_type
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsProperty
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsSeasonal:
      type: object
      properties:
        end_date:
          description: Any type
        is_active:
          description: Any type
        start_date:
          description: Any type
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsSeasonal
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsConditions:
      type: object
      properties:
        dog_on_premises:
          type: boolean
        special_hazards:
          description: Any type
      required:
        - dog_on_premises
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsConditions
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCoordinates:
      type: object
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - latitude
        - longitude
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCoordinates
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCreatedByUser:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - email
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCreatedByUser
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsUpdatedByUser:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - email
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsUpdatedByUser
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
        audit:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAudit
        flags:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsFlags
        access:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAccess
        status:
          type: string
        address:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsAddress
        service:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsService
        customer:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCustomer
        property:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsProperty
        seasonal:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsSeasonal
        conditions:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsConditions
        coordinates:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCoordinates
        customer_id:
          type: string
          format: uuid
        location_code:
          description: Any type
        location_name:
          description: Any type
        location_type:
          type: string
        contacts_count:
          type: integer
        services_count:
          type: integer
        created_by_user:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsCreatedByUser
        updated_by_user:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItemsUpdatedByUser
        work_orders_count:
          type: integer
        customer_projects_count:
          type: integer
      required:
        - id
        - audit
        - flags
        - access
        - status
        - address
        - service
        - customer
        - property
        - seasonal
        - conditions
        - coordinates
        - customer_id
        - location_type
        - contacts_count
        - services_count
        - created_by_user
        - updated_by_user
        - work_orders_count
        - customer_projects_count
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItems
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaLinksItems:
      type: object
      properties:
        url:
          description: Any type
        page:
          description: Any type
        label:
          type: string
        active:
          type: boolean
      required:
        - label
        - active
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaLinksItems
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaCustomerId:
      type: object
      properties:
        id:
          type: integer
        uuid:
          type: string
          format: uuid
        status:
          type: string
        last_name:
          type: string
        tenant_id:
          type: integer
        created_at:
          type: string
          format: date-time
        created_by:
          type: integer
        deleted_at:
          description: Any type
        first_name:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: integer
        do_not_call:
          type: boolean
        do_not_text:
          type: boolean
        lead_source:
          description: Any type
        credit_limit:
          type: string
        display_name:
          type: string
        do_not_email:
          type: boolean
        business_name:
          description: Any type
        credit_status:
          type: string
        customer_type:
          type: string
        customer_since:
          description: Any type
        priority_level:
          type: string
        current_balance:
          type: string
        referral_source:
          description: Any type
        marketing_opt_out:
          type: boolean
        preferred_language:
          type: string
        customer_portal_access:
          type: boolean
        tenant_customer_location_id:
          type: integer
      required:
        - id
        - uuid
        - status
        - last_name
        - tenant_id
        - created_at
        - created_by
        - first_name
        - updated_at
        - updated_by
        - do_not_call
        - do_not_text
        - credit_limit
        - display_name
        - do_not_email
        - credit_status
        - customer_type
        - priority_level
        - current_balance
        - marketing_opt_out
        - preferred_language
        - customer_portal_access
        - tenant_customer_location_id
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaCustomerId
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMeta:
      type: object
      properties:
        to:
          type: integer
        from:
          type: integer
        path:
          type: string
          format: uri
        type:
          type: string
        links:
          type: array
          items:
            $ref: >-
              #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaLinksItems
        total:
          type: integer
        version:
          type: string
        per_page:
          type: integer
        last_page:
          type: integer
        customer_id:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMetaCustomerId
        total_count:
          type: integer
        current_page:
          type: integer
        generated_at:
          type: string
          format: date-time
      required:
        - to
        - from
        - path
        - type
        - links
        - total
        - version
        - per_page
        - last_page
        - customer_id
        - total_count
        - current_page
        - generated_at
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMeta
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaLinks:
      type: object
      properties:
        last:
          type: string
          format: uri
        next:
          description: Any type
        prev:
          description: Any type
        self:
          type: string
          format: uri
        first:
          type: string
          format: uri
        customer:
          type: string
          format: uri
      required:
        - last
        - self
        - first
        - customer
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaLinks
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsFlags:
      type: object
      properties:
        with_dogs:
          type: integer
        with_hazards:
          type: integer
        owned_properties:
          type: integer
        rented_properties:
          type: integer
        with_access_codes:
          type: integer
      required:
        - with_dogs
        - with_hazards
        - owned_properties
        - rented_properties
        - with_access_codes
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsFlags
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByType:
      type: object
      properties:
        billing:
          type: integer
        mailing:
          type: integer
        primary:
          type: integer
        service:
          type: integer
        shipping:
          type: integer
        secondary:
          type: integer
      required:
        - billing
        - mailing
        - primary
        - service
        - shipping
        - secondary
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByType
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsSeasonal:
      type: object
      properties:
        total_seasonal:
          type: integer
        currently_active:
          type: integer
      required:
        - total_seasonal
        - currently_active
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsSeasonal
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByStatus:
      type: object
      properties:
        active:
          type: integer
        inactive:
          type: integer
        seasonal:
          type: integer
        pending_verification:
          type: integer
      required:
        - active
        - inactive
        - seasonal
        - pending_verification
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByStatus
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByPropertyType:
      type: object
      properties:
        mixed_use:
          type: integer
        commercial:
          type: integer
        industrial:
          type: integer
        residential:
          type: integer
        vacant_land:
          type: integer
      required:
        - mixed_use
        - commercial
        - industrial
        - residential
        - vacant_land
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByPropertyType
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsServiceCoverage:
      type: object
      properties:
        unassigned:
          type: integer
        unique_zones:
          type: integer
        assigned_to_zones:
          type: integer
      required:
        - unassigned
        - unique_zones
        - assigned_to_zones
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsServiceCoverage
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStats:
      type: object
      properties:
        flags:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsFlags
        by_type:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByType
        seasonal:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsSeasonal
        by_status:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByStatus
        by_property_type:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsByPropertyType
        service_coverage:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStatsServiceCoverage
      required:
        - flags
        - by_type
        - seasonal
        - by_status
        - by_property_type
        - service_coverage
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStats
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummaryCoverage:
      type: object
      properties:
        cities:
          type: integer
        states:
          type: array
          items:
            type: string
        service_zones:
          type: integer
      required:
        - cities
        - states
        - service_zones
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummaryCoverage
    CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummary:
      type: object
      properties:
        coverage:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummaryCoverage
        has_coordinates:
          type: integer
        total_locations:
          type: integer
        billing_location:
          description: Any type
        primary_location:
          description: Any type
      required:
        - coverage
        - has_coordinates
        - total_locations
      title: >-
        CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummary
    05 CRM_Customers_Customer Location Management_Get Customer Locations_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaDataItems
        meta:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaMeta
        links:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaLinks
        stats:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaStats
        summary:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocationsGetResponsesContentApplicationJsonSchemaSummary
      required:
        - data
        - meta
        - links
        - stats
        - summary
      title: >-
        05 CRM_Customers_Customer Location Management_Get Customer
        Locations_Response_200

```

## SDK Code Examples

```python 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
import requests

url = "https://https/crm/customers/%7Bcustomer_id%7D/locations"

querystring = {"include":"services,contacts","sort":"is_primary,-created_at","page":"1","per_page":"10"}

headers = {"{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
const url = 'https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10';
const options = {
  method: 'GET',
  headers: {'{{tenant_key_name}}': '{{tenant_key_value1}}|{{tenant_key_value2}}'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
require 'uri'
require 'net/http'

url = URI("https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["{{tenant_key_name}}"] = '{{tenant_key_value1}}|{{tenant_key_value2}}'

response = http.request(request)
puts response.read_body
```

```java 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10")
  .header("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")
  .asString();
```

```php 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10', [
  'headers' => [
    '{{tenant_key_name}}' => '{{tenant_key_value1}}|{{tenant_key_value2}}',
  ],
]);

echo $response->getBody();
```

```csharp 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
using RestSharp;

var client = new RestClient("https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10");
var request = new RestRequest(Method.GET);
request.AddHeader("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}");
IRestResponse response = client.Execute(request);
```

```swift 05 CRM_Customers_Customer Location Management_Get Customer Locations_example
import Foundation

let headers = ["{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}"]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/crm/customers/%7Bcustomer_id%7D/locations?include=services%2Ccontacts&sort=is_primary%2C-created_at&page=1&per_page=10")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```