visitMessages
Requires an authenticated session.
Lists the signed-in user's notifications about one specific visit, such as a message from an admin on that stop.
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 VisitMessages($visitId: ID!) {
visitMessages(visitId: $visitId) {
id
title
type
createdAt
body
entityId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query VisitMessages($visitId: ID!) {\n visitMessages(visitId: $visitId) {\n id\n title\n type\n createdAt\n body\n entityId\n }\n}",
"variables": {
"visitId": "id"
}
}
EOF
Variables:
{
"visitId": "id"
}
Response:
{
"data": {
"visitMessages": [
{
"id": "id",
"title": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"body": "string",
"entityId": "string"
}
]
}
}
visitMessages(
visitId: ID!
): [UserNotification!]!
Arguments
visitMessages.visitId ● ID! non-null scalar
The ID of the visit.
Type
UserNotification object
An in-app notification for a staff user. Buyer notifications are a separate type.