myVisitsRange
Requires an authenticated session.
Lists the signed-in rep's customer visits over a date range. The start must not be after the end, and the range is limited in length. Only the caller's own visits are returned.
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 MyVisitsRange($dateFrom: DateTime!, $dateTo: DateTime!) {
myVisitsRange(dateFrom: $dateFrom, dateTo: $dateTo) {
id
partnerName
status
createdAt
completedAt
hasUnreadMessage
checkIns {
id
createdAt
checkInAt
checkOutAt
checkOutLatitude
checkOutLongitude
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MyVisitsRange($dateFrom: DateTime!, $dateTo: DateTime!) {\n myVisitsRange(dateFrom: $dateFrom, dateTo: $dateTo) {\n id\n partnerName\n status\n createdAt\n completedAt\n hasUnreadMessage\n checkIns {\n id\n createdAt\n checkInAt\n checkOutAt\n checkOutLatitude\n checkOutLongitude\n }\n }\n}",
"variables": {
"dateFrom": "2025-01-15T00:00:00Z",
"dateTo": "2025-01-15T00:00:00Z"
}
}
EOF
Variables:
{
"dateFrom": "2025-01-15T00:00:00Z",
"dateTo": "2025-01-15T00:00:00Z"
}
Response:
{
"data": {
"myVisitsRange": [
{
"id": "id",
"partnerName": "string",
"status": "CANCELLED",
"createdAt": "2025-01-15T00:00:00Z",
"completedAt": "2025-01-15T00:00:00Z",
"hasUnreadMessage": true,
"checkIns": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"checkInAt": "2025-01-15T00:00:00Z",
"checkOutAt": "2025-01-15T00:00:00Z",
"checkOutLatitude": 0,
"checkOutLongitude": 0
}
]
}
]
}
}
myVisitsRange(
dateFrom: DateTime!
dateTo: DateTime!
): [Visit!]!
Arguments
myVisitsRange.dateFrom ● DateTime! non-null scalar
The first day of the range.
myVisitsRange.dateTo ● DateTime! non-null scalar
The last day of the range.
Type
Visit object
A planned or unplanned visit to a customer.