Reference/Visit

Visit

vis_

A Visit is one Person or Guest at one Place on one day, in the Place's timezone. It holds every arrival and departure recorded that day, so leaving for lunch and coming back is one Visit. status, first_arrived_at and last_departed_at are worked out from the entries. A Guest's Visit names a host.

The Visit object

#fields
Unique identifier for the Visit (vis_).
created_atInstant
Time the Visit was created.
created_byActor
The actor who recorded the Visit's first entry.
The day of the Visit, in the Place's timezone. Can't be changed.
entriesarray of VisitEntry
Every arrival and departure recorded for the Visit, earliest first by occurred_at. Never empty.
objectvisit
Object type. Always visit.
organisationOrganisationId
The Organisation that owns the Place (org_).
placePlaceId
The Place visited (place_). Can't be changed.
statusstringon_siteleft
Whether the person is at the Place, worked out from the latest entry. Lifecycle statuses
Omitted from responses when they don't apply.

Lifecycle statuses

#statuses

Every described status value for visit.

left

The latest entry is a departure.

on_site

The latest entry is an arrival.

Entries Kind values

#entries-kind-values

Every described entries.[].kind value for visit.

arrival

The person arrived at the Place.

departure

The person left the Place.

Entries Source values

#entries-source-values

Every described entries.[].source value for visit.

automatic

Officely signed the person out at the Place's sign-out time, or at the end of the day.

badge

A badge or door access system.

booking_check_in

Someone checked in to a Booking at the Place.

kiosk

A sign-in kiosk at the Place.

manual

Someone recorded it by hand.

qr_code

Someone scanned a QR code.

wifi

A device joined the Place's Wi-Fi.

The Visit object
{
  "created_at": "2026-08-11T09:30:00Z",
  "created_by": {
    "id": "per_009zyr6x",
    "type": "person"
  },
  "date": "2026-08-11",
  "entries": [
    {
      "kind": "arrival",
      "occurred_at": "2026-08-11T09:30:00Z",
      "recorded_at": "2026-08-11T09:30:00Z",
      "recorded_by": {
        "id": "per_01vt15my",
        "type": "person"
      },
      "source": "automatic"
    }
  ],
  "id": "vis_01jhjq6y",
  "object": "visit",
  "organisation": "org_019lxa85",
  "place": "place_01nlsp9i",
  "status": "on_site"
}

Operations

#operations

Methods that change state.

visit.record_arrivaloperation#operation-visit-record-arrival
POST/visits/record-arrival200

Record that a Person or Guest arrived at a Place. Adds the arrival to their Visit for that day at the Place, creating the Visit if it's the first entry.

Requiresvisit.manage
idempotency_keystringOptional
Key that makes the request safe to retry. Once a request with this key succeeds, repeating the same operation with the same key returns that result without running it again, even if other inputs differ. Up to 200 printable ASCII characters, with no leading or trailing spaces.
min length 1max length 200pattern ^[\x21-\x7e](?:[\x20-\x7e]*[\x21-\x7e])?$
guestGuestIdOptional
Guest who arrived or left (gst_). Must belong to the Place's Organisation. Give person or guest, not both.
hostPersonIdOptional
Person responsible for the Guest (per_). Required with guest for the Guest's first entry of the day, and not allowed with person. A Guest's Visit keeps the host it was first recorded with.
occurred_atInstantOptional
Time it happened. Defaults to the Signal's occurred_at when signal is given, otherwise now. Can be up to 5 minutes ahead of now, for devices whose clocks run fast.
personPersonIdOptional
Person who arrived or left (per_). Give person or guest, not both.
placePlaceIdRequired
Place visited (place_).
signalSignalIdOptional
Signal the entry came from (sig_). The entry happens at the Signal's occurred_at, and the Signal's person and place, when set, must match. Recording a Signal that's already on the Visit changes nothing.
sourcestringbadgebooking_check_inkioskmanualqr_codewifiRequired
Where the arrival or departure was recorded from.
curl -X POST https://api.officely.app/visits/record-arrival \
  -H "Authorization: Bearer $OFFICELY_TOKEN" \
  -H "Officely-Version: 2026-08-11" \
  -d '{
    "place": "place_01r174a4",
    "source": "badge"
  }'
visit.record_departureoperation#operation-visit-record-departure
POST/visits/record-departure200

Record that a Person or Guest left a Place. Adds the departure to their Visit for that day at the Place, creating the Visit if no arrival was recorded. A departure from an existing Visit is recorded even if the Place, Person, Guest or host has since been archived or removed.

Requiresvisit.manage
idempotency_keystringOptional
Key that makes the request safe to retry. Once a request with this key succeeds, repeating the same operation with the same key returns that result without running it again, even if other inputs differ. Up to 200 printable ASCII characters, with no leading or trailing spaces.
min length 1max length 200pattern ^[\x21-\x7e](?:[\x20-\x7e]*[\x21-\x7e])?$
guestGuestIdOptional
Guest who arrived or left (gst_). Must belong to the Place's Organisation. Give person or guest, not both.
hostPersonIdOptional
Person responsible for the Guest (per_). Required with guest for the Guest's first entry of the day, and not allowed with person. A Guest's Visit keeps the host it was first recorded with.
occurred_atInstantOptional
Time it happened. Defaults to the Signal's occurred_at when signal is given, otherwise now. Can be up to 5 minutes ahead of now, for devices whose clocks run fast.
personPersonIdOptional
Person who arrived or left (per_). Give person or guest, not both.
placePlaceIdRequired
Place visited (place_).
signalSignalIdOptional
Signal the entry came from (sig_). The entry happens at the Signal's occurred_at, and the Signal's person and place, when set, must match. Recording a Signal that's already on the Visit changes nothing.
sourcestringbadgebooking_check_inkioskmanualqr_codewifiRequired
Where the arrival or departure was recorded from.
curl -X POST https://api.officely.app/visits/record-departure \
  -H "Authorization: Bearer $OFFICELY_TOKEN" \
  -H "Officely-Version: 2026-08-11" \
  -d '{
    "place": "place_014s80ct",
    "source": "badge"
  }'

Queries

#queries

Read methods. Kept apart from operations because only operations change state.

visit.getquery#query-visit-get
GET/visits/:visit200

Retrieve a Visit.

Requiresvisit.read
visitVisitIdRequiredpath
Visit to read (vis_).
curl https://api.officely.app/visits/vis_00qk1xg2 \
  -H "Authorization: Bearer $OFFICELY_TOKEN" \
  -H "Officely-Version: 2026-08-11"
visits.listquery#query-visits-list
GET/visits200

List a Place's Visits on one day. With on_site set to true, this is who's at the Place now. Results are ordered by ID, which isn't chronological.

Requiresvisit.read
afterVisitIdOptionalquery string
Return Visits ordered after this one (vis_). Pass the previous page's next_after.
dateLocalDateRequiredquery string
Day to list, in the Place's timezone.
limitintegerOptionalquery string
How many to return. Defaults to 100; 500 is the maximum.
min 1max 500
on_sitebooleanOptionalquery string
true returns only Visits whose latest entry is an arrival, false only those whose latest entry is a departure. Omit for both.
placePlaceIdRequiredquery string
Place whose Visits to list (place_).
RefusesNo refusal reason. Every accepted request answers with a page, and an empty data array is a result rather than a refusal.
curl "https://api.officely.app/visits?date=2026-08-11&place=place_00l2qzc7" \
  -H "Authorization: Bearer $OFFICELY_TOKEN" \
  -H "Officely-Version: 2026-08-11"

Events

#events

Recorded when something happens to a Visit. The payload is the Event's data.

visit.arrivedevent#event-visit-arrived

Occurs when an arrival is added to a Visit. data is the whole Visit, so status reflects every entry. The new arrival is the entry with the latest recorded_at.

Payload 1
dataVisit
The Visit as it was when the Event was recorded.
Example Event
{
  "actor": {
    "id": "per_01yn0o4c",
    "type": "person"
  },
  "created": "2026-08-11T09:30:00Z",
  "id": "evt_01e7hnv6",
  "name": "visit.arrived",
  "object": "event",
  "sequence": 1,
  "data": {
    "created_at": "2026-08-11T09:30:00Z",
    "created_by": {
      "id": "per_009zyr6x",
      "type": "person"
    },
    "date": "2026-08-11",
    "entries": [
      {
        "kind": "arrival",
        "occurred_at": "2026-08-11T09:30:00Z",
        "recorded_at": "2026-08-11T09:30:00Z",
        "recorded_by": {
          "id": "per_01vt15my",
          "type": "person"
        },
        "source": "automatic"
      }
    ],
    "first_arrived_at": "2026-08-11T09:30:00Z",
    "id": "vis_01jhjq6y",
    "object": "visit",
    "organisation": "org_019lxa85",
    "person": "per_006ts7h6",
    "place": "place_01nlsp9i",
    "status": "on_site"
  }
}
visit.departedevent#event-visit-departed

Occurs when a departure is added to a Visit. data is the whole Visit, so status reflects every entry. The new departure is the entry with the latest recorded_at.

Payload 1
dataVisit
The Visit as it was when the Event was recorded.

Refusal reasons

#refusal-reasons

Every refusal reason defined by visit. The reason is the machine-readable key a caller receives.

CodeCategoryReturned when
guest_not_foundnot_foundNo active Guest matches guest. Archived Guests can't visit.
guest_organisation_mismatchruleguest belongs to a different Organisation from place.
host_not_allowedvalidationhost was given with person. Only a Guest's Visit has a host.
host_not_foundnot_foundNo active Person in the Account matches host.
host_requiredvalidationguest was given without host.
occurred_in_futurevalidationoccurred_at is more than 5 minutes later than now.
person_not_foundnot_foundNo active Person in the Account matches person.
place_not_foundnot_foundNo active Place matches place.
signal_mismatchruleThe Signal's person, place or occurred_at differs from the person, place or occurred_at given.
signal_not_foundnot_foundNo Signal matches signal.
visit_not_foundnot_foundNo Visit matches visit.
visitor_requiredvalidationNeither or both of person and guest were given. Give exactly one.
Refusal body · 404
{
  "error": {
    "category": "not_found",
    "code": "guest_not_found",
    "message": "No active Guest matches guest.",
    "retryable": false
  }
}

The code is the machine-readable refusal reason. Every code in this table is a permanent URL you can link from error toasts and logs.

Value types

#value-types

Published value types owned by Visit, referenced from its fields and inputs.

VisitEntry#visit-entry

Published value type: VisitEntry.

kindstringarrivaldeparture
Whether the entry is an arrival or a departure. Entries Kind values
occurred_atInstant
Time the person arrived or left.
recorded_atInstant
Time the entry was recorded.
recorded_byActor
The actor who recorded the entry.
signalSignalId | nulloptional
The Signal the entry came from (sig_), if any.
sourcestringall 7 values
Where an arrival or departure was recorded from.

REST examples use https://api.officely.app. See Officely-Version for endpoint versioning.