API Reference
Log In
API Reference

Search visits

Retrieve a paginated list of visit records with flexible filtering options. Only visits of the facility the API token belongs to are returned, and deleted visits are excluded. Unknown query parameters are rejected with 400.

Query Params
integer
≥ 0

The page number to retrieve. It only takes effect when limit is also sent; without limit the first page is returned.

integer
1 to 1000
Defaults to 10

The number of items per page. Public API clients may request up to 1000, a higher ceiling than the other Stowlog clients get. Defaults to 10.

string

Field to sort the results by. Custom sorting only applies when both sortField and sortOrder are sent; otherwise results are sorted by expectedIn descending.

string
enum

Order of sorting (asc or desc). Custom sorting only applies when both sortField and sortOrder are sent; otherwise results are sorted by expectedIn descending.

Allowed:
date-time

Filter visits with expectedIn >= this date (ISO 8601 format).

date-time

Filter visits with expectedIn <= this date (ISO 8601 format).

date-time

Filter visits with expectedOut >= this date (ISO 8601 format).

date-time

Filter visits with expectedOut <= this date (ISO 8601 format).

date-time

Filter visits with checkedInAt >= this date (ISO 8601 format).

date-time

Filter visits with checkedInAt <= this date (ISO 8601 format).

date-time

Filter visits with checkedOutAt >= this date (ISO 8601 format).

date-time

Filter visits with checkedOutAt <= this date (ISO 8601 format).

date-time

Filter visits with updatedAt >= this date (ISO 8601 format).

date-time

Filter visits with updatedAt <= this date (ISO 8601 format).

string

Filter by visitor email. Matches any email that contains the text, case-insensitive, so a partial value such as john.doe is enough.

string

User type ID to filter visits by. Must be a valid ObjectId (24 hexadecimal characters), otherwise the request is rejected with 400.

string

Filter by visitor name. Matches any full name that contains the text, case-insensitive.

string
enum

Status of the visits to filter by.

Allowed:
customFields
array of strings

Custom fields filters in format name,value. Example: blood-type,A. Repeat the parameter to filter by several custom fields. Each entry must have a non-empty name and a non-empty value, otherwise the request is rejected with 400.

customFields
metadataPresent
array of strings
length ≤ 20

Metadata keys the visit must have. Only visits that have all of these keys set are returned. Repeat the parameter or send a comma-separated list; values are trimmed and empty ones are dropped. At most 20 keys, each matching ^[a-zA-Z][a-zA-Z0-9_]{0,63}$, otherwise the request is rejected with 400.

metadataPresent
metadataMissing
array of strings
length ≤ 20

Metadata keys the visit must not have. Only visits that do not have any of these keys set are returned. Repeat the parameter or send a comma-separated list; values are trimmed and empty ones are dropped. At most 20 keys, each matching ^[a-zA-Z][a-zA-Z0-9_]{0,63}$, otherwise the request is rejected with 400.

metadataMissing
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json