Skip to main content

cancelVisit

Requires permission visits:visit:execute.

Removes one of the signed-in rep's remaining stops for today that has not been checked in. The stop is cancelled and disappears from the rep's list. Requires permission to run visits.

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:

mutation CancelVisit($visitId: ID!) {
cancelVisit(visitId: $visitId) {
id
partnerName
status
createdAt
completedAt
hasUnreadMessage
checkIns {
id
createdAt
checkInAt
checkOutAt
checkOutLatitude
checkOutLongitude
}
}
}

Variables:

{
"visitId": "id"
}

Response:

{
"data": {
"cancelVisit": {
"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
}
]
}
}
}
cancelVisit(
visitId: ID!
): Visit!

Arguments​

cancelVisit.visitId ● ID! non-null scalar​

The ID of the visit.

Type​

Visit object​

A planned or unplanned visit to a customer.