GraphQL API Reference

Use Atleta's GraphQL API to build custom integrations for your project. Using the API, you can retrieve your event, participant, and order information. To access data from your project, an access token is required.

API Endpoints
# Production:
https://atleta.cc/api/graphql
Headers
# Insert your access token
Authorization: Bearer <YOUR_TOKEN_HERE>

Queries

project

Description

The main entrypoint to our API. From here, you can fetch all data related to your project's events and participants. Find your project ID the back-end: the four characters after atleta.cc/b/ are those of your project.

Response

Returns a Project!

Arguments
Name Description
id - ID! Project ID (case-sensitive, alphanumeric).

Example

Query
query project($id: ID!) {
  project(id: $id) {
    id
    organisation_name
    event {
      ...EventFragment
    }
    registrations {
      ...RegistrationPaginationFragment
    }
    orders {
      ...OrderPaginationFragment
    }
    purchases {
      ...PurchasePaginationFragment
    }
    events {
      ...EventPaginationFragment
    }
  }
}
Variables
{"id": "D5n6k9CGdPnF"}
Response
{
  "data": {
    "project": {
      "id": "D5n6k9CGdPnF",
      "organisation_name": "abc123",
      "event": Event,
      "registrations": RegistrationPagination,
      "orders": OrderPagination,
      "purchases": PurchasePagination,
      "events": EventPagination
    }
  }
}

publicEvents

Response

Returns a PublicEventPagination!

Arguments
Name Description
per_page - Int Integer between 1 and 250.
page - Int Positive integer.
sport_types - [SportType!] Filter by sport type.
months - [String!] Filter by months in which the event takes place. Pass dates in yyyy-mm-dd format.
min_distance - Int Filter by distance in meters.
max_distance - Int Filter by distance in meters.
distances - [String!]
countries - [String!] Filter by country.
search - String Search events by title.
sort - String Sort events by date or popularity.

Example

Query
query publicEvents(
  $per_page: Int,
  $page: Int,
  $sport_types: [SportType!],
  $months: [String!],
  $min_distance: Int,
  $max_distance: Int,
  $distances: [String!],
  $countries: [String!],
  $search: String,
  $sort: String
) {
  publicEvents(
    per_page: $per_page,
    page: $page,
    sport_types: $sport_types,
    months: $months,
    min_distance: $min_distance,
    max_distance: $max_distance,
    distances: $distances,
    countries: $countries,
    search: $search,
    sort: $sort
  ) {
    data {
      ...PublicEventFragment
    }
    per_page
    current_page
    last_page
    total
  }
}
Variables
{
  "per_page": 123,
  "page": 123,
  "sport_types": ["running"],
  "months": ["abc123"],
  "min_distance": 123,
  "max_distance": 123,
  "distances": ["abc123"],
  "countries": ["abc123"],
  "search": "abc123",
  "sort": "abc123"
}
Response
{
  "data": {
    "publicEvents": {
      "data": [PublicEvent],
      "per_page": 123,
      "current_page": 123,
      "last_page": 123,
      "total": 123
    }
  }
}

Mutations

editParticipant

Response

Returns a Participant!

Arguments
Name Description
input - EditParticipantInput!

Example

Query
mutation editParticipant($input: EditParticipantInput!) {
  editParticipant(input: $input) {
    id
    email
    granted_mail_permissions {
      ...MailPermissionFragment
    }
  }
}
Variables
{"input": EditParticipantInput}
Response
{
  "data": {
    "editParticipant": {
      "id": "D5n6k9CGdPnF",
      "email": "abc123",
      "granted_mail_permissions": [MailPermission]
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

CouponCode

Fields
Field Name Description
id - ID!
value - String! The code to be entered by the participant.
Example
{
  "id": "D5n6k9CGdPnF",
  "value": "abc123"
}

DistanceUnit

Values
Enum Value Description

km

m

mi

hrs

Example
"km"

EditParticipantInput

Fields
Input Field Description
email - String An e-mail address such as example@atleta.cc.
id - ID!
Example
{
  "email": "abc123",
  "id": "D5n6k9CGdPnF"
}

Event

Fields
Field Name Description
id - ID!
title - String!
start_date - String! UTC timestamp in yyyy-mm-dd hh:mm:ss format.
end_date - String! UTC timestamp in yyyy-mm-dd hh:mm:ss format.
location - EventLocation!
city - String
state - String
country - String ISO 3166-1 alpha-2 string such as NL.
tickets - [Ticket!]!
products - [Product!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "start_date": "abc123",
  "end_date": "abc123",
  "location": EventLocation,
  "city": "abc123",
  "state": "abc123",
  "country": "abc123",
  "tickets": [Ticket],
  "products": [Product]
}

EventLocation

Fields
Field Name Description
id - ID
title - String
description - String
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "description": "abc123"
}

EventPagination

Fields
Field Name Description
data - [Event!]! A list of Event objects.
per_page - Int! The number of results per page.
current_page - Int! The current page.
last_page - Int! The last page.
total - Int! The total number of objects.
Example
{
  "data": [Event],
  "per_page": 123,
  "current_page": 123,
  "last_page": 123,
  "total": 123
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

Gender

Values
Enum Value Description

male

female

neutral

Example
"male"

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID is represented as an alphanumeric, case-sensitive string, and is not intended to be human-readable.

Example
"D5n6k9CGdPnF"

Image

Fields
Field Name Description
id - ID!
url - String! An URL such as https://atleta.cc.
Example
{
  "id": "D5n6k9CGdPnF",
  "url": "abc123"
}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

InvitationCode

Fields
Field Name Description
id - ID!
value - String! The code to be entered by the participant.
Example
{
  "id": "D5n6k9CGdPnF",
  "value": "abc123"
}

Locale

Values
Enum Value Description

de

en

es

fr

nl

Example
"de"

MailPermission

Fields
Field Name Description
id - ID!
title - String!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123"
}

Order

Fields
Field Name Description
id - ID!
first_name - String!
last_name - String!
company_name - String
reference - String
street - String
house_number - String
zip_code - String
city - String
extra_address_line - String
country - String ISO 3166-1 alpha-2 string such as NL.
phone - String Phone number string in E.164 format consisting of a plus-sign, country code, and subscriber number, such as +31 6 12 345 678.
vat_id - String
created_at - String UTC timestamp in yyyy-mm-dd hh:mm:ss format.
deletable - Boolean!
participant - Participant!
participant_field_entries - [ParticipantFieldEntry!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "first_name": "abc123",
  "last_name": "abc123",
  "company_name": "abc123",
  "reference": "abc123",
  "street": "abc123",
  "house_number": "abc123",
  "zip_code": "abc123",
  "city": "abc123",
  "extra_address_line": "abc123",
  "country": "abc123",
  "phone": "abc123",
  "vat_id": "abc123",
  "created_at": "abc123",
  "deletable": true,
  "participant": Participant,
  "participant_field_entries": [ParticipantFieldEntry]
}

OrderPagination

Fields
Field Name Description
data - [Order!]! A list of Order objects.
per_page - Int! The number of results per page.
current_page - Int! The current page.
last_page - Int! The last page.
total - Int! The total number of objects.
Example
{
  "data": [Order],
  "per_page": 123,
  "current_page": 123,
  "last_page": 123,
  "total": 123
}

Participant

Fields
Field Name Description
id - ID!
email - String! An e-mail address such as example@atleta.cc.
granted_mail_permissions - [MailPermission!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "email": "abc123",
  "granted_mail_permissions": [MailPermission]
}

ParticipantField

Fields
Field Name Description
id - ID!
title - String!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123"
}

ParticipantFieldChoice

Fields
Field Name Description
id - ID!
title - String!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123"
}

ParticipantFieldChoiceEntry

Fields
Field Name Description
id - ID
choice - ParticipantFieldChoice! A predefined choice that may be selected by the participant during registration.
Example
{
  "id": "D5n6k9CGdPnF",
  "choice": ParticipantFieldChoice
}

ParticipantFieldEntry

Fields
Field Name Description
id - ID
field - ParticipantField! A custom field that must be filled in during registration.
value - String
choice_entries - [ParticipantFieldChoiceEntry!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "field": ParticipantField,
  "value": "abc123",
  "choice_entries": [ParticipantFieldChoiceEntry]
}

Product

Fields
Field Name Description
id - ID!
title - String!
description - String
image - Image
current_amount - Int! The current amount of this ticket or product's default rate, after applying discount that are currently active, if any.
promotions - [Promotion!]! The list of rates that can be chosen by the participant.
capacity - Int Maximum number of sales.
stock_left - Int Remaining unsold tickets or products.
product_variants - [ProductVariant!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "description": "abc123",
  "image": Image,
  "current_amount": 123,
  "promotions": [Promotion],
  "capacity": 123,
  "stock_left": 123,
  "product_variants": [ProductVariant]
}

ProductVariant

Fields
Field Name Description
id - ID!
title - String!
capacity - Int Maximum number of sales.
stock_left - Int Remaining unsold products of this variant.
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "capacity": 123,
  "stock_left": 123
}

Project

Fields
Field Name Description
id - ID! A case-sensitive string of length 4, containing alphanumeric characters.
organisation_name - String! Your organisation's name.
event - Event! Fetch an event by its ID.
Arguments
id - ID!

Event ID (case-sensitive, alphanumeric).

registrations - RegistrationPagination! Fetch all registrations in this project. Pass one or more event IDs to fetch registrations for (a) specific event(s). Also includes inactive registrations, unless the active argument is set to true. The result is ordered by creation date.
Arguments
per_page - Int

Integer between 1 and 250.

page - Int

Positive integer.

events - [ID!]

Pass one or more event IDs to fetch registrations for (a) specific event(s).

ticket_categories - [ID!]

Pass one or more ticket category IDs to fetch registrations for (a) specific ticket category/categories.

tickets - [ID!]

Pass one or more ticket IDs to fetch registrations for (a) specfic ticket type(s).

time_slots - [ID!]

Pass one or more time slot IDs to fetch registrations for (a) specfic time slot(s).

ticket_number_sequences - [ID!]

Pass one or more ticket number sequence IDs to fetch registrations for (a) specfic ticket number sequence(s).

active - Boolean

Pass true to only fetch non-cancelled registrations.

updated_after - String

Pass an UTC timestamp in yyyy-mm-dd hh:mm:ss format to fetch recently updated registrations.

orders - OrderPagination! Get all orders. The result is ordered by creation date.
Arguments
per_page - Int

Integer between 1 and 250.

page - Int

Positive integer.

events - [ID!]
updated_after - String

UTC timestamp in yyyy-mm-dd hh:mm:ss format.

purchases - PurchasePagination! Get all purchases. The result is ordered by creation date.
Arguments
per_page - Int

Integer between 1 and 250.

page - Int

Positive integer.

tickets - [ID!]
products - [ID!]
active - Boolean
updated_after - String

UTC timestamp in yyyy-mm-dd hh:mm:ss format.

events - EventPagination! Get all events. The result is ordered by event start date (newest first).
Arguments
per_page - Int

Integer between 1 and 250.

page - Int

Positive integer.

Example
{
  "id": "D5n6k9CGdPnF",
  "organisation_name": "abc123",
  "event": Event,
  "registrations": RegistrationPagination,
  "orders": OrderPagination,
  "purchases": PurchasePagination,
  "events": EventPagination
}

Promotion

Fields
Field Name Description
id - ID!
title - String
amount - Int! An integer representing a money amount in cents.
current_amount - Int! An integer representing a money amount in cents.
start_date - String Date and time string in yyyy-mm-dd hh:mm:ss format.
end_date - String Date and time string in yyyy-mm-dd hh:mm:ss format.
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "amount": 123,
  "current_amount": 123,
  "start_date": "abc123",
  "end_date": "abc123"
}

PublicEvent

Fields
Field Name Description
id - ID!
project - Project!
title - String!
description - String
start_date - String! Timestamp in yyyy-mm-dd hh:mm:ss format (event timezone).
end_date - String! Timestamp in yyyy-mm-dd hh:mm:ss format (event timezone).
location - EventLocation!
city - String
state - String
country - String ISO 3166-1 alpha-2 string such as NL.
locale - Locale!
brand_color - String
checkout_url - String! An URL such as https://atleta.cc.
website_url - String An URL such as https://atleta.cc.
logo_url - String An URL such as https://atleta.cc.
header_url - String An URL such as https://atleta.cc.
active_ticket_categories - [PublicTicketCategory!]!
sport_types - [SportType!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "project": Project,
  "title": "abc123",
  "description": "abc123",
  "start_date": "abc123",
  "end_date": "abc123",
  "location": EventLocation,
  "city": "abc123",
  "state": "abc123",
  "country": "abc123",
  "locale": "de",
  "brand_color": "abc123",
  "checkout_url": "abc123",
  "website_url": "abc123",
  "logo_url": "abc123",
  "header_url": "abc123",
  "active_ticket_categories": [PublicTicketCategory],
  "sport_types": ["running"]
}

PublicEventPagination

Fields
Field Name Description
data - [PublicEvent!]! A list of PublicEvent objects.
per_page - Int! The number of results per page.
current_page - Int! The current page.
last_page - Int! The last page.
total - Int! The total number of objects.
Example
{
  "data": [PublicEvent],
  "per_page": 123,
  "current_page": 123,
  "last_page": 123,
  "total": 123
}

PublicTicket

Fields
Field Name Description
id - ID!
title - String!
distance - Float
distance_unit - DistanceUnit
registration_open_at - String Timestamp in yyyy-mm-dd hh:mm:ss format (event timezone).
registration_closed_at - String Timestamp in yyyy-mm-dd hh:mm:ss format (event timezone).
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "distance": 123.45,
  "distance_unit": "km",
  "registration_open_at": "abc123",
  "registration_closed_at": "abc123"
}

PublicTicketCategory

Fields
Field Name Description
id - ID!
title - String!
sport_type - SportType
start_date - String Timestamp in yyyy-mm-dd hh:mm:ss format (event timezone).
active_tickets - [PublicTicket!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "sport_type": "running",
  "start_date": "abc123",
  "active_tickets": [PublicTicket]
}

Purchase

Fields
Field Name Description
id - ID
registration - Registration Object containing the registration details of a participant.
upgrade - Upgrade Object containing the details of a ticket upgrade or stand-alone upgrade.
order - Order! Object consisting of multiple purchases, that belongs to a specific participant.
promotion - Promotion! The rate for which a ticket or product is sold. Tickets and products can have multiple rates with their own price, start date, and end date.
coupon_code - CouponCode The coupon code used by the participant during registration, if any.
amount - Int! Total amount for this purchase in cents.
paid_amount - Int! Paid amount in cents.
refunded_amount - Int! Refunded amount in cents.
remaining_amount - Int! Remaining amount in cents.
invitation_code - InvitationCode The invitation code used by the participant during registration, if any.
Example
{
  "id": "D5n6k9CGdPnF",
  "registration": Registration,
  "upgrade": Upgrade,
  "order": Order,
  "promotion": Promotion,
  "coupon_code": CouponCode,
  "amount": 123,
  "paid_amount": 123,
  "refunded_amount": 123,
  "remaining_amount": 123,
  "invitation_code": InvitationCode
}

PurchasePagination

Fields
Field Name Description
data - [Purchase!]! A list of Purchase objects.
per_page - Int! The number of results per page.
current_page - Int! The current page.
last_page - Int! The last page.
total - Int! The total number of objects.
Example
{
  "data": [Purchase],
  "per_page": 123,
  "current_page": 123,
  "last_page": 123,
  "total": 123
}

Registration

Fields
Field Name Description
id - ID! A string containing alphanumeric characters.
registration_number - Int! Unique integer that identifies this registration. In Atleta's UI, this identifier is often used in conjunection with the 'ATL' prefix.
group_registration_number - Int A unique integer that identifies a group ticket purchase.
assigned - Boolean! Indicates whether this registration has been personalised. If false, the personal information will be empty.
ticket_number - String Bib number.
start_time - String Start time of the assigned start group in hh:mm:ss format.
corral_name - String Name of the assigned start group.
ticket_number_sequence - TicketNumberSequence Object representing the assigned start group.
created_at - String UTC timestamp in yyyy-mm-dd hh:mm:ss format.
team - Team The participant's team.
event - Event! The event that the participant is participating in.
ticket - Ticket! The participant's ticket type.
time_slot - TimeSlot The time slot chosen by the participant.
upgrades - [Upgrade!]! The ticket upgrades purchased with the ticket.
first_name - String
last_name - String
full_name - String
phone - String Phone number string in E.164 format consisting of a plus-sign, country code, and subscriber number, such as +31 6 12 345 678.
emergency_phone - String Phone number string in E.164 format consisting of a plus-sign, country code, and subscriber number, such as +31 6 12 345 678.
gender - Gender A constant representing gender: male, female or neutral.
date_of_birth - String Date and time string in yyyy-mm-dd format.
nationality - String ISO 3166-1 alpha-2 string such as NL.
nationality_ioc - String 3-letter IOC country code such as NLD.
street - String
house_number - String
zip_code - String
city - String
extra_address_line - String
country - String ISO 3166-1 alpha-2 string such as NL.
qr_code - String Unique QR-code generated by Atleta, which can also be scanned by Atleta's scanners.
participant - Participant! The assignee. Or the owner, when the registration is unassigned.
purchase - Purchase! Object containing purchase information about a specific ticket or product.
participant_field_entries - [ParticipantFieldEntry!]! Custom fields that were filled in during registration.
Arguments
include_inactive - Boolean
Example
{
  "id": "D5n6k9CGdPnF",
  "registration_number": 123,
  "group_registration_number": 123,
  "assigned": true,
  "ticket_number": "abc123",
  "start_time": "abc123",
  "corral_name": "abc123",
  "ticket_number_sequence": TicketNumberSequence,
  "created_at": "abc123",
  "team": Team,
  "event": Event,
  "ticket": Ticket,
  "time_slot": TimeSlot,
  "upgrades": [Upgrade],
  "first_name": "abc123",
  "last_name": "abc123",
  "full_name": "abc123",
  "phone": "abc123",
  "emergency_phone": "abc123",
  "gender": "male",
  "date_of_birth": "abc123",
  "nationality": "abc123",
  "nationality_ioc": "abc123",
  "street": "abc123",
  "house_number": "abc123",
  "zip_code": "abc123",
  "city": "abc123",
  "extra_address_line": "abc123",
  "country": "abc123",
  "qr_code": "abc123",
  "participant": Participant,
  "purchase": Purchase,
  "participant_field_entries": [ParticipantFieldEntry]
}

RegistrationPagination

Fields
Field Name Description
data - [Registration!]! A list of Registration objects.
per_page - Int! The number of results per page.
current_page - Int! The current page.
last_page - Int! The last page.
total - Int! The total number of objects.
Example
{
  "data": [Registration],
  "per_page": 123,
  "current_page": 123,
  "last_page": 123,
  "total": 123
}

SportType

Values
Enum Value Description

running

trail_running

obstacle_run

cycling

gravel_cycling

mountainbiking

cyclocross

athletics

biathlon

climbing

combat_sport

duathlon

fishing

fitness

football

golf

handball

hockey

horse_riding

ice_skating

kitesurfing

rowing

sailing

skiing

surfing

swimming

tennis

triathlon

volleyball

walking

yoga

other

Example
"running"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

Team

Fields
Field Name Description
id - ID!
title - String!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123"
}

Ticket

Fields
Field Name Description
id - ID!
title - String!
description - String
image - Image
current_amount - Int! The current amount of this ticket or product's default rate, after applying discount that are currently active, if any.
promotions - [Promotion!]! The list of rates that can be chosen by the participant.
capacity - Int Maximum number of sales.
stock_left - Int Remaining unsold tickets or products.
ticket_category - TicketCategory! A set of ticket types with their own sport type and event date.
time_slots - [TimeSlot!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "description": "abc123",
  "image": Image,
  "current_amount": 123,
  "promotions": [Promotion],
  "capacity": 123,
  "stock_left": 123,
  "ticket_category": TicketCategory,
  "time_slots": [TimeSlot]
}

TicketCategory

Fields
Field Name Description
id - String!
title - String
sport_type - SportType
start_date - String Date and time string in yyyy-mm-dd hh:mm:ss format.
Example
{
  "id": "abc123",
  "title": "abc123",
  "sport_type": "running",
  "start_date": "abc123"
}

TicketNumberSequence

Fields
Field Name Description
id - ID!
start_time - String Time string in hh:mm:ss format.
corral_name - String
title - String!
Example
{
  "id": "D5n6k9CGdPnF",
  "start_time": "abc123",
  "corral_name": "abc123",
  "title": "abc123"
}

TimeSlot

Fields
Field Name Description
id - ID!
title - String
start_date - String! Date and time string in yyyy-mm-dd format.
start_time - String Time string in hh:mm:ss format.
capacity - Int Maximum number of spots for this time slot.
stock_left - Int Remaining spots for this time slot.
Example
{
  "id": "D5n6k9CGdPnF",
  "title": "abc123",
  "start_date": "abc123",
  "start_time": "abc123",
  "capacity": 123,
  "stock_left": 123
}

Upgrade

Fields
Field Name Description
id - ID!
product - Product! A product can usually be purchased together with a ticket (for example: a T-shirt or medal), or as a stand-alone upgrade (for example: a donation).
product_variant - ProductVariant Belongs to a product that comes in different colors, sizes, or other variants.
registration - Registration Object containing the registration details of a participant.
participant - Participant! For ticket upgrades, this is the assignee or the owner when the registration is unassigned. For stand-alone upgrades, this is the owner.
purchase - Purchase! Object containing purchase information about a specific ticket or product.
participant_field_entries - [ParticipantFieldEntry!]!
Example
{
  "id": "D5n6k9CGdPnF",
  "product": Product,
  "product_variant": ProductVariant,
  "registration": Registration,
  "participant": Participant,
  "purchase": Purchase,
  "participant_field_entries": [ParticipantFieldEntry]
}