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
DistanceUnit
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
"km"
EditParticipantInput
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
EventPagination
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 |
|---|---|
|
|
|
|
|
|
|
|
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
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
Locale
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"de"
MailPermission
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
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
ParticipantFieldChoice
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
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
|
|
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
|
|
orders - OrderPagination!
|
Get all orders. The result is ordered by creation date. |
purchases - PurchasePagination!
|
Get all purchases. The result is ordered by creation date. |
events - EventPagination!
|
Get all events. The result is ordered by event start date (newest first). |
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
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
|
|
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 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
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
TicketNumberSequence
TimeSlot
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]
}