visits
Requires at least one of the permissions visits:journey-plan:manage or visits:visit:read.
Lists the organization's customer visits, newest day first, within the caller's visibility: every rep's for whoever sees the whole organization, otherwise the caller's team. Filter by days, rep, customer or status, or sync with updatedAfter and cursor. Requires permission to view visits or to manage journey plans.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query Visits {
visits {
total
items {
id
partnerName
status
createdAt
completedAt
hasUnreadMessage
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Visits {\n visits {\n total\n items {\n id\n partnerName\n status\n createdAt\n completedAt\n hasUnreadMessage\n }\n }\n}"
}
EOF
Response:
{
"data": {
"visits": {
"total": 0,
"items": [
{
"id": "id",
"partnerName": "string",
"status": "CANCELLED",
"createdAt": "2025-01-15T00:00:00Z",
"completedAt": "2025-01-15T00:00:00Z",
"hasUnreadMessage": true
}
]
}
}
}
visits(
filter: VisitListFilterInput
skip: Int
take: Int
): VisitListPage!
Arguments
visits.filter ● VisitListFilterInput input
Optional filters and the sync fields.
visits.skip ● Int scalar
How many visits to skip. Ignored when syncing.
visits.take ● Int scalar
How many visits to return, up to 200. Defaults to 50.
Type
VisitListPage object
One page of the visits list.