Club API

Read your club's events, reservations, leagues, users and sales from your own tools, and create and change events, reservations, leagues and users: a website, a spreadsheet, a CRM, an automation.

The API is JSON over HTTPS. A key belongs to one club, and every request made with it works on that club and no other. A key reads only until you give it a write scope, and no key can take a payment or give a refund.

Quick start

  1. Create a key. In your club admin, open Settings & Help → API Keys, name the key and tick what it may do. The key is shown once, so copy it then. It starts with sck_.
  2. Check it. This call needs no scope and tells you which club and scopes the key has:
    export SPORTSCARNIVAL_API_KEY="sck_…"
    
    curl https://sportscarnival.com/api/v1 \
      -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
    {
        "data": {
            "club": {
                "id": 12,
                "name": "Northside Pickleball",
                "slug": "northside-pickleball",
                "timezone": "America/Chicago",
                "currency": "USD"
            },
            "key": {
                "name": "Zapier",
                "prefix": "sck_a1B2c3D4",
                "scopes": [
                    "events:read",
                    "reservations:write"
                ],
                "expires_at": null
            }
        }
    }
  3. Read something. For example, this month's events:
    curl "https://sportscarnival.com/api/v1/events?starts_from=2026-12-01" \
      -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
  4. Change something. This needs a key with events:write. See Creating and changing first:
    curl -X POST "https://sportscarnival.com/api/v1/events" \
      -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: 8f81ab96-e77c-4d21-b399-7ae6efcee3f1" \
      -d '{
        "title": "Spring Round Robin",
        "starts_at_local": "2026-03-14 10:00"
    }'

Authentication

Send the key as a bearer token on every request:

Authorization: Bearer sck_…

A key is the only thing the API accepts. A signed-in browser session or a mobile app token does not work here, and a key does not work anywhere else on the site.

Scopes

A key does only what it was given. Each endpoint names the scope it needs; a key without it gets 403 missing_scope. Give each key the fewest scopes that do its job.

ScopeAllows
events:read Events, their capacity and who registered, including what each registration paid.
events:write Create events, change their details, publish, archive and delete them. Includes reading events. Writes
reservations:read Bookings: when, where, what was booked, what it cost and whether it is paid.
reservations:write Make unpaid bookings for customers and cancel unpaid bookings. Takes no payment and gives no refund. Includes reading bookings. Writes
leagues:read Leagues, their teams, schedule and scores.
leagues:write Create leagues and change their details, price and dates. Cannot enter scores. Includes reading leagues. Writes
users:read The member list, plus names, emails and phone numbers wherever a person appears in other data. Sensitive
users:write Add members and change a member's name and phone number. Cannot change emails, passwords or staff accounts. Includes reading the member list. Writes
sales:read Individual sales (invoices) and their line items. Sensitive
reports:read Sales totals for a date range. Sensitive

Personal details

Bookings, sales, registrations and rosters all name a person. What you get for that person depends on one scope:

So a key that only counts court bookings never holds anyone's email address. Members' email_opt_in and sms_opt_in say whether they accept marketing; honour them in anything you send.

Lists, paging and filters

A list answers with data and meta:

{
    "data": [
        "…"
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": true
    }
}

A single record answers with data alone.

Creating and changing

A write is a POST (create), PATCH (change) or DELETE, with a JSON body and Content-Type: application/json. It answers with the record as it now is, in the same shape a read returns.

Retrying safely

A request can time out after the server has already done the work. Send an Idempotency-Key header with a value you make up for each new write (a UUID is ideal), and send the same value when you retry:

Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7

What a write cannot do

Times, dates and money

KindLooks likeMeaning
time (UTC)2026-03-14T23:00:00+00:00An exact moment, ISO-8601, always UTC. Fields end in _at.
local time2026-03-14 18:00:00The same moment on the club's clock, as staff and customers see it. Fields end in _at_local. This is the form you send in a write, with or without seconds.
date2026-03-14A day on the club's clock. Every date filter (from, starts_from…) is a club day, inclusive.
money"54.00"A decimal string in the club's currency, never a float. A refund can be negative.

The club's timezone and currency are in the key check response.

Rate limits

A key may make 120 requests a minute unless your club set another limit on it, and all of a club's keys together may make 300. Every response says where you stand against whichever limit is closer:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117

Past the limit the answer is 429 rate_limited with a Retry-After header in seconds. Wait that long, then carry on. Repeated requests with a missing or wrong key from one address are refused the same way.

Errors

Every failure has the same shape. Write code against code; message is for a person and may be reworded.

{
    "error": {
        "code": "validation_failed",
        "message": "Some parameters or fields are not valid.",
        "status": 422,
        "fields": {
            "start_from": [
                "This parameter is not supported here."
            ]
        },
        "request_id": "2705c07a-152f-4542-85e0-20ee2a0c1864"
    }
}
CodeStatusWhen
unauthenticated 401 No key was sent, or the key is unknown, revoked or expired.
missing_scope 403 The key is valid but was not given the scope this endpoint needs.
key_creator_lacks_access 403 The staff member who created the key has since lost that access at the club. The club issues a new key.
ip_not_allowed 403 The key is limited to certain IP addresses and the request came from another.
club_unavailable 403 The club's account is closed.
browser_request_not_allowed 403 The request came from code in a web page. The API answers servers only: a key in a page can be copied by anyone who opens it.
api_not_enabled 403 The API is not turned on for this club. SportsCarnival turns it on club by club.
user_is_staff 403 The account belongs to staff, and staff accounts cannot be added or changed through the API.
customer_is_staff 403 The customer's email belongs to a staff account, which cannot be booked through the API.
user_is_shared 403 The person also uses a club outside this one's group, so their name and phone cannot be changed through the API.
not_found 404 No such record in this club, or no such endpoint.
method_not_allowed 405 The address exists but does not take that method.
request_in_progress 409 The first request with this Idempotency-Key is still running. Retry shortly.
event_has_registrations 409 People have registered for the event, so it cannot be deleted. Archive it.
email_in_use 409 The email cannot be added through the API. Add the member in the club admin.
booking_not_supported 409 This club's bookings cannot be made through the API yet.
product_not_bookable 409 The product is not one the booking page offers a customer. See the bookable products.
slot_unavailable 409 The time is taken, closed, too soon or not a time the product starts. See its open times.
price_unavailable 409 The server cannot price the product for that time. Book it in the club admin.
duplicate_booking 409 The same customer was booked for the same product and time moments ago.
booking_refused 409 The booking rules refused it. message says why, as the booking page would tell the customer.
reservation_paid 409 The booking has payments, so it is cancelled and refunded in the club admin.
validation_failed 422 A parameter or body field is missing, malformed or not supported. fields says which.
idempotency_key_reused 422 The Idempotency-Key was already used with a different body. Use a new key for a different request.
invalid_idempotency_key 422 The Idempotency-Key header is not 8 to 128 letters, digits, hyphens, underscores, colons or dots.
rate_limited 429 Too many requests from this key, or from all of the club's keys together. Wait for the seconds in the Retry-After header.
too_many_failed_attempts 429 Too many requests with a missing or wrong key from this address.
server_error 500 Something failed on our side. Quote request_id to support.

A record that belongs to another club answers 404 not_found, exactly as if it did not exist.

Changes to the API

We may add endpoints, filters, error codes and fields to version 1, so ignore fields you do not recognise and treat an error code you do not know by its HTTP status. Removing or renaming something, or making an optional field required, would be a new version at a new address, not a change to this one.

Version 1.1 added the write endpoints and scopes, the bookable products and their open times, and price and taxable on a league. Keys made before it are unchanged: they read what they read before and write nothing.

Your key

Check a key

GET /api/v1 any key

The club and key behind the request, and the scopes the key holds. Needs no scope: call it first to test a new key.

Returns

One Meta object.

Example

curl "https://sportscarnival.com/api/v1" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "club": {
            "id": 12,
            "name": "Northside Pickleball",
            "slug": "northside-pickleball",
            "timezone": "America/Chicago",
            "currency": "USD"
        },
        "key": {
            "name": "Zapier",
            "prefix": "sck_a1B2c3D4",
            "scopes": [
                "events:read",
                "reservations:write"
            ],
            "expires_at": null
        }
    }
}

Events

List events

GET /api/v1/events events:read

The club's events, earliest start first. Deleted events are not listed.

Parameters

NameTypeDescription
status string Only events in this state. One of published, unpublished, archived, scheduled.
starts_from date Events starting on or after this club day.
starts_to date Events starting on or before this club day.
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of Event objects.

Example

curl "https://sportscarnival.com/api/v1/events" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 42,
            "title": "Spring Round Robin",
            "slug": "spring-round-robin",
            "description": "<p>Doubles, all levels.</p>",
            "status": "published",
            "starts_at": "2026-03-14T15:00:00+00:00",
            "starts_at_local": "2026-03-14 10:00:00",
            "ends_at": "2026-03-14T18:00:00+00:00",
            "ends_at_local": "2026-03-14 13:00:00",
            "all_day": false,
            "category": {
                "id": 3,
                "name": "Tournaments"
            },
            "location": {
                "id": 2,
                "name": "Main hall"
            },
            "price": "25.00",
            "members_only": false,
            "capacity": 32,
            "registered_count": 18,
            "spots_left": 14,
            "created_at": "2026-01-12T16:04:09+00:00",
            "updated_at": "2026-02-02T19:30:00+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Get an event

GET /api/v1/events/{event} events:read

One event by id.

Parameters

NameTypeDescription
event integer, in path The event's id.

Returns

One Event object.

Example

curl "https://sportscarnival.com/api/v1/events/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 42,
        "title": "Spring Round Robin",
        "slug": "spring-round-robin",
        "description": "<p>Doubles, all levels.</p>",
        "status": "published",
        "starts_at": "2026-03-14T15:00:00+00:00",
        "starts_at_local": "2026-03-14 10:00:00",
        "ends_at": "2026-03-14T18:00:00+00:00",
        "ends_at_local": "2026-03-14 13:00:00",
        "all_day": false,
        "category": {
            "id": 3,
            "name": "Tournaments"
        },
        "location": {
            "id": 2,
            "name": "Main hall"
        },
        "price": "25.00",
        "members_only": false,
        "capacity": 32,
        "registered_count": 18,
        "spots_left": 14,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

List an event's registrations

GET /api/v1/events/{event}/registrations events:read

Who registered, oldest first. registrant carries a name, email and phone only for a key that also holds users:read. Answers typed into the registration form are not returned.

Parameters

NameTypeDescription
event integer, in path The event's id.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of EventRegistration objects.

Example

curl "https://sportscarnival.com/api/v1/events/42/registrations" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 9001,
            "registrant": {
                "id": 1201,
                "name": "Jordan Lee",
                "email": "jordan@example.com",
                "phone": "555-0142"
            },
            "spots": 2,
            "amount_paid": "50.00",
            "checked_in_at": null,
            "registered_at": "2026-02-20T22:11:45+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Create an event

POST /api/v1/events events:write

Creates an event and its registration form. The event is unpublished unless you send status: published, so nothing reaches the club's site by accident. Ticket types, images, category and location are set in the club admin.

Body

FieldTypeDescription
title string The event's title. Required
starts_at_local local time When it starts, on the club's clock. Required
ends_at_local local time or null When it ends, on the club's clock. Not before the start. Null means the start, as does leaving it out on create.
description string or null The public description, as HTML. Scripts and other unsafe markup are removed.
price money or null The base price, with at most two decimals.
capacity integer or null Spots available. Null for unlimited.
members_only boolean Whether only members can register.
status string unpublished unless given. One of published, unpublished.

Returns

201 with one Event object.

Example

curl -X POST "https://sportscarnival.com/api/v1/events" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: e0e88e43-4257-4852-86f1-aeee0fd71c11" \
  -d '{
    "title": "Spring Round Robin",
    "starts_at_local": "2026-03-14 10:00",
    "ends_at_local": "2026-03-14 13:00",
    "description": "<p>Doubles, all levels.</p>",
    "price": "25.00",
    "capacity": 32,
    "members_only": false,
    "status": "published"
}'
{
    "data": {
        "id": 42,
        "title": "Spring Round Robin",
        "slug": "spring-round-robin",
        "description": "<p>Doubles, all levels.</p>",
        "status": "published",
        "starts_at": "2026-03-14T15:00:00+00:00",
        "starts_at_local": "2026-03-14 10:00:00",
        "ends_at": "2026-03-14T18:00:00+00:00",
        "ends_at_local": "2026-03-14 13:00:00",
        "all_day": false,
        "category": {
            "id": 3,
            "name": "Tournaments"
        },
        "location": {
            "id": 2,
            "name": "Main hall"
        },
        "price": "25.00",
        "members_only": false,
        "capacity": 32,
        "registered_count": 18,
        "spots_left": 14,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Update an event

PATCH /api/v1/events/{event} events:write

Changes the fields you send and leaves the rest. Set status to publish, unpublish or archive.

Parameters

NameTypeDescription
event integer, in path The event's id.

Body

FieldTypeDescription
title string The event's title.
starts_at_local local time When it starts, on the club's clock.
ends_at_local local time or null When it ends, on the club's clock. Not before the start. Null means the start, as does leaving it out on create.
description string or null The public description, as HTML. Scripts and other unsafe markup are removed.
price money or null The base price, with at most two decimals.
capacity integer or null Spots available. Null for unlimited.
members_only boolean Whether only members can register.
status string Publish, unpublish or archive the event. One of published, unpublished, archived.

Returns

One Event object.

Example

curl -X PATCH "https://sportscarnival.com/api/v1/events/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 666a7aff-3861-42ce-998e-2f104a9d6e5e" \
  -d '{
    "capacity": 32,
    "status": "published"
}'
{
    "data": {
        "id": 42,
        "title": "Spring Round Robin",
        "slug": "spring-round-robin",
        "description": "<p>Doubles, all levels.</p>",
        "status": "published",
        "starts_at": "2026-03-14T15:00:00+00:00",
        "starts_at_local": "2026-03-14 10:00:00",
        "ends_at": "2026-03-14T18:00:00+00:00",
        "ends_at_local": "2026-03-14 13:00:00",
        "all_day": false,
        "category": {
            "id": 3,
            "name": "Tournaments"
        },
        "location": {
            "id": 2,
            "name": "Main hall"
        },
        "price": "25.00",
        "members_only": false,
        "capacity": 32,
        "registered_count": 18,
        "spots_left": 14,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Delete an event

DELETE /api/v1/events/{event} events:write

Deletes an event nobody has registered for. An event with registrations is refused, because their registrations and payments belong to it: set its status to archived instead.

Parameters

NameTypeDescription
event integer, in path The event's id.

Returns

204 with no body.

Beside the errors any request can get: event_has_registrations.

Example

curl -X DELETE "https://sportscarnival.com/api/v1/events/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"

Reservations

List reservations

GET /api/v1/reservations reservations:read

Bookings, earliest first. One entry per booking, with each court and time it holds under slots. Blocked time and waitlist entries are not bookings and are never listed. An unpaid booking still in a customer's cart is listed with paid: false; if the cart is abandoned it becomes cancelled.

Parameters

NameTypeDescription
status string active (the default), cancelled, or all. One of active, cancelled, all.
starts_from date Bookings starting on or after this club day.
starts_to date Bookings starting on or before this club day.
schedule_id integer Only bookings on this schedule.
user_id integer Only this customer's bookings.
paid string true for paid bookings, false for unpaid. One of true, false.
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of Reservation objects.

Example

curl "https://sportscarnival.com/api/v1/reservations" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 55210,
            "booking_id": 30114,
            "status": "active",
            "starts_at": "2026-03-14T23:00:00+00:00",
            "starts_at_local": "2026-03-14 18:00:00",
            "schedule": {
                "id": 7,
                "name": "Court schedule"
            },
            "customer": {
                "id": 1201,
                "name": "Jordan Lee",
                "email": "jordan@example.com",
                "phone": "555-0142"
            },
            "party_size": 4,
            "products": [
                {
                    "id": 15,
                    "name": "Court rental",
                    "quantity": 1
                }
            ],
            "slots": [
                {
                    "id": 55210,
                    "court": 3,
                    "starts_at": "2026-03-14T23:00:00+00:00",
                    "starts_at_local": "2026-03-14 18:00:00",
                    "duration_minutes": 60
                }
            ],
            "cost": "40.00",
            "paid": true,
            "created_at": "2026-01-12T16:04:09+00:00",
            "updated_at": "2026-02-02T19:30:00+00:00",
            "cancelled_at": null
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Get a reservation

GET /api/v1/reservations/{reservation} reservations:read

One booking by id, active or cancelled.

Parameters

NameTypeDescription
reservation integer, in path The reservation's id.

Returns

One Reservation object.

Example

curl "https://sportscarnival.com/api/v1/reservations/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 55210,
        "booking_id": 30114,
        "status": "active",
        "starts_at": "2026-03-14T23:00:00+00:00",
        "starts_at_local": "2026-03-14 18:00:00",
        "schedule": {
            "id": 7,
            "name": "Court schedule"
        },
        "customer": {
            "id": 1201,
            "name": "Jordan Lee",
            "email": "jordan@example.com",
            "phone": "555-0142"
        },
        "party_size": 4,
        "products": [
            {
                "id": 15,
                "name": "Court rental",
                "quantity": 1
            }
        ],
        "slots": [
            {
                "id": 55210,
                "court": 3,
                "starts_at": "2026-03-14T23:00:00+00:00",
                "starts_at_local": "2026-03-14 18:00:00",
                "duration_minutes": 60
            }
        ],
        "cost": "40.00",
        "paid": true,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00",
        "cancelled_at": null
    }
}

List bookable products

GET /api/v1/bookable-products reservations:read

What POST /reservations can book: the products the club's booking page offers a customer who is not signed in. Private and staff-only products, sign-in-only schedules, cart and pay-before-reserving schedules and multi-part packages are booked in the club admin and are not listed. Empty for a club whose bookings cannot be made through the API yet.

Parameters

NameTypeDescription
schedule_id integer Only products booked on this schedule.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of BookableProduct objects.

Example

curl "https://sportscarnival.com/api/v1/bookable-products" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 15,
            "name": "Court rental",
            "schedule": {
                "id": 7,
                "name": "Court schedule"
            },
            "duration_minutes": 60,
            "duration_options": [
                60,
                90
            ],
            "min_party_size": 2,
            "max_party_size": 8
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

List a product's open times

GET /api/v1/bookable-products/{product}/open-times reservations:read

The times a product can still be booked on one club day, as the booking page would offer them: capacity, opening hours, the schedule's minimum notice and the product's booking window are applied. A time can be taken between this call and the booking.

Parameters

NameTypeDescription
product integer, in path The bookable product's id.
date date The club day. Required
party_size integer How many people. 1 unless given.
duration_minutes integer One of the product's duration_options. Its duration_minutes unless given.

Returns

One OpenTimes object.

Example

curl "https://sportscarnival.com/api/v1/bookable-products/42/open-times?date=2026-03-14" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "product_id": 15,
        "schedule_id": 7,
        "date": "2026-03-14",
        "duration_minutes": 60,
        "party_size": 4,
        "starts_at_local": [
            "2026-03-14 18:00:00",
            "2026-03-14 19:00:00"
        ]
    }
}

Create a reservation

POST /api/v1/reservations reservations:write

Books a product for a customer, through the same rules as the club's booking page: capacity, opening hours, minimum notice and the product's booking window. The price is worked out by the server and returned as cost; you cannot send one. The booking is unpaid (paid: false): the API takes no payment, and the customer pays at the club or staff take payment in the admin. The customer is found by email or created, and becomes a member of the club. An existing account keeps the phone it has (the booking carries the phone you send), and a staff account is refused. The schedule's confirmation emails are sent unless you turn them off.

Body

FieldTypeDescription
schedule_id integer The schedule to book on, from a bookable product. Required
product_id integer The bookable product. Required
starts_at_local local time When it starts, on the club's clock. One of the product's open times. Required
duration_minutes integer One of the product's duration_options. Its duration_minutes unless given.
party_size integer How many people. 1 unless given.
send_confirmation boolean Whether the schedule's confirmation emails go to the customer and staff. True unless given.
customer object Who the booking is for. Required
customer.first_name string First name. Required
customer.last_name string Last name. Required
customer.email string Email address. An existing account with it is used. Required
customer.phone string Phone number for this booking. An existing account's phone is not changed. Required

Returns

201 with one Reservation object.

Beside the errors any request can get: booking_not_supported, product_not_bookable, slot_unavailable, price_unavailable, duplicate_booking, booking_refused, customer_is_staff.

Example

curl -X POST "https://sportscarnival.com/api/v1/reservations" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: f75bac03-f12d-415d-a3d2-17ebf2123e12" \
  -d '{
    "schedule_id": 7,
    "product_id": 15,
    "starts_at_local": "2026-03-14 18:00",
    "duration_minutes": 60,
    "party_size": 4,
    "send_confirmation": true,
    "customer": {
        "first_name": "Jordan",
        "last_name": "Lee",
        "email": "jordan@example.com",
        "phone": "555-0142"
    }
}'
{
    "data": {
        "id": 55210,
        "booking_id": 30114,
        "status": "active",
        "starts_at": "2026-03-14T23:00:00+00:00",
        "starts_at_local": "2026-03-14 18:00:00",
        "schedule": {
            "id": 7,
            "name": "Court schedule"
        },
        "customer": {
            "id": 1201,
            "name": "Jordan Lee",
            "email": "jordan@example.com",
            "phone": "555-0142"
        },
        "party_size": 4,
        "products": [
            {
                "id": 15,
                "name": "Court rental",
                "quantity": 1
            }
        ],
        "slots": [
            {
                "id": 55210,
                "court": 3,
                "starts_at": "2026-03-14T23:00:00+00:00",
                "starts_at_local": "2026-03-14 18:00:00",
                "duration_minutes": 60
            }
        ],
        "cost": "40.00",
        "paid": true,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00",
        "cancelled_at": null
    }
}

Cancel a reservation

DELETE /api/v1/reservations/{reservation} reservations:write

Cancels an unpaid booking, every court and time it holds, and answers with it as cancelled. No cancellation email is sent. A booking with any payment is refused: its refund is worked out in the club admin, and the API moves no money. To move a booking, cancel it and book the new time. Cancelling a cancelled booking changes nothing.

Parameters

NameTypeDescription
reservation integer, in path The reservation's id.

Returns

One Reservation object.

Beside the errors any request can get: reservation_paid.

Example

curl -X DELETE "https://sportscarnival.com/api/v1/reservations/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 55210,
        "booking_id": 30114,
        "status": "active",
        "starts_at": "2026-03-14T23:00:00+00:00",
        "starts_at_local": "2026-03-14 18:00:00",
        "schedule": {
            "id": 7,
            "name": "Court schedule"
        },
        "customer": {
            "id": 1201,
            "name": "Jordan Lee",
            "email": "jordan@example.com",
            "phone": "555-0142"
        },
        "party_size": 4,
        "products": [
            {
                "id": 15,
                "name": "Court rental",
                "quantity": 1
            }
        ],
        "slots": [
            {
                "id": 55210,
                "court": 3,
                "starts_at": "2026-03-14T23:00:00+00:00",
                "starts_at_local": "2026-03-14 18:00:00",
                "duration_minutes": 60
            }
        ],
        "cost": "40.00",
        "paid": true,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00",
        "cancelled_at": null
    }
}

Leagues

List leagues

GET /api/v1/leagues leagues:read

The club's leagues, oldest first. Tournaments are not leagues and are not listed.

Parameters

NameTypeDescription
status string active (the default), archived, or all. One of active, archived, all.
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of League objects.

Example

curl "https://sportscarnival.com/api/v1/leagues" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 310,
            "name": "Tuesday Night Doubles",
            "url": "tuesday-night-doubles",
            "league_type_id": 4,
            "league_format": "standard",
            "scoring_format": "classic",
            "day_of_week": "Tuesday",
            "starts_on": "2026-03-03",
            "ends_on": "2026-05-19",
            "archived": false,
            "description": "<p>Eight weeks plus playoffs.</p>",
            "price": "45.00",
            "taxable": true,
            "team_limit": 12,
            "created_at": "2026-01-12T16:04:09+00:00",
            "updated_at": "2026-02-02T19:30:00+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Get a league

GET /api/v1/leagues/{league} leagues:read

One league by id.

Parameters

NameTypeDescription
league integer, in path The league's id.

Returns

One League object.

Example

curl "https://sportscarnival.com/api/v1/leagues/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 310,
        "name": "Tuesday Night Doubles",
        "url": "tuesday-night-doubles",
        "league_type_id": 4,
        "league_format": "standard",
        "scoring_format": "classic",
        "day_of_week": "Tuesday",
        "starts_on": "2026-03-03",
        "ends_on": "2026-05-19",
        "archived": false,
        "description": "<p>Eight weeks plus playoffs.</p>",
        "price": "45.00",
        "taxable": true,
        "team_limit": 12,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

List a league's teams

GET /api/v1/leagues/{league}/teams leagues:read

Teams by name, each with its roster. A player carries a name, email and phone only for a key that also holds users:read.

Parameters

NameTypeDescription
league integer, in path The league's id.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of LeagueTeam objects.

Example

curl "https://sportscarnival.com/api/v1/leagues/42/teams" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 880,
            "name": "Net Gains",
            "url": "net-gains",
            "paid": true,
            "checked_in": false,
            "players": [
                {
                    "id": 1201,
                    "name": "Jordan Lee",
                    "email": "jordan@example.com",
                    "phone": "555-0142",
                    "captain": true
                }
            ]
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

List a league's games

GET /api/v1/leagues/{league}/games leagues:read

The schedule and results, earliest first. Each game is the same object the league webhooks send.

Parameters

NameTypeDescription
league integer, in path The league's id.
scheduled_from date Games on or after this club day.
scheduled_to date Games on or before this club day.
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of Game objects.

Example

curl "https://sportscarnival.com/api/v1/leagues/42/games" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 71002,
            "league_id": 310,
            "type": "game",
            "is_bye": false,
            "scheduled_at": "2026-03-03T23:30:00+00:00",
            "scheduled_at_local": "2026-03-03 18:30:00",
            "location": {
                "id": 2,
                "name": "Court 2"
            },
            "display_location": "Court 2",
            "status": "scheduled",
            "division_id": null,
            "home_team": {
                "id": 880,
                "name": "Net Gains",
                "url": "net-gains"
            },
            "away_team": {
                "id": 881,
                "name": "Dink Dynasty",
                "url": "dink-dynasty"
            },
            "home_score": "11",
            "away_score": "7",
            "winning_team_id": 880,
            "losing_team_id": 881,
            "message": null,
            "has_conflict": false,
            "series": {
                "home_wins": 2,
                "away_wins": 1
            },
            "match_scores": [
                {
                    "match_number": 1,
                    "home": "11",
                    "away": "9"
                }
            ],
            "updated_at": "2026-03-04T01:02:03+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Create a league

POST /api/v1/leagues leagues:write

Creates the league itself, as the Create League form in the club admin does. Teams, divisions, the schedule and the sign-up form are added in the admin.

Body

FieldTypeDescription
name string The league's name. Required
league_type_id integer One of the club's league types, as league_type_id on its other leagues. Required
team_limit integer How many teams the league takes. Fixed once the league exists. Required
scoring_format string classic unless given. Fixed once the league exists. One of classic, best_of.
starts_on date First day of the season.
ends_on date Last day of the season. Not before the first.
price integer What a team or player pays, before tax: a whole number of the club's currency. 0 unless given.
taxable boolean Whether the club's tax is added at checkout. True unless given.
description string The public description, as HTML. Scripts and other unsafe markup are removed.

Returns

201 with one League object.

Example

curl -X POST "https://sportscarnival.com/api/v1/leagues" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6c0ef2ea-07de-4209-98fb-1af53239b44a" \
  -d '{
    "name": "Tuesday Night Doubles",
    "league_type_id": 4,
    "team_limit": 12,
    "scoring_format": "classic",
    "starts_on": "2026-03-03",
    "ends_on": "2026-05-19",
    "price": 45,
    "taxable": true,
    "description": "<p>Eight weeks plus playoffs.</p>"
}'
{
    "data": {
        "id": 310,
        "name": "Tuesday Night Doubles",
        "url": "tuesday-night-doubles",
        "league_type_id": 4,
        "league_format": "standard",
        "scoring_format": "classic",
        "day_of_week": "Tuesday",
        "starts_on": "2026-03-03",
        "ends_on": "2026-05-19",
        "archived": false,
        "description": "<p>Eight weeks plus playoffs.</p>",
        "price": "45.00",
        "taxable": true,
        "team_limit": 12,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Update a league

PATCH /api/v1/leagues/{league} leagues:write

Changes the fields you send and leaves the rest. The scoring format and team limit are fixed once a league exists, and scores are entered in the admin or by players, not here.

Parameters

NameTypeDescription
league integer, in path The league's id.

Body

FieldTypeDescription
name string The league's name.
league_type_id integer One of the club's league types, as league_type_id on its other leagues.
starts_on date First day of the season.
ends_on date Last day of the season. Not before the first.
price integer What a team or player pays, before tax: a whole number of the club's currency.
taxable boolean Whether the club's tax is added at checkout.
description string The public description, as HTML. Scripts and other unsafe markup are removed.
archived boolean Archive the league, or bring it back.

Returns

One League object.

Example

curl -X PATCH "https://sportscarnival.com/api/v1/leagues/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 11039c38-4ebe-4120-b2fc-3661586779e7" \
  -d '{
    "ends_on": "2026-05-19",
    "price": 45
}'
{
    "data": {
        "id": 310,
        "name": "Tuesday Night Doubles",
        "url": "tuesday-night-doubles",
        "league_type_id": 4,
        "league_format": "standard",
        "scoring_format": "classic",
        "day_of_week": "Tuesday",
        "starts_on": "2026-03-03",
        "ends_on": "2026-05-19",
        "archived": false,
        "description": "<p>Eight weeks plus playoffs.</p>",
        "price": "45.00",
        "taxable": true,
        "team_limit": 12,
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Users

List users

GET /api/v1/users users:read

The club's members, by id. Deleted accounts are never returned.

Parameters

NameTypeDescription
status string active (the default), archived (removed from the club), or all. One of active, archived, all.
search string Part of a name, email or phone number (at least 2 characters).
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of User objects.

Example

curl "https://sportscarnival.com/api/v1/users" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 1201,
            "first_name": "Jordan",
            "last_name": "Lee",
            "email": "jordan@example.com",
            "phone": "555-0142",
            "status": "active",
            "role": "member",
            "banned": false,
            "email_opt_in": true,
            "sms_opt_in": false,
            "joined_at": "2025-09-02T17:20:00+00:00",
            "created_at": "2026-01-12T16:04:09+00:00",
            "updated_at": "2026-02-02T19:30:00+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Get a user

GET /api/v1/users/{user} users:read

One member by id.

Parameters

NameTypeDescription
user integer, in path The user's id.

Returns

One User object.

Example

curl "https://sportscarnival.com/api/v1/users/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 1201,
        "first_name": "Jordan",
        "last_name": "Lee",
        "email": "jordan@example.com",
        "phone": "555-0142",
        "status": "active",
        "role": "member",
        "banned": false,
        "email_opt_in": true,
        "sms_opt_in": false,
        "joined_at": "2025-09-02T17:20:00+00:00",
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Add a user

POST /api/v1/users users:write

Makes the person with this email a member of the club and answers with the member. Accounts are shared by every club a person uses, so the email may already have one. A new account is 201 and has no password until the person sets one. An existing account is added to the club as it is (201): the name and phone you send are not written over details the person entered, and the answer carries only its id, email and membership, with first_name, last_name, phone and the opt-ins null. Someone who is already a member is answered 200 and not changed, except that a member the club had archived becomes active again. A ban is never lifted here. A staff account is refused.

Body

FieldTypeDescription
email string Email address. It decides whether an account already exists. Required
first_name string First name, for a new account. Required
last_name string Last name, for a new account. Required
phone string or null Phone number, for a new account.

Returns

201 with one User object.

Beside the errors any request can get: email_in_use, user_is_staff.

Example

curl -X POST "https://sportscarnival.com/api/v1/users" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: bb5bfecb-eedb-4f64-a1de-de206ada2274" \
  -d '{
    "email": "jordan@example.com",
    "first_name": "Jordan",
    "last_name": "Lee",
    "phone": "555-0142"
}'
{
    "data": {
        "id": 1201,
        "first_name": "Jordan",
        "last_name": "Lee",
        "email": "jordan@example.com",
        "phone": "555-0142",
        "status": "active",
        "role": "member",
        "banned": false,
        "email_opt_in": true,
        "sms_opt_in": false,
        "joined_at": "2025-09-02T17:20:00+00:00",
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Update a user

PATCH /api/v1/users/{user} users:write

Changes a member's name and phone number. Nothing a person signs in with can be changed through the API: not the email, the username or the password. A staff account (an owner or anyone with a staff role, at this club or another) is refused, and so is a person who also uses a club outside this one's group: their details are shared with that club.

Parameters

NameTypeDescription
user integer, in path The user's id.

Body

FieldTypeDescription
first_name string First name.
last_name string Last name.
phone string Phone number.

Returns

One User object.

Beside the errors any request can get: user_is_staff, user_is_shared.

Example

curl -X PATCH "https://sportscarnival.com/api/v1/users/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: e0650cfd-0b67-4724-90ca-898ac51a7e2d" \
  -d '{
    "phone": "555-0142"
}'
{
    "data": {
        "id": 1201,
        "first_name": "Jordan",
        "last_name": "Lee",
        "email": "jordan@example.com",
        "phone": "555-0142",
        "status": "active",
        "role": "member",
        "banned": false,
        "email_opt_in": true,
        "sms_opt_in": false,
        "joined_at": "2025-09-02T17:20:00+00:00",
        "created_at": "2026-01-12T16:04:09+00:00",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Sales

List sales

GET /api/v1/sales sales:read

Invoices with their line items, oldest first. customer carries a name, email and phone only for a key that also holds users:read.

Parameters

NameTypeDescription
from date Sales made on or after this club day.
to date Sales made on or before this club day.
payment_method string Only sales paid this way. One of card_online, refund, check, no_payment, pay_later, cash, card_logged, gift_card, card_swipe, card_saved, donation, other, ach, card_saved_pos, failed.
user_id integer Only this customer's sales.
updated_since date-time Only records changed at or after this time (ISO-8601; UTC when no offset is given). Use it to sync changes.
page integer Which page, from 1.
per_page integer Records per page: 25 by default, at most 100.

Returns

A list of Sale objects.

Example

curl "https://sportscarnival.com/api/v1/sales" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": [
        {
            "id": 88410,
            "payment_method": "card_online",
            "payment_status": "confirmed",
            "customer": {
                "id": 1201,
                "name": "Jordan Lee",
                "email": "jordan@example.com",
                "phone": "555-0142"
            },
            "subtotal": "50.00",
            "tax": "4.00",
            "fees": "0.00",
            "total": "54.00",
            "coupon_code": null,
            "items": [
                {
                    "id": 140233,
                    "type": "reservation",
                    "item_id": 55210,
                    "quantity": 1,
                    "amount": "50.00",
                    "tax": "4.00",
                    "discount": "0.00"
                }
            ],
            "created_at": "2026-03-14T23:05:11+00:00",
            "created_at_local": "2026-03-14 18:05:11",
            "updated_at": "2026-02-02T19:30:00+00:00"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "has_more": false
    }
}

Get a sale

GET /api/v1/sales/{sale} sales:read

One invoice by id.

Parameters

NameTypeDescription
sale integer, in path The sale's id.

Returns

One Sale object.

Example

curl "https://sportscarnival.com/api/v1/sales/42" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "id": 88410,
        "payment_method": "card_online",
        "payment_status": "confirmed",
        "customer": {
            "id": 1201,
            "name": "Jordan Lee",
            "email": "jordan@example.com",
            "phone": "555-0142"
        },
        "subtotal": "50.00",
        "tax": "4.00",
        "fees": "0.00",
        "total": "54.00",
        "coupon_code": null,
        "items": [
            {
                "id": 140233,
                "type": "reservation",
                "item_id": 55210,
                "quantity": 1,
                "amount": "50.00",
                "tax": "4.00",
                "discount": "0.00"
            }
        ],
        "created_at": "2026-03-14T23:05:11+00:00",
        "created_at_local": "2026-03-14 18:05:11",
        "updated_at": "2026-02-02T19:30:00+00:00"
    }
}

Reports

Sales summary

GET /api/v1/reports/sales-summary reports:read

Totals for a range of club days (at most 92), by payment method and by day. The figures are plain sums of the invoices /sales lists: gross is every sale that is not a refund, a no-payment record or a failed payment; refunds are counted apart. They are not the admin Reporting dashboard's figures, which apply further rules for gift cards and register tickets. At an axe-throwing club, bookings paid on the online booking page are not invoices, so they are not in these totals: read them from /reservations. The answer is cached briefly: a range that includes today can be up to five minutes behind /sales.

Parameters

NameTypeDescription
from date First club day. Required
to date Last club day. Required

Returns

One SalesSummary object.

Example

curl "https://sportscarnival.com/api/v1/reports/sales-summary?from=2026-03-01&to=2026-03-31" \
  -H "Authorization: Bearer $SPORTSCARNIVAL_API_KEY"
{
    "data": {
        "from": "2026-03-01",
        "to": "2026-03-31",
        "timezone": "America/Chicago",
        "currency": "USD",
        "gross_sales": "18250.00",
        "refunds": "310.00",
        "net_sales": "17940.00",
        "tax": "1351.85",
        "sale_count": 412,
        "refund_count": 6,
        "by_payment_method": [
            {
                "payment_method": "card_online",
                "sale_count": 301,
                "total": "14980.00"
            }
        ],
        "by_day": [
            {
                "date": "2026-03-14",
                "gross_sales": "912.50",
                "refunds": "0.00",
                "sale_count": 21
            }
        ]
    }
}

Objects

Every field listed is always present in a response unless its type says or null, with one exception: a person's name, email and phone are present only for a key that holds users:read.

Meta

FieldTypeDescription
club Club The club this key belongs to. Every request works on this club and no other.
key Key The key that made the request.

Club

FieldTypeDescription
id integer The club's id.
name string The club's name.
slug string The club's address on the site.
timezone string The club's timezone. Every *_local time and every date filter is on this clock.
currency string The currency of every amount.

Key

FieldTypeDescription
name string The name staff gave the key.
prefix string The first characters of the key, as shown in the admin.
scopes list of string The scopes the key was given. A :write scope also allows the :read of the same data.
expires_at time (UTC) or null When the key stops working, or null if it does not expire.

Person

FieldTypeDescription
id integer or null The person's user id, or null for a guest with no account.
name string or null Only with users:read.
email string or null Only with users:read.
phone string or null Only with users:read.

Named

FieldTypeDescription
id integer Its id.
name string Its name.

Event

FieldTypeDescription
id integer The event's id.
title string The event's title.
slug string The event's address on the club's site.
description string or null The public description, as HTML.
status string published, unpublished, archived, or scheduled (set to publish later).
starts_at time (UTC) or null When it starts (UTC).
starts_at_local local time or null When it starts, on the club's clock.
ends_at time (UTC) or null When it ends (UTC).
ends_at_local local time or null When it ends, on the club's clock.
all_day boolean True when the event has no start time, only a day.
category Named or null Its category, if it has one.
location Named or null Where it is held, if set.
price money or null The base price. An event with several ticket types can charge other amounts.
members_only boolean True when only members can register.
capacity integer or null Spots available, or null when unlimited.
registered_count integer Spots taken.
spots_left integer or null Spots still open, or null when unlimited.
created_at time (UTC) When the record was created (UTC).
updated_at time (UTC) When the record last changed (UTC).

EventRegistration

FieldTypeDescription
id integer The registration's id.
registrant Person Who registered.
spots integer Spots this registration holds.
amount_paid money What has been paid for it.
checked_in_at time (UTC) or null When the registrant was checked in (UTC), or null.
registered_at time (UTC) When they registered (UTC).

Reservation

FieldTypeDescription
id integer The reservation's id.
booking_id integer or null The id shared by every slot of this booking, or null for a single-slot booking that has none.
status string active or cancelled.
starts_at time (UTC) When the earliest slot starts (UTC).
starts_at_local local time When the earliest slot starts, on the club's clock.
schedule Named or null The schedule it was booked on.
customer Person Who the booking is for.
party_size integer or null Players or lanes as booked. What the number counts depends on the product.
products list of BookedProduct What was booked.
slots list of ReservationSlot Each court and time the booking holds.
cost money or null The booking's cost.
paid boolean Whether the booking is marked paid. It is a mark, not a balance: a booking paid by deposit stays marked paid while the rest is still owed.
created_at time (UTC) When the record was created (UTC).
updated_at time (UTC) When the record last changed (UTC).
cancelled_at time (UTC) or null When it was cancelled (UTC), or null.

BookedProduct

FieldTypeDescription
id integer The product's id.
name string The product's name.
quantity integer How many were booked.

BookableProduct

FieldTypeDescription
id integer The product's id: the product_id of a booking.
name string The product's name.
schedule Named The schedule it is booked on: the schedule_id of a booking.
duration_minutes integer How long a booking is unless another length is asked for.
duration_options list of integer Every length it can be booked for, in minutes.
min_party_size integer or null The smallest party it takes, or null for no minimum.
max_party_size integer or null The largest party it takes, or null for no maximum.

OpenTimes

FieldTypeDescription
product_id integer The product asked about.
schedule_id integer The schedule it is booked on.
date date The club day asked about.
duration_minutes integer The booking length the times are for.
party_size integer The party size the times are for.
starts_at_local list of local time Every start still open, on the club's clock. Empty when the day is full, closed or past.

ReservationSlot

FieldTypeDescription
id integer The slot's id.
court integer or null The court or lane number.
starts_at time (UTC) When the slot starts (UTC).
starts_at_local local time When the slot starts, on the club's clock.
duration_minutes integer or null How long the slot is.

League

FieldTypeDescription
id integer The league's id.
name string The league's name.
url string The league's address on the club's site.
league_type_id integer or null The id of the club's league type (sport or category).
league_format string or null standard, individual_rotate, flex or individual.
scoring_format string or null classic, best_of, golf or axe_throwing.
day_of_week string or null The day it plays, if it has one.
starts_on date or null First day of the season.
ends_on date or null Last day of the season.
archived boolean True once the league is archived.
description string or null The public description, as HTML.
price money or null What a team or player pays, before tax.
taxable boolean Whether the club's tax is added at checkout.
team_limit integer or null How many teams the league takes.
created_at time (UTC) When the record was created (UTC).
updated_at time (UTC) When the record last changed (UTC).

LeagueTeam

FieldTypeDescription
id integer The team's id.
name string The team's name.
url string or null The team's address on the site.
paid boolean Whether the team has paid for this league.
checked_in boolean Whether the team is checked in.
players list of Player The roster.

Player

FieldTypeDescription
id integer or null The player's user id.
name string or null Only with users:read.
email string or null Only with users:read.
phone string or null Only with users:read.
captain boolean True for the team's captain.

Game

FieldTypeDescription
id integer The game's id.
league_id integer or null The league it belongs to.
type string game, bye, or message (a note on the schedule).
is_bye boolean True when a team has the week off.
scheduled_at time (UTC) or null When it is played (UTC).
scheduled_at_local local time or null When it is played, on the club's clock.
location GameLocation or null The court.
display_location string or null Where players are told the game is.
status string scheduled, canceled or forfeit.
division_id integer or null Its division, if the league has them.
home_team GameTeam or null The home team.
away_team GameTeam or null The away team.
home_score string or null The home score, as entered. A string, because some formats write more than a number.
away_score string or null The away score, as entered.
winning_team_id integer or null The winner, once decided.
losing_team_id integer or null The loser, once decided.
message string or null A note staff put on the game.
has_conflict boolean True when the schedule flags a conflict for this game.
series Series or null Matches won by each side. Only for best_of scoring; null otherwise.
match_scores list of MatchScore or null Each match's score. Only for best_of scoring; null otherwise.
updated_at time (UTC) or null When the game last changed (UTC).

GameLocation

FieldTypeDescription
id integer or null The court's id, or null when only a label was typed.
name string or null The court's name.

GameTeam

FieldTypeDescription
id integer The team's id.
name string or null The team's name.
url string or null The team's address on the site.

Series

FieldTypeDescription
home_wins integer Matches the home team won.
away_wins integer Matches the away team won.

MatchScore

FieldTypeDescription
match_number integer or null Which match of the series.
home string or null The home score.
away string or null The away score.

User

FieldTypeDescription
id integer The user's id.
first_name string or null First name.
last_name string or null Last name.
email string or null Email address.
phone string or null Phone number.
status string active, or archived once removed from the club.
role string admin for club staff, otherwise member.
banned boolean True while the club has banned the member.
email_opt_in boolean or null Whether the member accepts marketing email. Honour it. Null when withheld (see POST /users): treat as no.
sms_opt_in boolean or null Whether the member accepts text messages. Honour it. Null when withheld (see POST /users): treat as no.
joined_at time (UTC) or null When they joined the club (UTC).
created_at time (UTC) When the record was created (UTC).
updated_at time (UTC) When the record last changed (UTC).

Sale

FieldTypeDescription
id integer The sale's id.
payment_method string How it was paid: card_online, refund, check, no_payment, pay_later, cash, card_logged, gift_card, card_swipe, card_saved, donation, other, ach, card_saved_pos, failed.
payment_status string or null The payment's state, such as confirmed or pending.
customer Person Who bought.
subtotal money or null Before tax and fees.
tax money or null Tax.
fees money or null Fees charged to the customer.
total money or null What the sale came to. A refund can be negative.
coupon_code string or null The coupon used, if any.
items list of SaleItem The lines of the sale.
created_at time (UTC) When the sale was made (UTC).
created_at_local local time When the sale was made, on the club's clock.
updated_at time (UTC) When the record last changed (UTC).

SaleItem

FieldTypeDescription
id integer The line's id.
type string What was sold: reservation, membership, product, event, league and so on.
item_id integer The id of the thing sold, of that type.
quantity integer or null How many.
amount money or null The line's amount.
tax money or null Tax on the line.
discount money or null Discount taken off the line.

SalesSummary

FieldTypeDescription
from date First club day covered.
to date Last club day covered.
timezone string The clock the days are on.
currency string The currency of every amount.
gross_sales money Every sale that is not a refund, a no-payment record or a failed payment.
refunds money Refunds, as a positive amount.
net_sales money gross_sales less refunds.
tax money Tax on the lines of the sales in gross_sales.
sale_count integer Sales in gross_sales.
refund_count integer Refunds.
by_payment_method list of PaymentMethodTotal gross_sales split by how it was paid.
by_day list of DayTotal One entry per club day that had a sale or a refund.

PaymentMethodTotal

FieldTypeDescription
payment_method string How the sales were paid.
sale_count integer Sales paid this way.
total money Their total.

DayTotal

FieldTypeDescription
date date The club day.
gross_sales money Sales that day.
refunds money Refunds that day.
sale_count integer Sales that day.