Tournament Tickets
admin_token must contain
role
and either ofid|uid|sub
claims, role must beadmin
for admin actions. andid|uid|sub
can beinteger|string
, eg.{"role": "admin", id: "admin"}
Creating tickets
https://customer-game.api.scoutgg(-stg).net/tournament_tickets
Creates tickets based on passed data.
Request:
{
method: 'POST',
headers: {
authorization: 'Bearer customer {admin_token}'
},
body: {
tournamentTicket: {
kind: String, // Type of ticket: marketing (default), godwill, 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
}
}
}
Success 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
}],
}
}
Failure Response:
{
status: 422,
body: {
message: String, // error is translation key format
error: String, // descriptive error message
}
}
List Tickets
https://customer-game.api.scoutgg(-stg).net/tournament_tickets
Lists tickets matching with given filters.
Returned list is always sorted by ticketId in descending order.
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
}
}
Success Response:
{
status: 200
body: {
total: Integer, // count of matching tickets
tournamentTickets: [{
id: Integer,
type: String,
currency: String,
tournamentId: Integer,
buyIn: Decimal,
createdAt: String<ISO8601>,
fantasyTeamId: Integer, // ID of team in case ticket is used
user: {
id: Integer, // internal userID
uid: String, // userID on client side
name: String
},
// and many other fields
}],
}
}
Delete Ticket
https://customer-game.api.scoutgg(-stg).net/tournament_tickets/:id
Deletes a ticket if it's not already used.
Request:
{
method: 'DELETE',
headers: {
authorization: 'Bearer customer {admin_token}'
},
params: {
id: Integer // ID of ticket to be deleted
}
}
Success Response:
{
status: 200
body: {
ticket: {
id: Integer,
type: String,
currency: String,
tournamentId: Integer,
buyIn: Decimal,
createdAt: String<ISO8601>,
// and many other fields
}
}
}
Failure Response:
{
status: 403, // in case ticket is used or not available for deletion
body: {
message: String, // error is translation key format
error: String, // descriptive error message
}
}