openapi: 3.0.3
info:
title: 'Smash-Map API Documentation'
description: 'API documentation for the Smash Map website'
version: 1.0.0
servers:
-
url: 'https://smash-map.com'
tags:
-
name: Events
description: ''
paths:
/api/events:
get:
summary: 'List events with filtering, sorting, and pagination support.'
operationId: listEventsWithFilteringSortingAndPaginationSupport
description: ''
parameters:
-
in: query
name: startDate
description: 'Filter events starting from this date (Y-m-d format).'
example: null
required: false
schema:
type: string
description: 'Filter events starting from this date (Y-m-d format).'
example: null
-
in: query
name: endDate
description: 'Filter events ending before this date (Y-m-d format).'
example: null
required: false
schema:
type: string
description: 'Filter events ending before this date (Y-m-d format).'
example: null
-
in: query
name: games
description: "Comma-separated game IDs to filter by. Use \"default\" for no filter.\n\n"
example: '1, 1386'
required: false
schema:
type: string
description: "Comma-separated game IDs to filter by. Use \"default\" for no filter.\n\n"
example: '1, 1386'
-
in: query
name: name
description: "Search events by name (case-insensitive partial match). \n\n"
example: Smash
required: false
schema:
type: string
description: "Search events by name (case-insensitive partial match). \n\n"
example: Smash
-
in: query
name: type
description: "Event type filter.\n - \"default\": All events (no filter)\n - \"online\": Online-only events\n - \"offline\": In-person events\n - \"followed\": Events subscribed by the authenticated user \n\n"
example: offline
required: false
schema:
type: string
description: "Event type filter.\n - \"default\": All events (no filter)\n - \"online\": Online-only events\n - \"offline\": In-person events\n - \"followed\": Events subscribed by the authenticated user \n\n"
example: offline
-
in: query
name: continents
description: "Comma-separated continent codes to filter by. Use \"default\" for no filter.\n\n"
example: 'NA,EU'
required: false
schema:
type: string
description: "Comma-separated continent codes to filter by. Use \"default\" for no filter.\n\n"
example: 'NA,EU'
-
in: query
name: countries
description: "Comma-separated country codes to filter by. Use \"default\" for no filter.\n\n"
example: 'US,CA'
required: false
schema:
type: string
description: "Comma-separated country codes to filter by. Use \"default\" for no filter.\n\n"
example: 'US,CA'
-
in: query
name: orderBy
description: "Sort order for events.\n - \"default\": Sort by start date (ascending)\n - \"attendeesASC\": Sort by attendee count (ascending)\n - \"attendeesDESC\": Sort by attendee count (descending)\n - \"dateASC\": Sort by start date (ascending)\n - \"dateDESC\": Sort by start date (descending) \n"
example: attendeesASC
required: false
schema:
type: string
description: "Sort order for events.\n - \"default\": Sort by start date (ascending)\n - \"attendeesASC\": Sort by attendee count (ascending)\n - \"attendeesDESC\": Sort by attendee count (descending)\n - \"dateASC\": Sort by start date (ascending)\n - \"dateDESC\": Sort by start date (descending) \n"
example: attendeesASC
-
in: query
name: lat
description: 'Latitude for location filtering. Must be used with lng and radius.'
example: null
required: false
schema:
type: number
description: 'Latitude for location filtering. Must be used with lng and radius.'
example: null
-
in: query
name: lng
description: 'Longitude for location filtering. Must be used with lat and radius.'
example: null
required: false
schema:
type: number
description: 'Longitude for location filtering. Must be used with lat and radius.'
example: null
-
in: query
name: radius
description: 'Search radius in kilometers. Must be used with lat and lng.'
example: null
required: false
schema:
type: integer
description: 'Search radius in kilometers. Must be used with lat and lng.'
example: null
-
in: query
name: paginate
description: 'Set to "false" to return all events without pagination. Defaults to true (12 per page).'
example: null
required: false
schema:
type: string
description: 'Set to "false" to return all events without pagination. Defaults to true (12 per page).'
example: null
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: "{\n \"data\": [\n {\n \"id\": 1,\n \"game\": {\n \"name\": \"Super Smash Bros. Melee\",\n \"color\": \"#A30010\"\n },\n \"address\": {\n \"country\": {\n \"name\": \"United States\",\n \"timezone\": \"America/Los_Angeles\"\n },\n \"name\": \"Anaheim Convention Center\",\n \"latitude\": 33.8003,\n \"longitude\": -117.9211\n },\n \"image\": {\n \"url\": \"https://smashmap.example.com/storage/images/events/1.png\"\n },\n \"is_online\": false,\n \"name\": \"Genesis 10\",\n \"iso_start_date_time\": \"2025-10-11T15:30:00-04:00\", # Start date-time in ISO format\n \"iso_end_date_time\": \"2025-10-11T23:00:00-04:00\", # End date-time in ISO format\n \"timezone_start_date_time\": \"11-10-2025 15:30:00\", # How the front-end directly displays the start date-time\n \"timezone_end_date_time\": \"23:00:00\", # How the front-end directly displays the end date-time\n \"timezone\": \"UTC -04:00\",\n \"attendees\": 5000,\n \"link\": \"https://start.gg/tournament/genesis-10\",\n \"user_subscribed\": false\n }\n ],\n \"links\": {\n \"first\": \"https://smashmap.example.com/api/events?page=1\",\n \"last\": \"https://smashmap.example.com/api/events?page=10\",\n \"prev\": null,\n \"next\": \"https://smashmap.example.com/api/events?page=2\"\n },\n \"meta\": {\n \"current_page\": 1,\n \"from\": 1,\n \"last_page\": 10,\n \"per_page\": 12,\n \"to\": 12,\n \"total\": 120\n }\n}"
500:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'An error occurred while retrieving the events E 006'
error: 'Error message details'
properties:
message:
type: string
example: 'An error occurred while retrieving the events E 006'
error:
type: string
example: 'Error message details'
tags:
- Events
security: []
/api/events/statistics:
get:
summary: 'Get event statistics in a format suitable for charts.'
operationId: getEventStatisticsInAFormatSuitableForCharts
description: ''
parameters:
-
in: query
name: type
description: "The type of statistics to retrieve.\n - \"games\": Event count by game\n - \"months\": Event count by month for the next 6 months, broken down by game \n\n "
example: games
required: false
schema:
type: string
description: "The type of statistics to retrieve.\n - \"games\": Event count by game\n - \"months\": Event count by month for the next 6 months, broken down by game \n\n "
example: games
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
data:
labels:
- '64'
- Melee
- Brawl
- 'Project M'
- 'Project +'
- '3DS / WiiU'
- Ultimate
- HDR
- 'Rivals 2'
datasets:
-
data:
- 12
- 450
- 80
- 95
- 150
- 60
- 800
- 30
- 120
backgroundColor:
- '#FAC41A'
- '#A30010'
- '#660d02'
- '#3B448B'
- '#6FD19C'
- '#AFC1EE'
- '#F18A41'
- '#015500'
- '#B19EEF'
hoverBackgroundColor:
- '#D8A504'
- '#82000C'
- '#510A01'
- '#2F366F'
- '#3EC17A'
- '#6A8CDF'
- '#E46810'
- '#013D00'
- '#9A85D1'
eventCount: 1797
message: 'Statistics retrieved with success'
properties:
data:
type: object
properties:
labels:
type: array
example:
- '64'
- Melee
- Brawl
- 'Project M'
- 'Project +'
- '3DS / WiiU'
- Ultimate
- HDR
- 'Rivals 2'
items:
type: string
datasets:
type: array
example:
-
data:
- 12
- 450
- 80
- 95
- 150
- 60
- 800
- 30
- 120
backgroundColor:
- '#FAC41A'
- '#A30010'
- '#660d02'
- '#3B448B'
- '#6FD19C'
- '#AFC1EE'
- '#F18A41'
- '#015500'
- '#B19EEF'
hoverBackgroundColor:
- '#D8A504'
- '#82000C'
- '#510A01'
- '#2F366F'
- '#3EC17A'
- '#6A8CDF'
- '#E46810'
- '#013D00'
- '#9A85D1'
items:
type: object
properties:
data:
type: array
example:
- 12
- 450
- 80
- 95
- 150
- 60
- 800
- 30
- 120
items:
type: integer
backgroundColor:
type: array
example:
- '#FAC41A'
- '#A30010'
- '#660d02'
- '#3B448B'
- '#6FD19C'
- '#AFC1EE'
- '#F18A41'
- '#015500'
- '#B19EEF'
items:
type: string
hoverBackgroundColor:
type: array
example:
- '#D8A504'
- '#82000C'
- '#510A01'
- '#2F366F'
- '#3EC17A'
- '#6A8CDF'
- '#E46810'
- '#013D00'
- '#9A85D1'
items:
type: string
eventCount:
type: integer
example: 1797
message:
type: string
example: 'Statistics retrieved with success'
500:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'An error occurred while retrieving the events statistics E 010'
error: 'Error message details'
properties:
message:
type: string
example: 'An error occurred while retrieving the events statistics E 010'
error:
type: string
example: 'Error message details'
tags:
- Events
security: []