Tournament Tickets
An admin_token must include the following claims:
id | uid | sub- At least one of these claims must be present.
- Can be either an
integeror astring.
role- Must be present.
- Must be set to
adminfor any administrative action.
// Example
{
id: "admin",
role: "admin"
}
Creating tickets
Creates tickets based on request data.
Endpoints:
- Staging:
https://customer-game.api.scoutgg-stg.net/tournament_tickets - Production:
https://customer-game.api.scoutgg.net/tournament_tickets
// Request:
{
method: 'POST',
headers: {
authorization: 'Bearer customer {admin_token}'
},
body: {
tournamentTicket: {
type: String, // Type of ticket: marketing (default), godwill (literal API value), satellite, test, billable
tournamentId: Integer <optional>, // ID of target tournament
uids: [String], // array of userIds on client side
seasonId: <Integer> <optional>, // Limit ticket to given season
dueAt: String <ISO8601>, // Datetime until ticket is valid
currency: String, // Currency of ticket (eg. EUR)
buyIn: Decimal, // Stack for non-tournament tickets or Cost of ticket
comment: String <optional>, // some notes related to tickets
ref: String <UUID> <optional>, // UUID to group tickets, automatically generated if not passed
}
}
}
// Successful Response:
{
status: 200,
body: {
total: Integer, // count of created tickets,
ids: [Integer], // array containing ids of all generated tickets
tickets: [{
id: Integer, // ID of ticket
uid: String, // UID of related user
}],
}
}
// Failed Response:
{
status: 422,
body: {
message: String, // error message in translation-key format
error: String, // descriptive error message
}
}
Note: the goodwill ticket type is spelled godwill in the API and must be sent exactly like that.
List Tickets
Lists tickets matching the given filters. Returned list is always sorted by ticketId in descending order.
Endpoints:
- Staging:
https://customer-game.api.scoutgg-stg.net/tournament_tickets - Production:
https://customer-game.api.scoutgg.net/tournament_tickets
// Request:
{
method: 'GET',
headers: {
authorization: 'Bearer customer {admin_token}'
},
query: {
user_id: String <optional>, // Filter tickets belonging to given user
ids: [Integer] <optional>, // when passed filters tickets by ID
ref: String <optional>, // When passed filters tickets by ref
limit: Integer <optional>, // size of page, default: 50
page: Integer <optional>, // page number (0 based) default: 0
}
}
// Successful Response:
{
status: 200,
body: {
total: Integer, // count of matching tickets
tournamentTickets: [{
id: Integer,
type: String, // ticket type: marketing, godwill, satellite, test, billable
kind: String, // ticket scope, derived: "tournament", "season" or "open"
currency: String,
buyIn: Decimal,
cost: { amount: Decimal, currency: String },
dueAt: String<ISO8601>, // datetime until ticket is valid
createdAt: String<ISO8601>,
updatedAt: String<ISO8601>,
tournamentId: Integer, // present for tournament-specific tickets
seasonId: Integer, // present for season tickets
fantasyTeamId: Integer, // ID of team in case ticket is used
comment: String,
user: {
id: Integer, // internal userID
uid: String, // userID on client side
name: String
},
}],
}
}
Fields with null values are omitted from ticket objects. Note that type is the ticket type set at creation, while kind is a derived scope value (tournament, season or open) — they are different fields.
Delete Ticket
Deletes a ticket if it has not been used already.
Endpoints:
- Staging:
https://customer-game.api.scoutgg-stg.net/tournament_tickets/:id - Production:
https://customer-game.api.scoutgg.net/tournament_tickets/:id
// Request:
{
method: 'DELETE',
headers: {
authorization: 'Bearer customer {admin_token}'
},
params: {
id: Integer // ID of ticket to be deleted
}
}
// Successful Response:
{
status: 200,
body: {
ticket: { // the deleted ticket
id: Integer,
type: String, // ticket type: marketing, godwill, satellite, test, billable
currency: String,
tournamentId: Integer,
seasonId: Integer,
affiliateId: Integer,
buyIn: Decimal,
dueAt: String<ISO8601>,
comment: String,
createdAt: String<ISO8601>,
updatedAt: String<ISO8601>,
}
}
}
// Failed Response:
{
status: 403, // in case ticket is used or not available for deletion
body: {
message: String, // error message in translation-key format
error: String, // descriptive error message
}
}