{"tags":[{"name":"organizer"},{"name":"match_location"},{"name":"organizer_match_locations"},{"name":"tournament_api"}],"info":{"title":"Match locations","termsOfService":"https:\/\/developer.toornament.com\/terms-guidelines","version":"2.0.0","description":"The Toornament platform connects your website and application with the eSports tournaments around the world.","contact":{"name":"Toornament Developer","url":"https:\/\/developer.toornament.com","email":"contact@toornament.com"}},"servers":[{"url":"https:\/\/api.toornament.com\/organizer\/v2"}],"paths":{"\/match-locations":{"get":{"tags":["organizer_match_locations"],"summary":"Retrieve all match locations.","description":"Returns all match locations.\n","parameters":[{"$ref":"#\/components\/parameters\/locationRange"},{"$ref":"#\/components\/parameters\/tournamentIds"},{"$ref":"#\/components\/parameters\/matchLocationIds"},{"$ref":"#\/components\/parameters\/matchLocationTypeIds"},{"$ref":"#\/components\/parameters\/isAvailable"}],"responses":{"206":{"description":"Success","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/MatchLocation"}}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]},"post":{"tags":["organizer_match_locations"],"summary":"Create a new match location.","description":"Creates a new match location in a tournament.","requestBody":{"description":"Match location data","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MatchLocationCreate"}}}},"responses":{"201":{"description":"Match location created.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MatchLocation"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]}},"\/match-locations\/{id}":{"get":{"tags":["organizer_match_locations"],"summary":"Retrieve a single match location.","description":"Returns a match location identified with the given id.","parameters":[{"$ref":"#\/components\/parameters\/locationId"}],"responses":{"200":{"description":"Match location retrieved.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MatchLocation"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]},"patch":{"tags":["organizer_match_locations"],"summary":"Update a single match location.","description":"Updates one or several elements of a single match location.","parameters":[{"$ref":"#\/components\/parameters\/locationId"}],"requestBody":{"description":"Match location data.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MatchLocationBase"}}}},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MatchLocation"}}}}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]},"delete":{"tags":["organizer_match_locations"],"summary":"Delete a single match location.","description":"Deletes a single match location, identified by the given id.","parameters":[{"$ref":"#\/components\/parameters\/locationId"}],"responses":{"204":{"description":"Success."}},"security":[{"apiKey":[],"oAuth2":["organizer:admin"]}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-Api-Key","in":"header"},"oAuth2":{"type":"oauth2","description":"Access token with \u0027organizer:admin\u0027 scope (see (Authorization)[https:\/\/developer.toornament.com\/v2\/security\/authorization])","flows":{"clientCredentials":{"tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:admin":"Grants the ability to create tournament and edit settings."}},"authorizationCode":{"authorizationUrl":"https:\/\/account.toornament.com\/oauth2\/authorize","tokenUrl":"https:\/\/api.toornament.com\/oauth\/v2\/token","scopes":{"organizer:admin":"Grants the ability to create tournament and edit settings."}}}}},"parameters":{"locationRange":{"name":"Range","in":"header","required":true,"schema":{"type":"string","example":"locations=0-49"},"description":"A range of requested items using the \u0027locations\u0027 unit. The size of the range can not exceed 50. (see [Pagination](https:\/\/developer.toornament.com\/v2\/overview\/pagination))"},"locationId":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the match location."},"tournamentIds":{"name":"tournament_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"378426939508809728,534138941862841533"},"description":"Only return match locations for the given list of tournaments."},"matchLocationIds":{"name":"match_location_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"2337697991941756927,2345022089175093247"},"description":"Only return match locations for the given list of ids."},"matchLocationTypeIds":{"name":"match_location_type_ids","in":"query","required":false,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"example":"435866997671919859,435866997671919867"},"description":"Only return match locations for the given list of types."},"isAvailable":{"name":"is_available","in":"query","required":false,"schema":{"type":"boolean","enum":[0,1]},"description":"Whether the location is available because it is unassigned or because the match has ended."}},"schemas":{"MatchLocationBase":{"type":"object","properties":{"name":{"description":"The name of the location.","type":"string","maxLength":40,"example":"Fan Zone by Sponsor"}}},"MatchLocationTournament":{"type":"object","properties":{"tournament_id":{"description":"An identifier for a tournament; can be used in other APIs.","type":"string","example":"378426939508809728"}}},"MatchLocationCreate":{"allOf":[{"$ref":"#\/components\/schemas\/MatchLocationBase"},{"$ref":"#\/components\/schemas\/MatchLocationTournament"},{"type":"object","required":["tournament_id","type","name"],"properties":{"type":{"allOf":[{"$ref":"#\/components\/schemas\/MatchLocationTypeBase"},{"type":"object","description":"The type of the location."}]}}}]},"MatchLocation":{"allOf":[{"$ref":"#\/components\/schemas\/MatchLocationBase"},{"$ref":"#\/components\/schemas\/MatchLocationTournament"},{"type":"object","required":["id","tournament_id","type","name"],"properties":{"id":{"description":"The unique identifier of the match location.","type":"string","example":"2337697991941756927"},"type":{"allOf":[{"$ref":"#\/components\/schemas\/MatchLocationType"},{"type":"object","description":"The type of the location."}]}}}]},"MatchLocationTypeBase":{"type":"object","required":["id"],"properties":{"id":{"description":"The unique identifier of the match location type.","type":"string","example":"378426939508809728"}}},"MatchLocationType":{"allOf":[{"$ref":"#\/components\/schemas\/MatchLocationTypeBase"},{"type":"object","required":["id","name"],"properties":{"name":{"description":"The name of the location type.","type":"string","enum":["station","zone"],"example":"zone"}}}]}}}}