Skip to main content

checkInVisit

Requires permission visits:visit:execute.

Checks the signed-in rep in at a planned visit, with an optional location. An offline replay can send the time the rep tapped and an idempotency key, so the check-in is created exactly once. If an admin cancelled or completed the visit meanwhile, the check-in is still recorded but the status is left unchanged. 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 CheckInVisit($visitId: ID!) {
checkInVisit(visitId: $visitId) {
id
partnerName
status
createdAt
completedAt
hasUnreadMessage
checkIns {
id
createdAt
checkInAt
checkOutAt
checkOutLatitude
checkOutLongitude
}
}
}

Variables:

{
"visitId": "id"
}

Response:

{
"data": {
"checkInVisit": {
"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
}
]
}
}
}
checkInVisit(
clientCheckInAt: DateTime
idempotencyKey: String
latitude: Float
longitude: Float
visitId: ID!
): Visit!

Arguments​

checkInVisit.clientCheckInAt ● DateTime scalar​

When the rep tapped check-in, for an offline replay. The server limits it to a sensible time.

checkInVisit.idempotencyKey ● String scalar​

A key that makes an offline replay create the check-in only once.

checkInVisit.latitude ● Float scalar​

The rep's latitude at check-in. Optional.

checkInVisit.longitude ● Float scalar​

The rep's longitude at check-in. Optional.

checkInVisit.visitId ● ID! non-null scalar​

The ID of the visit.

Type​

Visit object​

A planned or unplanned visit to a customer.