> 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 Audit Trail

GET https://crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail

Retrieve detailed audit trail for a specific location showing all changes, activations, deactivations, and administrative actions. Includes who made changes, when they were made, and what was changed. Essential for compliance and historical tracking.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: PropelBiz
  version: 1.0.0
paths:
  /crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail:
    get:
      operationId: get-audit-trail
      summary: Get Audit Trail
      description: >-
        Retrieve detailed audit trail for a specific location showing all
        changes, activations, deactivations, and administrative actions.
        Includes who made changes, when they were made, and what was changed.
        Essential for compliance and historical tracking.
      tags:
        - >-
          subpackage_05Crm.subpackage_05Crm/customers.subpackage_05Crm/customers/customerLocationManagement
      parameters:
        - name: include
          in: query
          description: 'Optional: Include user data who performed the action'
          required: false
          schema:
            type: string
        - name: filter[action]
          in: query
          description: >-
            Optional: Filter by action type
            (created,updated,deleted,activated,deactivated,set_primary,set_billing)
          required: false
          schema:
            type: string
        - name: filter[user_id]
          in: query
          description: 'Optional: Filter by specific user ID who performed actions'
          required: false
          schema:
            type: string
        - name: filter[date_from]
          in: query
          description: 'Optional: Filter actions from date (YYYY-MM-DD)'
          required: false
          schema:
            type: string
        - name: filter[date_to]
          in: query
          description: 'Optional: Filter actions to date (YYYY-MM-DD)'
          required: false
          schema:
            type: string
        - name: sort
          in: query
          description: 'Optional: Sort order (created_at,-created_at,action,user_id)'
          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 Audit Trail_Response_200
servers:
  - url: https:/
components:
  schemas:
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesOld:
      type: object
      properties:
        is_billing_address:
          type: boolean
      required:
        - is_billing_address
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesOld
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesAttributes:
      type: object
      properties:
        is_billing_address:
          type: boolean
      required:
        - is_billing_address
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesAttributes
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChanges:
      type: object
      properties:
        old:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesOld
        attributes:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChangesAttributes
      required:
        - old
        - attributes
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChanges
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsActionBy:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsActionBy
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        action:
          type: string
        changes:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsChanges
        action_by:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItemsActionBy
        updated_at:
          type: string
          format: date-time
      required:
        - action
        - changes
        - action_by
        - updated_at
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItems
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMetaLinksItems:
      type: object
      properties:
        url:
          description: Any type
        page:
          description: Any type
        label:
          type: string
        active:
          type: boolean
      required:
        - label
        - active
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMetaLinksItems
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMeta:
      type: object
      properties:
        to:
          type: integer
        from:
          type: integer
        path:
          type: string
          format: uri
        links:
          type: array
          items:
            $ref: >-
              #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMetaLinksItems
        total:
          type: integer
        per_page:
          type: integer
        last_page:
          type: integer
        current_page:
          type: integer
      required:
        - to
        - from
        - path
        - links
        - total
        - per_page
        - last_page
        - current_page
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMeta
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaLinks:
      type: object
      properties:
        last:
          type: string
          format: uri
        next:
          description: Any type
        prev:
          description: Any type
        first:
          type: string
          format: uri
      required:
        - last
        - first
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaLinks
    05 CRM_Customers_Customer Location Management_Get Audit Trail_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaDataItems
        meta:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaMeta
        links:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DAuditTrailGetResponsesContentApplicationJsonSchemaLinks
      required:
        - data
        - meta
        - links
      title: >-
        05 CRM_Customers_Customer Location Management_Get Audit
        Trail_Response_200

```

## SDK Code Examples

```python 05 CRM_Customers_Customer Location Management_Get Audit Trail_example
import requests

url = "https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail"

querystring = {"include":"user","filter[action]":"updated","filter[user_id]":"","filter[date_from]":"2024-01-01","filter[date_to]":"2024-12-31","sort":"-created_at","page":"1","per_page":"50"}

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 Audit Trail_example
const url = 'https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50';
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 Audit Trail_example
package main

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

func main() {

	url := "https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50"

	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 Audit Trail_example
require 'uri'
require 'net/http'

url = URI("https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50")

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 Audit Trail_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/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50")
  .header("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50', [
  'headers' => [
    '{{tenant_key_name}}' => '{{tenant_key_value1}}|{{tenant_key_value2}}',
  ],
]);

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

```csharp 05 CRM_Customers_Customer Location Management_Get Audit Trail_example
using RestSharp;

var client = new RestClient("https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50");
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 Audit Trail_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/%7Bcustomer_location_id%7D/audit-trail?include=user&filter%5Baction%5D=updated&filter%5Buser_id%5D=&filter%5Bdate_from%5D=2024-01-01&filter%5Bdate_to%5D=2024-12-31&sort=-created_at&page=1&per_page=50")! 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()
```