Link ExhibitDay Events to Your CRM or ERP Records

Link each record in your CRM or ERP (for example Salesforce, HubSpot or NetSuite) to the matching ExhibitDay Event, even after names change.

Example use case

You connect ExhibitDay to a CRM or ERP and want the same records to stay linked even after their names change.

What you'll end up with

A confirmed pair of IDs to save in your integration and a safe way to find an existing match.

Before you start

Have your workspace API key, your system's Event ID and a place to store the pair.

This guide assumes your system's ID for each Event is already stored in integration_metadata_field_1, one of five API-only text fields on each Event. If another integration already uses field 1, choose a free field (1 to 5) and use it consistently.

Good to know

Match on IDs. Two Events can have the same name, and names can change.

At a glance

Time to try

About 5 minutes

Effect on your data

Read-only

Endpoints

2

The example reads Events and prints the confirmed pair.

How it works

  1. Your system keeps its own ID for each show. The example assumes that ID is already stored in the Event's integration_metadata_field_1.
  2. If you already saved the ExhibitDay Event ID, the program checks it directly. Otherwise, it searches by your system's ID and requires exactly one match.
  3. After it confirms both IDs, save the pair in your system. Use the ExhibitDay Event ID for later requests.

The examples show how to find and confirm a match. If you already saved the ExhibitDay Event ID, skip Step 1 and confirm it in Step 2.

Step 1: Search by your system's ID

If you do not have a saved Event ID, search Events by integration_metadata_field_1, the field where your system's ID is stored, and read every page.

curl -X GET "https://api.exhibitday.com/v1/events?filter_by_integration_metadata_field_1=crm%3Aevent%3Aspring-expo-2030&%24limit=100&%24offset=0" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{
  "has_more": false,
  "list_data": [
    {
      "id": 12345,
      "integration_metadata_field_1": "crm:event:spring-expo-2030"
    }
  ]
}

Use list_data[].id to identify a candidate. When has_more is true, continue to the next page.

Check: Look for one distinct Event with the full external ID. If none match, create the Event or link an existing one with Create or Update Events from Your CRM. If several match, stop and review.

Step 2: Confirm the match and save the pair

Read the chosen Event by ID to confirm the link before saving it.

curl -X GET "https://api.exhibitday.com/v1/events/info?id=12345" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{
  "id": 12345,
  "integration_metadata_field_1": "crm:event:spring-expo-2030"
}

Save this id in your integration after checking the stored key.

Check: Confirm that integration_metadata_field_1 equals your external ID. Save the Event id with your external ID.

Try it

Before running the example

VariableWhat to put in itRequired?
EXHIBITDAY_API_KEYYour workspace API key.Yes
EXHIBITDAY_EXTERNAL_EVENT_KEYYour system's Event ID, exactly as stored in ExhibitDay, up to 3,000 characters.Yes
EXHIBITDAY_PAGE_SIZEA positive number of Events per page. Defaults to 100.No
EXHIBITDAY_EVENT_IDA previously saved ExhibitDay Event ID. When set, the example goes straight to confirmation.No

Bash

export EXHIBITDAY_API_KEY='YOUR_API_KEY'
export EXHIBITDAY_EXTERNAL_EVENT_KEY='crm:event:spring-expo-2030'

PowerShell

$env:EXHIBITDAY_API_KEY = 'YOUR_API_KEY'
$env:EXHIBITDAY_EXTERNAL_EVENT_KEY = 'crm:event:spring-expo-2030'

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\":{\"find_match\":{\"method\":\"GET\",\"path\":\"/events\"},\"confirm_match\":{\"method\":\"GET\",\"path\":\"/events/info\"}}}")
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 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 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 require_condition(value, message):
    if value is not True: raise RuntimeError(message)

def required(name):
    value = os.environ.get(name)
    if value is None or not value.strip(): raise RuntimeError("Set " + name)
    return value

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():
    external_event_key = required("EXHIBITDAY_EXTERNAL_EVENT_KEY")
    matched_event_id = optional("EXHIBITDAY_EVENT_ID", "")
    if is_present(matched_event_id):
        matched_event_id = positive_id(matched_event_id)
    else:
        matching_page_size = page_size(optional("EXHIBITDAY_PAGE_SIZE", "100"))
        matching_offset = "0"
        matching_query = {"filter_by_integration_metadata_field_1": external_event_key, "$limit": matching_page_size}
        while True:
            matching_query["$offset"] = matching_offset
            matching_response = call("find_match", matching_query, None, None)
            matching_page = matching_response["body"]
            matching_rows = items(field(matching_page, "list_data"))
            require_condition(equal(text(field(matching_page, "records_found")), text(count(matching_rows))), "records_found does not match this page's rows.")
            require_condition(is_present(text(field(matching_page, "total_records"))), "The collection wrapper needs total_records.")
            require_condition(either(equal(field(matching_page, "has_more"), True), equal(field(matching_page, "has_more"), False)), "Expected a Boolean has_more value.")
            for matching_event in items(matching_rows):
                if equal(text(field(matching_event, "integration_metadata_field_1")), external_event_key):
                    candidate_event_id = positive_id(text(field(matching_event, "id")))
                    if is_present(matched_event_id):
                        require_condition(equal(matched_event_id, candidate_event_id), "Multiple Events have this exact external key; resolve the ambiguity before linking.")
                    matched_event_id = candidate_event_id
            if equal(field(matching_page, "has_more"), False):
                break
            require_condition(not_value(is_empty(matching_rows)), "An empty page has has_more=true; stop and reconcile the search.")
            matching_offset = add_offset(matching_offset, count(matching_rows))
        require_condition(is_present(matched_event_id), "No exact match was found. Decide explicitly whether to create or link a record.")
    confirmation_query = {"id": matched_event_id}
    confirmed_response = call("confirm_match", confirmation_query, None, None)
    confirmed_event = confirmed_response["body"]
    require_condition(equal(text(field(confirmed_event, "id")), matched_event_id), "The confirmed Event ID differs from the selected Event.")
    require_condition(equal(text(field(confirmed_event, "integration_metadata_field_1")), external_event_key), "The Event's current metadata differs from the intended external key. Stop for review.")
    print_value({"external_event_key": external_event_key, "event_id": matched_event_id})


if __name__ == "__main__":
    main()

EXHIBITDAY_PY

Example response

{
  "id": 12345,
  "exhibitday_url": "https://www.exhibitday.com/Workspace/Event/98765?eid=12345",
  "name": "Spring Expo 2030",
  "start_date": "2030-01-14",
  "end_date": "2030-01-16",
  "participation_type_id": 1,
  "participation_type": "Committed",
  "format_id": 1,
  "format": "In-Person",
  "star_rating": 0,
  "tags": [
    "International",
    "Field Marketing"
  ],
  "website_url": "",
  "venue_name": "",
  "venue_address": "",
  "venue_location_display_name": "",
  "venue_address_latitude": "",
  "venue_address_longitude": "",
  "booth_size": "",
  "booth_number": "",
  "booth_reservation_status_id": 1,
  "booth_reservation_status": "Need to Reserve",
  "booth_reserve_by_date": "",
  "booth_date_reserved": "",
  "budget_booth_reservation": 0.00,
  "budget_booth_services": 0.00,
  "budget_attendee_registrations": 0.00,
  "budget_travel": 0.00,
  "budget_giveaways": 0.00,
  "budget_shipments": 0.00,
  "budget_event_activities": 0.00,
  "budget_misc_expenses": 0.00,
  "budget_sponsorships": 0.00,
  "total_sum_event_budgets": 0.00,
  "booth_reservation_cost": {
    "amount": 125.50,
    "cost_center_breakdown": [
      {
        "cost_center_id": 34567,
        "cost_center": "Marketing",
        "charge": 75.50
      },
      {
        "cost_center_id": 34568,
        "cost_center": "Operations",
        "charge": 50.00
      }
    ]
  },
  "cost_booth_reservation": 125.50,
  "booth_reservation_payment_status_id": 0,
  "booth_reservation_payment_status": "",
  "booth_reservation_payment_due_date": null,
  "booth_reservation_next_payment_due_date": null,
  "booth_reservation_payment_notes": null,
  "booth_reservation_invoice_attachment": {
    "id": 182345,
    "filename": "booth-reservation-invoice.pdf",
    "attachment_created_timestamp": "2027-01-30T12:00:00Z"
  },
  "cost_booth_services": 0.00,
  "cost_attendee_registrations": 0.00,
  "cost_travel_reservations": 0.00,
  "cost_giveaways": 0.00,
  "cost_shipments": 0.00,
  "cost_event_activities": 0.00,
  "cost_misc_expenses": 100.50,
  "cost_sponsorships": 0.00,
  "total_sum_event_costs": 226.00,
  "event_notes": "",
  "booth_notes": "",
  "budget_notes": "",
  "roi_notes": "",
  "roi_num_leads": 0,
  "roi_num_impressions_booth": 0,
  "roi_num_impressions_sponsorships": 0,
  "roi_num_impressions_media": 0,
  "roi_num_meetings_existing_customers": 0,
  "roi_num_meetings_new_customers": 0,
  "roi_amount_actual_sales": 0.00,
  "roi_amount_potential_sales": 0.00,
  "roo_score": null,
  "event_created_timestamp": "2029-12-01T17:00:00Z",
  "event_last_update_timestamp": "2030-01-02T17:00:00Z",
  "event_created_by": null,
  "custom_fields": [
    {
      "label": "Integration status",
      "value": "Ready",
      "notes": "",
      "field_name": "custom_67890",
      "field_type": "Text (Single-line)",
      "field_event_tab": "Info"
    },
    {
      "label": "Setup instructions",
      "value": "Place the display beside the entrance.",
      "notes": "",
      "field_name": "custom_67891",
      "field_type": "Text (Single-line)",
      "field_event_tab": "Booth"
    }
  ],
  "task_sections": [
    {
      "id": 13346,
      "name": "Planning",
      "display_rank": 1
    },
    {
      "id": 13347,
      "name": "At the Event",
      "display_rank": 2
    }
  ],
  "tasks": [
    {
      "id": 14346,
      "exhibitday_url": "https://www.exhibitday.com/Workspace/TaskView/98765?tid=14346",
      "event_task_section_id": 13346,
      "event_task_section": "Planning",
      "display_rank": 1,
      "name": "Confirm booth setup",
      "due_date": "2026-12-10",
      "assignee": {
        "id": "11111111-2222-4333-8444-555555555555",
        "first_name": "Jane",
        "last_name": "Smith",
        "display_name": "Jane Smith",
        "email": "jane@example.invalid",
        "type": "user",
        "workspace_role": "team_member",
        "is_active": true
      },
      "is_completed": false,
      "task_completed_timestamp": null,
      "task_created_timestamp": "2029-12-01T17:01:00Z",
      "task_last_update_timestamp": "2029-12-01T17:01:00Z"
    },
    {
      "id": 14347,
      "exhibitday_url": "https://www.exhibitday.com/Workspace/TaskView/98765?tid=14347",
      "event_task_section_id": 13347,
      "event_task_section": "At the Event",
      "display_rank": 2,
      "name": "Prepare the staff schedule",
      "due_date": "2026-12-11",
      "assignee": {
        "id": "66666666-7777-4888-8999-aaaaaaaaaaaa",
        "first_name": "Alex",
        "last_name": "Jordan",
        "display_name": "Alex Jordan",
        "email": "alex@example.invalid",
        "type": "user",
        "workspace_role": "team_member",
        "is_active": true
      },
      "is_completed": false,
      "task_completed_timestamp": null,
      "task_created_timestamp": "2029-12-01T17:02:00Z",
      "task_last_update_timestamp": "2029-12-01T17:02:00Z"
    }
  ],
  "misc_expenses_credits": [
    {
      "id": 15346,
      "exhibitday_url": "https://www.exhibitday.com/Workspace/Event/98765?eid=12345&riType=8&riSub=0&riId=15346",
      "description": "Conference meals",
      "is_credit": false,
      "cost": {
        "amount": 125.50,
        "cost_center_breakdown": [
          {
            "cost_center_id": 34567,
            "cost_center": "Marketing",
            "charge": 75.50
          },
          {
            "cost_center_id": 34568,
            "cost_center": "Operations",
            "charge": 50.00
          }
        ]
      },
      "notes": "",
      "payment_due_date": null,
      "payment_status": {
        "id": 0,
        "name": "Not Specified"
      },
      "next_payment_due_date": null,
      "next_partial_payment_due_date": null,
      "payment_notes": null,
      "invoice_attachment": {
        "id": 685346,
        "filename": "expense-invoice.pdf",
        "attachment_created_timestamp": "2027-01-30T12:00:00Z"
      },
      "event_misc_expense_credit_created_timestamp": "2029-12-01T17:00:00Z",
      "event_misc_expense_credit_last_update_timestamp": "2029-12-01T17:00:00Z"
    },
    {
      "id": 15347,
      "exhibitday_url": "https://www.exhibitday.com/Workspace/Event/98765?eid=12345&riType=8&riSub=0&riId=15347",
      "description": "Supplier refund",
      "is_credit": true,
      "cost": {
        "amount": -25.00,
        "cost_center_breakdown": [
          {
            "cost_center_id": 34567,
            "cost_center": "Marketing",
            "charge": -15.00
          },
          {
            "cost_center_id": 34568,
            "cost_center": "Operations",
            "charge": -10.00
          }
        ]
      },
      "notes": "",
      "payment_due_date": null,
      "payment_status": {
        "id": 0,
        "name": "Not Specified"
      },
      "next_payment_due_date": null,
      "next_partial_payment_due_date": null,
      "payment_notes": null,
      "invoice_attachment": {
        "id": 685347,
        "filename": "expense-invoice.pdf",
        "attachment_created_timestamp": "2027-01-30T12:00:00Z"
      },
      "event_misc_expense_credit_created_timestamp": "2029-12-01T17:00:00Z",
      "event_misc_expense_credit_last_update_timestamp": "2029-12-01T17:00:00Z"
    }
  ],
  "integration_metadata_field_1": "crm:event:spring-expo-2030",
  "integration_metadata_field_2": null,
  "integration_metadata_field_3": null,
  "integration_metadata_field_4": null,
  "integration_metadata_field_5": null
}
Note: Confirmed Event match. An illustrative Event whose stored integration key exactly matches the external key. The mapping is printed only after this confirmation.

Things to keep in mind

  • A record missing from a list is not proof that it was deleted: lists leave out records on Event tabs that are hidden. Check the Event's tab settings before removing your copy.
  • Keep IDs as text or exact integers. The example prints event_id as text to preserve every digit.
  • Agree which integration uses each integration field before storing values there.
  • Check each match. More than one Event can have the same key.
  • The search trims surrounding spaces and may ignore letter case. The example compares the stored key exactly before printing a match.
  • If you use another example to create a record and lose the response, check whether the record exists before you try again. See Handle Errors and Retry Failed Requests.
  • Track deletions separately. A change-feed cursor does not list deleted records.