Get a Complete List of Attendees, Travel and More

Pull a complete filtered list, such as everyone registered or traveling for a show, page by page.

Example use case

You need a report of everyone registered or traveling for a show and want to collect every matching record.

What you'll end up with

A list of Staff registrations and Travel Reservations for one Event or the whole workspace. You can also filter the Travel list by tagged people.

Before you start

Have a workspace API key. If you plan to filter by people, get their IDs from Users and Resources.

Good to know

Leave out the Event filter to search the whole workspace, or add it to focus on one show.

At a glance

Time to try

About 5 minutes

Effect on your data

Read-only

Endpoints

2

The program reads Staff registrations and Travel Reservations and prints their IDs.

How it works

  1. The program reads Staff registrations and Travel Reservations. An Event ID narrows both lists.
  2. If you supply tagged people, it applies those filters to Travel and keeps the same filters on every page.
  3. It follows the paging fields and prints each distinct record ID and Event ID.

Read every matching record

The examples below use the Staff and Travel lists. The program reads Staff first, then Travel, and continues each list when there are more records.

Step 1: Read every page of attendees

Read Staff registrations a page at a time, with an optional Event filter.

curl -X GET "https://api.exhibitday.com/v1/events/staff?%24limit=2&%24offset=0" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{
  "records_found": 2,
  "total_records": 3,
  "has_more": true,
  "list_data": [
    {
      "id": 101,
      "event_id": 5001
    },
    {
      "id": 102,
      "event_id": 5002
    }
  ]
}

total_records is the number of matches across all pages.

Check: While has_more is true, increase $offset by the number of rows returned and request the next page.

Step 2: Read every page of travel reservations

Read Travel Reservations a page at a time, with optional Event and tagged-people filters.

curl -X GET "https://api.exhibitday.com/v1/events/travel_reservations?filter_by_tagged_user_ids=%5B%2211111111-2222-4333-8444-555555555555%22%2C%2266666666-7777-4888-8999-000000000000%22%5D&filter_by_tagged_user_ids_match_type=all&%24limit=2&%24offset=0" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{
  "records_found": 2,
  "total_records": 3,
  "has_more": true,
  "list_data": [
    {
      "id": 201,
      "event_id": 5001
    },
    {
      "id": 202,
      "event_id": 5002
    }
  ]
}

list_data[].id identifies a Travel Reservation. Keep each ID once, even if it appears on two pages.

Check: Use the same filters on every page. Stop when has_more is false.

Try it

Before running the example

VariableWhat to put in itRequired?
EXHIBITDAY_API_KEYYour workspace API key.Yes
EXHIBITDAY_PAGE_SIZEA positive number of records per page. Defaults to 100.No
EXHIBITDAY_EVENT_IDOne Event ID to limit both lists. Leave it out for all readable Events in the workspace.No
EXHIBITDAY_TAGGED_USER_IDS_JSONOne person ID or a JSON array of IDs to filter Travel.No
EXHIBITDAY_TAG_MATCH_TYPEUse any for at least one selected person, or all for every selected person. Defaults to any.No

Bash

export EXHIBITDAY_API_KEY='YOUR_API_KEY'

PowerShell

$env:EXHIBITDAY_API_KEY = 'YOUR_API_KEY'

Then copy the complete example program below in your language and run it.

Complete example program

Code Samples
#!/usr/bin/env bash
# Requires Bash, curl and Python3. No API key is written into the program.
python3 - <<'EXHIBITDAY_PY'
# Python 3; standard library only. Set EXHIBITDAY_API_KEY before running.
import http.client
import json
import os
import re
import time
import urllib.error
import urllib.parse
import urllib.request

BASE = "https://api.exhibitday.com/v1"
SPEC = json.loads("{\"preserveNumbers\":true,\"requests\":{\"staff_pages\":{\"method\":\"GET\",\"path\":\"/events/staff\"},\"travel_pages\":{\"method\":\"GET\",\"path\":\"/events/travel_reservations\"}}}")
API_KEY = os.environ["EXHIBITDAY_API_KEY"]
if any(ord(char) < 32 or ord(char) > 126 for char in API_KEY):
    raise RuntimeError("Use the API key as one ASCII header value without control characters")
if not API_KEY.strip():
    raise RuntimeError("Set EXHIBITDAY_API_KEY")

def decode_json(text):
    if SPEC["preserveNumbers"]:
        # Quote JSON NUMBER tokens, never text inside a JSON string, to keep CSV decimals exact.
        text = re.sub(r'"(?:\\.|[^"\\])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?',
                      lambda m: m[0] if m[0].startswith('"') else json.dumps(m[0]), text)
    return json.loads(text)

from pathlib import Path
# This terminal version uses curl for HTTP and Python's standard library for JSON/CSV.
import subprocess
import tempfile

def transport(method, url, headers, data):
    with tempfile.TemporaryDirectory(prefix="exhibitday-guide-") as directory:
        folder = Path(directory)
        # curl may leave no output file for a valid bodyless304 response.
        (folder / "body").write_bytes(b"")
        command = ["curl", "--disable", "--silent", "--show-error", "--request", method, "--url", url,
                   "--max-time", "30", "--dump-header", str(folder / "headers"),
                   "--output", str(folder / "body"), "--write-out", "%{http_code}"]
        for name, value in headers.items():
            command += ["--header", name + ": " + value]
        if data is not None:
            (folder / "request").write_bytes(data)
            command += ["--data-binary", "@" + str(folder / "request")]
        result = subprocess.run(command, capture_output=True, text=True)
        if result.returncode:
            raise urllib.error.URLError(result.stderr.strip())
        response_headers = {}
        blocks = (folder / "headers").read_text(encoding="iso-8859-1").replace("\r\n", "\n").strip().split("\n\n")
        for line in blocks[-1].splitlines()[1:]:
            name, separator, value = line.partition(":")
            if separator:
                response_headers[name] = value.strip()
        return int(result.stdout), (folder / "body").read_bytes(), response_headers


class ApiError(RuntimeError):
    """An API error response. Branch on error_code (and status), never on the message text.
    uncertain is True when a PATCH or DELETE got no response or a server error: it may or may not have been applied."""
    def __init__(self, status, body, uncertain=False):
        self.status = status
        self.uncertain = uncertain
        self.error_code = body.get("error_code") if isinstance(body, dict) else None
        super().__init__(f"{body.get('error_code')} {body.get('error_params')}: {body.get('errors')} (request {body.get('request_id')})"
                         if isinstance(body, dict) else "HTTP " + str(status) if status else "No response")

def call(name, params=None, body=None, key=None):
    route = SPEC["requests"][name]
    headers = {"Authorization": "Bearer " + API_KEY, "Accept": "application/json"}
    if route["method"] == "POST":
        if not key: raise RuntimeError("Persist a logical create key before sending POST")
        headers["Idempotency-Key"] = key
    data = None if body is None else json.dumps(body).encode("utf-8")
    if data is not None:
        headers["Content-Type"] = "application/json"
    query = urllib.parse.urlencode(params or {})
    url = BASE + route["path"] + ("?" + query if query else "")
    # Only GET has automatic retries in this workflow. A PATCH or DELETE that got no response or a
    # server error is never resent blindly: it may already have been applied, so the caller reads the record first.
    resend = route["method"] == "GET"
    for attempt in range(5):
        try:
            status, raw, response_headers = transport(route["method"], url, headers, data)
        except (urllib.error.URLError, TimeoutError, ConnectionError, http.client.HTTPException):
            if not resend:
                raise ApiError(0, None, uncertain=True)
            if attempt == 4:
                raise
            time.sleep(2 ** attempt)
            continue
        response_headers = {k.lower(): v for k, v in response_headers.items()}
        result = None
        if status != 304 and raw:
            try:
                result = decode_json(raw.decode("utf-8"))
            except (ValueError, UnicodeError):
                if status < 400:
                    raise RuntimeError("Expected a JSON success response")
        if status >= 500 and not resend:
            raise ApiError(status, result, uncertain=True)
        retry = resend and (status == 429 or status >= 500)
        if retry:
            if attempt == 4:
                raise RuntimeError("Retry limit reached; check the request outcome before starting a new create")
            delay = response_headers.get("retry-after", str(2 ** attempt))
            time.sleep(max(0, float(delay)))
            continue
        if status >= 400:
            raise ApiError(status, result)
        return {"status": status, "body": result, "headers": response_headers, "raw": raw}
    raise RuntimeError("Retry limit reached")


def add_offset(offset, received):
    result = int(offset) + received
    if received <= 0 or result > 2147483647: raise RuntimeError("Cannot advance this int32 offset; reconcile the query")
    return str(result)

def concat(left, right):
    return left + right

def items(value):
    if not isinstance(value, list): raise RuntimeError("Expected a JSON array")
    return value

def count(value):
    return len(items(value))

def either(left, right):
    if not isinstance(left, bool) or not isinstance(right, bool): raise RuntimeError("Expected Boolean criteria")
    return left or right

def equal(left, right):
    return type(left) is type(right) and left == right

def field(value, name):
    if not isinstance(value, dict) or name not in value: raise RuntimeError("Missing response field: " + name)
    return value[name]

def is_empty(value):
    return count(value) == 0

def is_present(value):
    return value is not None and value != ""

def new_id_set():
    return set()

def not_value(value):
    if not isinstance(value, bool): raise RuntimeError("Expected a Boolean")
    return not value

def optional(name, fallback):
    value = os.environ.get(name)
    return fallback if value is None or value == "" else value

def page_size(value):
    if not re.fullmatch(r"[1-9][0-9]*", value) or int(value) > 2147483647: raise RuntimeError("Page size must be a positive int32")
    return value

def positive_id(value):
    if not re.fullmatch(r"[1-9][0-9]*", value) or int(value) > 9223372036854775807: raise RuntimeError("Use a positive record ID")
    return value

def print_value(value):
    print(value if isinstance(value, str) else json.dumps(value, ensure_ascii=False))

def remember_id(seen, value):
    if value in seen: return False
    seen.add(value)
    return True

def require_condition(value, message):
    if value is not True: raise RuntimeError(message)

def text(value):
    if value is None: return ""
    if isinstance(value, str): return value
    if isinstance(value, bool): return "true" if value else "false"
    if isinstance(value, int): return str(value)
    raise RuntimeError("Expected a scalar response value")


def main():
    selected_page_size = page_size(optional("EXHIBITDAY_PAGE_SIZE", "100"))
    selected_event_id = optional("EXHIBITDAY_EVENT_ID", "")
    if is_present(selected_event_id):
        selected_event_id = positive_id(selected_event_id)
    tagged_user_filter = optional("EXHIBITDAY_TAGGED_USER_IDS_JSON", "")
    tag_match_type = optional("EXHIBITDAY_TAG_MATCH_TYPE", "any")
    require_condition(either(equal(tag_match_type, "any"), equal(tag_match_type, "all")), "Choose any or all for EXHIBITDAY_TAG_MATCH_TYPE.")
    staff_query = {"$limit": selected_page_size}
    if is_present(selected_event_id):
        staff_query["filter_by_event_id"] = selected_event_id
    staff_offset = "0"
    staff_seen_ids = new_id_set()
    print_value("Staff record ID\tEvent ID")
    while True:
        staff_query["$offset"] = staff_offset
        staff_response = call("staff_pages", staff_query, None, None)
        staff_page = staff_response["body"]
        staff_rows = items(field(staff_page, "list_data"))
        require_condition(equal(text(field(staff_page, "records_found")), text(count(staff_rows))), "records_found does not match this page's rows.")
        require_condition(is_present(text(field(staff_page, "total_records"))), "The collection wrapper needs total_records.")
        require_condition(either(equal(field(staff_page, "has_more"), True), equal(field(staff_page, "has_more"), False)), "Expected a Boolean has_more value.")
        for staff_record in items(staff_rows):
            staff_record_id = positive_id(text(field(staff_record, "id")))
            staff_event_id = positive_id(text(field(staff_record, "event_id")))
            if is_present(selected_event_id):
                require_condition(equal(staff_event_id, selected_event_id), "A returned row belongs to a different Event.")
            if remember_id(staff_seen_ids, staff_record_id):
                print_value(concat(staff_record_id, concat("\t", staff_event_id)))
        if equal(field(staff_page, "has_more"), False):
            break
        require_condition(not_value(is_empty(staff_rows)), "An empty page has has_more=true; stop and reconcile the query.")
        staff_offset = add_offset(staff_offset, count(staff_rows))
    travel_query = {"$limit": selected_page_size}
    if is_present(selected_event_id):
        travel_query["filter_by_event_id"] = selected_event_id
    if is_present(tagged_user_filter):
        travel_query["filter_by_tagged_user_ids"] = tagged_user_filter
        travel_query["filter_by_tagged_user_ids_match_type"] = tag_match_type
    travel_offset = "0"
    travel_seen_ids = new_id_set()
    print_value("Travel record ID\tEvent ID")
    while True:
        travel_query["$offset"] = travel_offset
        travel_response = call("travel_pages", travel_query, None, None)
        travel_page = travel_response["body"]
        travel_rows = items(field(travel_page, "list_data"))
        require_condition(equal(text(field(travel_page, "records_found")), text(count(travel_rows))), "records_found does not match this page's rows.")
        require_condition(is_present(text(field(travel_page, "total_records"))), "The collection wrapper needs total_records.")
        require_condition(either(equal(field(travel_page, "has_more"), True), equal(field(travel_page, "has_more"), False)), "Expected a Boolean has_more value.")
        for travel_record in items(travel_rows):
            travel_record_id = positive_id(text(field(travel_record, "id")))
            travel_event_id = positive_id(text(field(travel_record, "event_id")))
            if is_present(selected_event_id):
                require_condition(equal(travel_event_id, selected_event_id), "A returned row belongs to a different Event.")
            if remember_id(travel_seen_ids, travel_record_id):
                print_value(concat(travel_record_id, concat("\t", travel_event_id)))
        if equal(field(travel_page, "has_more"), False):
            break
        require_condition(not_value(is_empty(travel_rows)), "An empty page has has_more=true; stop and reconcile the query.")
        travel_offset = add_offset(travel_offset, count(travel_rows))


if __name__ == "__main__":
    main()

EXHIBITDAY_PY

Things to keep in mind

  • Lists leave out records on an Event tab that is hidden. If you filter a list to one Event whose tab is hidden, the response includes a warning that names the tab. Tasks are the exception: hiding an Event's Tasks tab does not hide its Tasks.
  • Staff uses filter_by_attendee_user_ids and matches any listed person. Travel, Playbook Activities and Event Misc. Expenses/Credits use filter_by_tagged_user_ids with filter_by_tagged_user_ids_match_type. Send an ID array as JSON text in the GET query string.
  • People filters match saved assignments or tags, including IDs of inactive or removed people that are still on the record. IDs with no saved match return nothing. The API returns only records your key can read.
  • Records can shift between pages when someone adds, removes or edits them. Keep each ID once and reconcile longer exports when needed.
  • If a page is empty and has_more is true, investigate the result before continuing.
  • Related data options vary by endpoint. Turn on only what your report uses.
Full workspace-wide Travel example without a people filter

Example response

{
  "list_type": "travel_reservation",
  "list_data": [
    {
      "id": 201,
      "event_id": 5001,
      "event_name": "Spring Expo 2030",
      "reservation_type_id": 6,
      "booking_status_id": 20,
      "book_by_date": null,
      "date_booked": null,
      "booking_url": null,
      "cancellation_instructions": "",
      "vehicle_drop_off_location": null,
      "reservation_number": null,
      "origin_vendor_name": "Spring Expo Conference Hotel",
      "origin_flight_number": null,
      "origin_reservation_item_info": null,
      "origin_checkin_location": null,
      "origin_checkin_date": "2030-01-14",
      "origin_checkin_time": null,
      "origin_reservation_details": null,
      "origin_destination_location": null,
      "origin_destination_date": null,
      "origin_destination_time": null,
      "origin_reservation_final_details": null,
      "return_vendor_name": null,
      "return_flight_number": null,
      "return_reservation_item_info": null,
      "return_checkin_location": null,
      "return_checkin_date": "2030-01-17",
      "return_checkin_time": null,
      "return_reservation_details": null,
      "return_destination_location": null,
      "return_destination_date": null,
      "return_destination_time": null,
      "return_reservation_final_details": null,
      "origin_vendor_address": null,
      "notes": "",
      "payment_status_id": 0,
      "payment_due_date": null,
      "next_payment_due_date": null,
      "payment_notes": null,
      "invoice_attachment": null,
      "reservation_type": "Hotel",
      "reservation_group": "Lodging",
      "booking_status": "Booked",
      "payment_status": {
        "id": 0,
        "name": "N/A"
      },
      "cost": {
        "amount": 0.00,
        "cost_center_breakdown": []
      },
      "tagged_users": [
        {
          "id": "11111111-2222-4333-8444-555555555555",
          "first_name": "Alex",
          "last_name": "Morgan",
          "display_name": "Alex Morgan",
          "email": "alex@example.invalid",
          "type": "user",
          "workspace_role": "team_member",
          "is_active": true
        },
        {
          "id": "66666666-7777-4888-8999-000000000000",
          "first_name": "Jordan",
          "last_name": "Lee",
          "display_name": "Jordan Lee",
          "email": "jordan@example.invalid",
          "type": "user",
          "workspace_role": "team_member",
          "is_active": true
        }
      ],
      "created_by": {
        "id": null,
        "first_name": "ExhibitDay",
        "last_name": "API",
        "display_name": "ExhibitDay API",
        "email": null,
        "type": null,
        "workspace_role": null,
        "is_active": true
      }
    },
    {
      "id": 202,
      "event_id": 5002,
      "event_name": "Lakeshore Expo 2030",
      "reservation_type_id": 6,
      "booking_status_id": 20,
      "book_by_date": null,
      "date_booked": null,
      "booking_url": null,
      "cancellation_instructions": "",
      "vehicle_drop_off_location": null,
      "reservation_number": null,
      "origin_vendor_name": "Lakeshore Convention Hotel",
      "origin_flight_number": null,
      "origin_reservation_item_info": null,
      "origin_checkin_location": null,
      "origin_checkin_date": "2030-02-11",
      "origin_checkin_time": null,
      "origin_reservation_details": null,
      "origin_destination_location": null,
      "origin_destination_date": null,
      "origin_destination_time": null,
      "origin_reservation_final_details": null,
      "return_vendor_name": null,
      "return_flight_number": null,
      "return_reservation_item_info": null,
      "return_checkin_location": null,
      "return_checkin_date": "2030-02-14",
      "return_checkin_time": null,
      "return_reservation_details": null,
      "return_destination_location": null,
      "return_destination_date": null,
      "return_destination_time": null,
      "return_reservation_final_details": null,
      "origin_vendor_address": null,
      "notes": "",
      "payment_status_id": 0,
      "payment_due_date": null,
      "next_payment_due_date": null,
      "payment_notes": null,
      "invoice_attachment": null,
      "reservation_type": "Hotel",
      "reservation_group": "Lodging",
      "booking_status": "Booked",
      "payment_status": {
        "id": 0,
        "name": "N/A"
      },
      "cost": {
        "amount": 0.00,
        "cost_center_breakdown": []
      },
      "tagged_users": [
        {
          "id": "11111111-2222-4333-8444-555555555555",
          "first_name": "Alex",
          "last_name": "Morgan",
          "display_name": "Alex Morgan",
          "email": "alex@example.invalid",
          "type": "user",
          "workspace_role": "team_member",
          "is_active": true
        },
        {
          "id": "66666666-7777-4888-8999-000000000000",
          "first_name": "Jordan",
          "last_name": "Lee",
          "display_name": "Jordan Lee",
          "email": "jordan@example.invalid",
          "type": "user",
          "workspace_role": "team_member",
          "is_active": true
        }
      ],
      "created_by": {
        "id": null,
        "first_name": "ExhibitDay",
        "last_name": "API",
        "display_name": "ExhibitDay API",
        "email": null,
        "type": null,
        "workspace_role": null,
        "is_active": true
      }
    }
  ],
  "records_found": 2,
  "total_records": 3,
  "has_more": true
}
Note: First Travel page. An illustrative workspace-wide page with two Hotel reservations. A third matching reservation remains for the next page.