Skip to content
GbàlejòDocs

Visits

List visits

GET/api/v1/visits
Scope: visits:read

The visit log: visits by the days they are due, site, visitor type, host, status or a search, latest first, a page at a time, with counts for the range.

Example request

curl
curl "https://api.gbalejo.com/api/v1/visits?from=2027-01-01&to=2027-01-31" \
  -H "Authorization: Bearer $GBALEJO_API_KEY"
JavaScript
const query = new URLSearchParams({
  from: '2027-01-01',
  to: '2027-01-31',
});
const response = await fetch(`https://api.gbalejo.com/api/v1/visits?${query}`, {
  headers: {
    Authorization: `Bearer ${process.env.GBALEJO_API_KEY}`,
  },
});
// Problems come back as application/problem+json: type, title, status, detail.
if (!response.ok) throw new Error((await response.json()).detail);
const result = await response.json();

Example response

200 OK
JSON
{
  "visits": [
    {
      "id": "8b0e7c1a-4f2d-4b9e-a6c3-2d1f5e9a7b40",
      "status": "INVITED",
      "source": "INVITE",
      "siteId": "1c4f6a3e-9d2b-4e7a-8f1c-5a3b7d9e2c61",
      "entranceId": "2e7d9b4c-6a1f-4c3e-9b8d-7f2a5c1e3d82",
      "visitor": {
        "id": "3d9a1e7f-5b2c-4f6d-8a3e-1c7b9f4d2e95",
        "name": "Tunde Bakare",
        "email": "tunde.bakare@koralogistics.com",
        "phone": "+2348031234567",
        "company": "Kora Logistics"
      },
      "host": {
        "id": "9e7b3f2a-1d5c-4e8b-a4f7-3b6d2c9e1a74",
        "name": "Chiamaka Eze",
        "department": "Finance"
      },
      "visitorType": {
        "id": "5a2d8e1f-3c7b-4a9d-b6e2-9c4f1a7d3e53",
        "name": "Guest",
        "colour": "blue"
      },
      "expectedStart": "2027-01-14T09:00:00.000Z",
      "expectedEnd": "2027-01-14T11:00:00.000Z",
      "purpose": "Quarterly supplier review",
      "notes": null,
      "groupId": null,
      "seriesId": null,
      "sendEmail": true,
      "includeWifi": false,
      "checkedInAt": null,
      "checkedOutAt": null,
      "createdAt": "2026-12-04T14:20:00.000Z",
      "badgeNumber": null,
      "site": {
        "id": "1c4f6a3e-9d2b-4e7a-8f1c-5a3b7d9e2c61",
        "name": "Victoria Island HQ",
        "timezone": "Africa/Lagos"
      },
      "entrance": {
        "id": "2e7d9b4c-6a1f-4c3e-9b8d-7f2a5c1e3d82",
        "name": "Main lobby"
      }
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 50,
  "from": "2027-01-01",
  "to": "2027-01-31",
  "stats": {
    "total": 1,
    "previousTotal": 3,
    "checkedOut": 0,
    "autoCheckedOut": 0,
    "noShowOrDenied": 0
  }
}

Query parameters

from

string (date)

The first day (YYYY-MM-DD) of the range, by when visits are due to start, in the site’s time zone (the first site’s when no site is chosen). The first day of this month when left out.

to

string (date)

The last day (YYYY-MM-DD) of the range, included. Today when left out.

siteId

string (uuid)

Only visits to this site.

visitorTypeId

string (uuid)

Only visits of this visitor type.

hostId

string (uuid)

Only visits to this host (an employee in the directory).

visitorId

string (uuid)

Only this visitor’s visits.

status

string

Only visits in this status.

INVITEDEXPECTEDPENDING_APPROVALCHECKED_INCHECKED_OUTDENIEDCANCELLEDNO_SHOWAUTO_CHECKED_OUT
q

string, at most 120 characters

Search: the visitor’s name, company or email, or the host’s name, ignoring case; the visitor’s phone too when it has 4 digits or more.

page

integer, at least 1, default 1

The page, from 1.

pageSize

integer, default 50

Visits a page: 25, 50 or 100.

Responses

200 OK

A page of visits, with counts for the range.

visits

array of objects

This page of visits, by when they are due to start, latest first.

visits[].id

string

The visit’s id.

visits[].status

string

Where the visit is: INVITED (a later day), EXPECTED (today), PENDING_APPROVAL (waiting for approval at check-in), CHECKED_IN, CHECKED_OUT, AUTO_CHECKED_OUT (at the site’s end of day), CANCELLED, NO_SHOW or DENIED (refused at check-in).

INVITEDEXPECTEDPENDING_APPROVALCHECKED_INCHECKED_OUTDENIEDCANCELLEDNO_SHOWAUTO_CHECKED_OUT
visits[].source

string

How it was made: INVITE (one invite, in the app or here), BULK (a list), RECURRING (a visit that repeats) or WALK_IN (at the kiosk or the desk).

INVITEBULKRECURRINGWALK_IN
visits[].siteId

string

The site visited.

visits[].entranceId

string or null

The entrance the visitor was asked to use, or null.

visits[].visitor

object

The visitor.

visits[].visitor.id

string

The visitor’s id, the same on each of their visits.

visits[].visitor.name

string

Their name.

visits[].visitor.email

string or null

Their email address.

visits[].visitor.phone

string or null

Their phone number, in international (E.164) form.

visits[].visitor.company

string or null

Their company.

visits[].host

object or null

The employee visited, or null.

visits[].host.id

string

The employee’s id.

visits[].host.name

string

Their name.

visits[].host.department

string or null

Their department.

visits[].visitorType

object

The visitor type.

visits[].visitorType.id

string

The visitor type’s id.

visits[].visitorType.name

string

Its name (Guest, Contractor…).

visits[].visitorType.colour

string

Its colour key on badges and in the app (blue, orange, teal…).

visits[].expectedStart

string

When the visit is due to start (ISO 8601, UTC).

visits[].expectedEnd

string

When it is due to end (ISO 8601, UTC).

visits[].purpose

string or null

What the visit is for.

visits[].notes

string or null

Notes for reception.

visits[].groupId

string or null

Shared by the visits of one group invite; null for one visitor.

visits[].seriesId

string or null

Shared by the visits of one repeating visit; null otherwise.

visits[].sendEmail

boolean

Whether the visitor is emailed their invite.

visits[].includeWifi

boolean

Whether the invite carries the site’s guest Wi-Fi.

visits[].checkedInAt

string or null

When they checked in (ISO 8601), or null.

visits[].checkedOutAt

string or null

When they checked out (ISO 8601), or null.

visits[].createdAt

string

When the visit was made (ISO 8601).

visits[].badgeNumber

string or null

The number on the visitor’s badge ("B-7KQ2") once one is printed.

visits[].site

object

The site visited.

visits[].site.id

string

The site’s id.

visits[].site.name

string

Its name.

visits[].site.timezone

string

Its time zone (IANA, e.g. Africa/Lagos).

visits[].entrance

object or null

The entrance the visitor was asked to use, or null.

visits[].entrance.id

string

The entrance’s id.

visits[].entrance.name

string

Its name.

total

integer

How many visits match, on every page.

page

integer

This page’s number.

pageSize

integer

Visits a page.

from

string

The first day the list covers (YYYY-MM-DD).

to

string

The last day the list covers (YYYY-MM-DD).

stats

object

Counts for the range and the other filters, whatever the status filter.

stats.total

integer

Visits in the range.

stats.previousTotal

integer

Visits in the same number of days just before the range.

stats.checkedOut

integer

Visits checked out.

stats.autoCheckedOut

integer

Visits checked out at the site’s end of day.

stats.noShowOrDenied

integer

Visits whose visitor did not come or was refused.

Errors

No key was sent, or it is mistyped or unknown.

The key has been revoked.

The key has passed its expiry date.

The organisation’s plan does not include the API (feature: "api").

Gbàlejò has suspended the organisation.

The key does not have visits:read.

A field is missing or not valid: errors lists each one with its path.

The key has made its requests for this minute (Retry-After says when).