Search API documentation

Type to search the API docs.

Export Event Costs to Excel or a Reporting Tool

Save your Event costs to a CSV for Excel, Google Sheets, Power BI or another reporting tool.

Example use case

Your finance team wants a CSV of the year's Event costs for a report.

What you'll end up with

A local CSV with one row per returned cost record, including Event, amount and payment information.

Before you start

Have a workspace API key with access to the Events and their financial data.

Good to know

Amounts are in your workspace's currency. The API also returns cost-center allocations if your report needs them.

At a glance

Time to try

About 10 minutes

Effect on your data

Read-only

Endpoints

1

Read-only in ExhibitDay. The program creates or replaces a local CSV.

How it works

  1. Choose the year the Events start. The program uses the current year by default.
  2. Read every page of Event costs for that year.
  3. Write one row per cost record to a local CSV.

Read each page of costs

Start with the first page. Use Step 2 only when the response says more pages are available.

Step 1: Read the first page of costs

Filter by the year the Events start, with an offset of zero, to begin the export.

curl -X GET "https://api.exhibitday.com/v1/financials/event_costs?filter_by_event_start_date_category=2026&%24limit=100&%24offset=0" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{
  "list_data": [
    {
      "event": {
        "id": 12345,
        "exhibitday_url": "https://www.exhibitday.com/Workspace/Event/98765?eid=12345",
        "name": "Sample Event",
        "start_date": "2026-11-20",
        "end_date": "2026-11-22",
        "participation_type_id": 1,
        "participation_type": "Committed",
        "format_id": 1,
        "format": "In-Person",
        "event_created_timestamp": "2026-11-30T17:00:00Z",
        "event_last_update_timestamp": "2026-11-30T17:00:00Z"
      },
      "cost_type": "Miscellaneous Expense/Credit",
      "cost_subtype": null,
      "amount": 125.5,
      "payment_status": {
        "id": 0,
        "name": "Not Specified"
      }
    }
  ],
  "records_found": 1,
  "has_more": false
}

Check: The response has list_data, the number of records in this page in records_found and the has_more flag. The excerpt shows which nested values supply Event and payment columns.

Step 2: Read the remaining pages

If has_more is true, add records_found to your current offset so the next request starts after the records you received.

For example, if a larger export returned 100 records in its first page, its next request would look like this.

curl -X GET "https://api.exhibitday.com/v1/financials/event_costs?filter_by_event_start_date_category=2026&%24limit=100&%24offset=100" -H "Authorization: Bearer YOUR_API_KEY"

Example response (shortened)

{ "records_found": 1, "has_more": false }

Check: Save the rows from every page, including the last one. 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_YEARThe Event start year. The default is the current year.No
EXHIBITDAY_CSVThe local output path. The default is event-costs-YEAR.csv, where YEAR is the selected year.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 Python 3. Set EXHIBITDAY_API_KEY.
python3 - <<'EXHIBITDAY_PY'
# Python 3; standard library only. Set EXHIBITDAY_API_KEY before running.
import csv
import datetime
import http.client
import json
import os
import re
import time
import urllib.error
import urllib.parse
import urllib.request
import uuid
from pathlib import Path

BASE = "https://api.exhibitday.com/v1"
SPEC = json.loads("{\"preserveNumbers\":true,\"requests\":{\"costs\":{\"method\":\"GET\",\"path\":\"/financials/event_costs\"}}}")
API_KEY = os.environ["EXHIBITDAY_API_KEY"]
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)

# 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", "--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, extra_headers=None, key=None):
    route = SPEC["requests"][name]
    headers = {"Authorization": "Bearer " + API_KEY, "Accept": "application/json", **(extra_headers or {})}
    if route["method"] == "POST":
        headers["Idempotency-Key"] = key or str(uuid.uuid4())  # generated ONCE, before retries
    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 "")
    # A GET, or a POST with its Idempotency-Key, can be sent again. 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"] in ("GET", "POST")
    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 = status == 429 or status >= 500 or (status == 409 and isinstance(result, dict) and result.get("error_code") == "idempotency_key_in_use")
        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}
    raise RuntimeError("Retry limit reached")

def pages(name, params=None):
    offset = 0
    while True:
        page = call(name, {**(params or {}), "$limit": 100, "$offset": offset})["body"]
        yield from page["list_data"]
        if not page["has_more"]:
            break
        count = int(page["records_found"])
        if count <= 0:
            raise RuntimeError("Server returned an empty page with has_more=true")
        offset += count

def load_json(path, fallback):
    return json.loads(path.read_text(encoding="utf-8")) if path.exists() else fallback

def save_json(path, value):
    temp = path.with_name(path.name + ".tmp")
    temp.write_text(json.dumps(value, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
    temp.replace(path)

year = os.environ.get("EXHIBITDAY_YEAR", str(datetime.date.today().year))
path = Path(os.environ.get("EXHIBITDAY_CSV", "event-costs-" + year + ".csv"))
columns = ["event_id", "event_name", "event_start_date", "cost_type", "cost_subtype", "details", "amount", "payment_status", "payment_due_date"]
count = 0
with path.open("w", newline="", encoding="utf-8-sig") as file:
    writer = csv.writer(file)
    writer.writerow(columns)
    for cost in pages("costs", {"filter_by_event_start_date_category": year}):
        event = cost["event"]
        writer.writerow([event["id"], event["name"], event.get("start_date"), cost.get("cost_type"), cost.get("cost_subtype"),
                         cost.get("details"), cost.get("amount"), (cost.get("payment_status") or {}).get("name", ""), cost.get("payment_due_date")])
        count += 1
print("Saved", count, "cost lines to", path)
# Numeric response tokens remain strings in this guide: signed decimal values are not rounded through float.


EXHIBITDAY_PY

Example response

{
  "records_found": 1,
  "total_records": 1,
  "has_more": false,
  "list_type": "event_cost",
  "list_data": [
    {
      "id": 12345,
      "cost_type_id": 6,
      "cost_type": "Miscellaneous Expense/Credit",
      "cost_subtype": null,
      "details": "Sample expense",
      "cost": {
        "amount": 125.50,
        "cost_center_breakdown": [
          {
            "cost_center_id": null,
            "cost_center": "Not Specified",
            "charge": 125.50
          }
        ]
      },
      "amount": 125.50,
      "amount_cost_center_breakdown": [
        {
          "cost_center_id": null,
          "cost_center": "Not Specified",
          "charge": 125.50
        }
      ],
      "payment_due_date": "",
      "payment_status": {
        "id": 0,
        "name": "Not Specified"
      },
      "next_payment_due_date": "",
      "payment_notes": "",
      "event": {
        "id": 12345,
        "exhibitday_url": "https://www.exhibitday.com/Workspace/Event/98765?eid=12345",
        "name": "Sample Event",
        "start_date": "2026-11-20",
        "end_date": "2026-11-22",
        "participation_type_id": 1,
        "participation_type": "Committed",
        "format_id": 1,
        "format": "In-Person",
        "event_created_timestamp": "2026-11-30T17:00:00Z",
        "event_last_update_timestamp": "2026-11-30T17:00:00Z"
      }
    }
  ]
}
Note: This is the first page of costs for Events that start in the current year. The sample contains one expense. The program converts these records to CSV rows.

The program prints the number of cost rows saved and the output path. Import the completed CSV into your reporting tool. The CSV keeps the decimal amounts as returned by the API.

The curl workflow uses Bash, curl and Python 3. Node.js needs version 18 or later (save as .cjs). Python uses its standard library. C# needs a .NET 8 console project (Program.cs). Java needs Java 11 or later and Gson 2.14.0 at compile time and runtime (Main.java). PHP needs PHP 8.1 or later with cURL. Ruby 3.1 or later and Go 1.18 or later use their standard libraries.

Things to keep in mind

  • Manual example: To select one Event, use filter_by_event_id. To select a different period, use the endpoint's date filters. The full program uses the year filter.
  • Each page is a separate read. If records are added or removed during the export, page boundaries can shift. Export during a quiet period or compare the results again if records changed.
  • Use complete exports to track changes or detect costs that disappeared. Compare the new export with the previous one.
  • The program exports the total amount per cost record. Use amount_cost_center_breakdown from the API when the report needs the individual allocations.