## List Tracker Visits

`print_mail.trackers.retrieve_visits(strid, TrackerRetrieveVisitsParams**kwargs)  -> SyncSkipLimit[TrackerRetrieveVisitsResponse]`

**get** `/print-mail/v1/trackers/{id}/visits`

Retrieve a paginated list of visits for a Tracker.

### Parameters

- `id: str`

- `limit: Optional[int]`

- `search: Optional[str]`

  You can supply any string to help narrow down the list of resources. For example, if you pass `"New York"` (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on `StructuredSearchQuery` for more details.

- `skip: Optional[int]`

### Returns

- `class TrackerRetrieveVisitsResponse: …`

  - `id: str`

    A unique ID prefixed with `tracker_visit_`.

  - `created_at: datetime`

    The UTC time at which this visit was created.

  - `device: str`

    The type of device associated with the visit.

  - `ip_address: str`

    The IP address associated with the visit.

  - `live: bool`

    Indicates if the visit was used in a live order or not.

  - `object: Literal["tracker_visit"]`

    Always `tracker_visit`.

    - `"tracker_visit"`

  - `order_id: str`

    The ID of the order where the interaction occurred.

  - `tracker: str`

    The ID of the tracker related to this visit.

  - `updated_at: datetime`

    The UTC time at which this visit was last updated.

### Example

```python
import os
from postgrid import PostGrid

client = PostGrid(
    print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"),  # This is the default and can be omitted
)
page = client.print_mail.trackers.retrieve_visits(
    id="id",
)
page = page.data[0]
print(page.id)
```

#### Response

```json
{
  "object": "list",
  "limit": 10,
  "skip": 0,
  "totalCount": 1,
  "data": [
    {
      "id": "tracker_visit_123456789abcdefghijklmnopqrstuvwxyz",
      "object": "tracker_visit",
      "live": false,
      "tracker": "tracker_123456789abcdefghijklmnopqrstuvwxyz",
      "orderID": "order_123456789abcdefghijklmnopqrstuvwxyz",
      "device": "Device Unknown",
      "ipAddress": "Unknown IP Address",
      "createdAt": "2020-11-12T23:30:12.581Z",
      "updatedAt": "2020-11-12T23:31:12.581Z"
    }
  ]
}
```
