Introduction
funciona alg
Documentación general de la API .
Authenticating requests
This API is not authenticated.
Autenticación
Iniciar sesión
Este endpoint permite autenticar a un usuario mediante correo y contraseña. Si las credenciales son correctas, devuelve un token que se utilizará para autenticar las siguientes peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
"https://www.nexasplay.com/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (401):
{
"error": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Registrar un nuevo usuario.
Permite crear un nuevo usuario en el sistema proporcionando los datos personales requeridos. Retorna un token JWT para autenticación posterior.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"consequatur\",
\"last_name\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
\"phone\": \"consequatur\",
\"password_confirmation\": \"consequatur\",
\"birthdate\": \"consequatur\",
\"gender\": \"consequatur\",
\"current_city\": \"consequatur\"
}"
const url = new URL(
"https://www.nexasplay.com/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "consequatur",
"last_name": "consequatur",
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,",
"phone": "consequatur",
"password_confirmation": "consequatur",
"birthdate": "consequatur",
"gender": "consequatur",
"current_city": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (422):
{
"email": [
"The email has already been taken."
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cerrar sesión
Este endpoint cierra la sesión del usuario autenticado invalidando su token JWT. Después de cerrar sesión, el token ya no será válido para futuras peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Successfully logged out"
}
Example response (401):
{
"message": "Token inválido o expirado"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refrescar token JWT
Este endpoint permite renovar el token JWT del usuario autenticado cuando está próximo a expirar. Devuelve un nuevo token válido que debe reemplazar al anterior en las siguientes peticiones.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 60
}
Example response (401):
{
"message": "Token inválido o expirado"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener token de acceso desde una API Key
Este endpoint genera un token JWT válido para el usuario asociado a una API Key. Se usa cuando un sistema externo necesita autenticarse sin usar usuario y contraseña.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"key\": \"consequatur\"
}"
const url = new URL(
"https://www.nexasplay.com/api/token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"key": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
Example response (400):
{
"message": "Invalid Api Key"
}
Example response (401):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Billetera de Usuario
Obtener Saldos
Devuelve los saldos actuales de monedas (coins) y el total de tickets (globalTickets) del usuario autenticado.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/user-balances" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/user-balances"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"coins": 150,
"globalTickets": 75
}
}
Example response (500):
{
"message": "No se pudieron obtener los saldos. Intenta más tarde."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Historial de Transacciones
Devuelve un historial paginado de todas las transacciones de monedas y tickets del usuario autenticado, ordenadas por fecha (más recientes primero).
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/user-transactions?page=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/user-transactions"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"current_page": 1,
"data": [
{
"currency": "tickets",
"type": "assign",
"amount": 25,
"source": "Premio diario",
"date": "2025-09-30T10:30:00Z"
},
{
"currency": "coins",
"type": "spend",
"amount": 10,
"source": "Jugar a Pac-Man",
"date": "2025-09-30T09:15:00Z"
}
],
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Compañías
Actualizar una Compañía
Permite a un administrador de compañía actualizar los detalles de su propia compañía. El usuario debe tener el permiso 'edit_companies' y pertenecer a la compañía que intenta actualizar.
Example request:
curl --request PUT \
"https://www.nexasplay.com/api/companies-edit/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"\\\"Gama Arcades (Centro)\\\"\",
\"description\": \"\\\"La mejor sala de juegos del centro.\\\"\",
\"phone\": \"\\\"3109876543\\\"\",
\"catalog\": \"consequatur\",
\"schedule\": \"\\\"L-V: 10am-8pm\\\"\",
\"address\": \"\\\"Calle 10 #1-23\\\"\",
\"city\": \"mqeopfuudtdsufvyvddqa\",
\"location\": \"\\\"1.2130,-77.2780\\\"\",
\"game_room\": \"consequatur\",
\"label_ids\": [
1,
3
]
}"
const url = new URL(
"https://www.nexasplay.com/api/companies-edit/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "\"Gama Arcades (Centro)\"",
"description": "\"La mejor sala de juegos del centro.\"",
"phone": "\"3109876543\"",
"catalog": "consequatur",
"schedule": "\"L-V: 10am-8pm\"",
"address": "\"Calle 10 #1-23\"",
"city": "mqeopfuudtdsufvyvddqa",
"location": "\"1.2130,-77.2780\"",
"game_room": "consequatur",
"label_ids": [
1,
3
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"name": "Gama Arcades (Centro)",
"logoUrl": null,
"description": "La mejor sala de juegos del centro.",
"phone": "3109876543",
"city": "Pasto",
"location": "1.2130,-77.2780",
"labels": [
{
"id": 1,
"name": "Restaurante"
},
{
"id": 3,
"name": "Familiar"
}
],
"services": [
{
"id": 1,
"name": "Wi-Fi Gratis"
},
{
"id": 2,
"name": "Estacionamiento"
}
]
}
}
Example response (403):
{
"message": "No autorizado para modificar esta compañía."
}
Example response (404):
{
"message": "Compañía no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
POST api/match/join
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/join" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/join"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/rooms/{room_id}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/rooms/4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/rooms/4"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/user"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/{datatype}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/{datatype}/{id}
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/{datatype}/{id}
Example request:
curl --request PUT \
"https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/{datatype}
Example request:
curl --request POST \
"https://www.nexasplay.com/api/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/{datatype}/{id}
Example request:
curl --request DELETE \
"https://www.nexasplay.com/api/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Eventos
Tabla de Clasificación del Evento (Leaderboard)
Devuelve la clasificación de los usuarios para un evento específico, basada en la suma de sus puntuaciones en todos los minijuegos de ese evento.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/events-leaderboard/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/events-leaderboard/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"rank": 1,
"user": {
"id": 2,
"username": "usertest",
"firstName": "Usuario",
"lastName": "Prueba",
"avatarUrl": "users/default.png"
},
"totalScore": 500
},
{
"rank": 2,
"user": {
"id": 1,
"username": "admin",
"firstName": "Wave",
"lastName": "Admin",
"avatarUrl": "users/default.png"
},
"totalScore": 250
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ver Mi Clasificación en un Evento
Obtiene el puntaje total del usuario para un evento específico y su posición (rango) en la tabla de clasificación de ese evento.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/events-leaderboard/1/my-rank" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/events-leaderboard/1/my-rank"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
(Clasificado) {
"data": {
"rank": 2,
"totalScore": 250,
"user": {
"id": 1,
"username": "admin",
"firstName": "Wave",
"lastName": "Admin",
"avatarUrl": "users/default.png"
}
}
}
Example response (200):
(No clasificado) {
"data": {
"rank": null,
"totalScore": 0,
"user": {
"id": 3,
"username": "carlos",
"firstName": "Carlos",
"lastName": "Solarte",
"avatarUrl": "users/default.png"
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Filtros
Listar y Filtrar Compañías
Muestra una lista paginada de compañías. Permite múltiples filtros y opciones de ordenamiento para descubrir compañías.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters?label=Restaurante&has_active_events=1&sort_by=rating" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/companies-filters"
);
const params = {
"label": "Restaurante",
"has_active_events": "1",
"sort_by": "rating",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"name": "Company 1",
"logoUrl": null,
"description": "This company.",
"phone": "3121231230",
"catalogUrl": null,
"schedule": null,
"address": null,
"city": "Pasto",
"location": "1.2136,-77.2793",
"gameRoomUrl": null,
"hasActiveEvents": true
}
]
}
Example response (404):
{
"message": "No query results for model [App\\Models\\Company] 99"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Buscar compañías cercanas
Este endpoint permite buscar compañías cercanas a una ubicación geográfica utilizando latitud, longitud y un radio (en km).
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters/nearby?lat=-12.0464&lng=-77.0428&radius=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"lat\": -89,
\"lng\": -180,
\"radius\": 16
}"
const url = new URL(
"https://www.nexasplay.com/api/companies-filters/nearby"
);
const params = {
"lat": "-12.0464",
"lng": "-77.0428",
"radius": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"lat": -89,
"lng": -180,
"radius": 16
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"name": "Arcade Central Pasto",
"logoUrl": null,
"description": "La mejor sala de juegos de Nariño.",
"phone": null,
"catalogUrl": null,
"schedule": null,
"address": null,
"city": "Pasto",
"location": "1.213615,-77.279343",
"gameRoomUrl": null,
"distance": 0.01
},
]}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener calificación compañia
Calcula y devuelve la calificación promedio (de 1 a 5) y el número total de reseñas para una compañía específica.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-filters/1/average-rating" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/companies-filters/1/average-rating"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"company_id": 1,
"average_rating": "4.3",
"review_count": 15
}
}
Example response (404):
{
"message": "No query results for model [App\\Models\\Company] 99"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Listar y filtrar Eventos
Muestra una lista paginada de todos los eventos que están actualmente activos. Permite filtrar por ciudad, compañía o por los minijuegos incluidos en el evento. Los eventos se ordenan por los más recientes primero.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/events-filters?city=Pasto&company_id=1&minigame_id=2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/events-filters"
);
const params = {
"city": "Pasto",
"company_id": "1",
"minigame_id": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"description": "Gran Torneo de Verano",
"duration": "7 days",
"isActive": true,
"city": "Pasto",
"company": {
"id": 1,
"name": "Arcade Central Pasto"
},
"minigames": [
{
"id": 1,
"name": "Space Invaders"
},
{
"id": 2,
"name": "Tetris Challenge"
}
]
}
],
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Juegos
Iniciar Partida
Valida si el usuario puede pagar el costo del minijuego (con monedas o tickets) y resta el saldo correspondiente, registrando la transacción.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/minigames/1/play" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"payment_method\": \"\\\"coins\\\"\",
\"event_id\": 1
}"
const url = new URL(
"https://www.nexasplay.com/api/minigames/1/play"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"payment_method": "\"coins\"",
"event_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "¡Partida iniciada! Buena suerte."
}
Example response (402):
{
"message": "Saldo de monedas insuficiente."
}
Example response (422):
{
"message": "Este minijuego no está disponible en el evento especificado."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Guardar Puntuación
requires authentication
Guarda la puntuación final del usuario para un minijuego en un evento específico.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/scores" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"minigame_id\": 1,
\"event_id\": 1,
\"score\": 15000
}"
const url = new URL(
"https://www.nexasplay.com/api/scores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"minigame_id": 1,
"event_id": 1,
"score": 15000
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Puntuación guardada exitosamente"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reseñas (Reviews)
Listar Reseñas de una Compañía
Muestra una lista paginada de todas las reseñas para una compañía específica. Las reseñas se ordenan por las más recientes primero.
Example request:
curl --request GET \
--get "https://www.nexasplay.com/api/companies-reviews/1/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/companies-reviews/1/reviews"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 1,
"rating": 5,
"comment": "¡El mejor lugar!",
"user": {
"id": 2,
"name": "Carlos Solarte"
}
}
],
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Crear una Nueva Reseña
Permite al usuario autenticado publicar una nueva reseña para una compañía. Un usuario solo puede publicar una reseña por compañía.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/companies-reviews/1/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rating\": 5,
\"comment\": \"\\\"Me encantó el servicio.\\\"\"
}"
const url = new URL(
"https://www.nexasplay.com/api/companies-reviews/1/reviews"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rating": 5,
"comment": "\"Me encantó el servicio.\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"data": {
"id": 2,
"rating": 5,
"comment": "Me encantó el servicio.",
"user": {
"id": 1,
"name": "Ana Rivera"
}
}
}
Example response (422):
{
"message": "Ya has calificado a esta compañía.",
"errors": {
"company_id": [
"Ya has calificado a esta compañía."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Actualizar una Reseña
Permite al usuario autenticado actualizar su propia reseña para una compañía. El usuario solo puede modificar la calificación y/o el comentario.
Example request:
curl --request PUT \
"https://www.nexasplay.com/api/companies-reviews/1/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"rating\": 4,
\"comment\": \"\\\"Lo he pensado mejor, el servicio fue bueno.\\\"\"
}"
const url = new URL(
"https://www.nexasplay.com/api/companies-reviews/1/reviews"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"rating": 4,
"comment": "\"Lo he pensado mejor, el servicio fue bueno.\""
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"rating": 4,
"comment": "Lo he pensado mejor, el servicio fue bueno.",
"user": {
"id": 1,
"name": "Ana Rivera"
}
}
}
Example response (404):
{
"message": "No se encontró una reseña tuya para esta compañía."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reaccionar a una Reseña (Like/Dislike)
Permite al usuario dar "me gusta" o "no me gusta" a una reseña.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/reviews-react/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reaction\": \"\\\"like\\\"\"
}"
const url = new URL(
"https://www.nexasplay.com/api/reviews-react/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reaction": "\"like\""
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Reacción actualizada.",
"new_likes": 1,
"new_dislikes": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rooms
Crear una nueva sala de juego.
requires authentication
Este endpoint permite crear una sala automáticamente con un nombre único y asignar al usuario autenticado como propietario. La sala puede ser pública o privada según el parámetro enviado.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/create" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"privacidad\": \"publica\"
}"
const url = new URL(
"https://www.nexasplay.com/api/match/create"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"privacidad": "publica"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"status": "success",
"data": {
"id": 1,
"name": "Room-ABCD12",
"owner_id": 5,
"status": "creada",
"privacidad": "publica",
"created_at": "2025-10-08T16:41:12.000000Z",
"updated_at": "2025-10-08T16:41:12.000000Z"
}
} "La respuesta incluye los datos completos de la sala creada, mostrando su estado inicial, privacidad y propietario."
Example response (401):
{
"message": "Unauthenticated."
} "Se retorna cuando el usuario no está autenticado y no puede crear la sala."
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unirse a una sala privada.
requires authentication
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/join/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/join/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 1,
"name": "Harvey"
},
{
"id": 2,
"name": "Pablo"
}
],
"user_count": 2
}
}
Example response (403):
{
"status": "error",
"message": "La sala ya está completa."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Example response (423):
{
"status": "error",
"message": "Otro usuario está uniéndose a la sala, intenta de nuevo."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unirse a una sala pública de forma aleatoria.
requires authentication
Busca una sala pública con espacio disponible (máximo 2 jugadores). Si existe, el usuario se une a ella. Si no existe, se crea una nueva sala pública y el usuario se convierte en su propietario.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/joinramdon" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/joinramdon"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"message": "Te uniste a una sala pública existente.",
"data": {
"room_name": "Room-XYZ123",
"users": [
{
"id": 5,
"first_name": "Harvey"
},
{
"id": 7,
"first_name": "Carlos"
}
],
"user_count": 2
}
}
Example response (201):
{
"status": "created",
"message": "No había sala disponible, se creó una nueva pública.",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 5,
"first_name": "Harvey"
}
],
"user_count": 1
}
}
Example response (423):
{
"status": "error",
"message": "Otro usuario está uniéndose a una sala, intenta de nuevo."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Iniciar una partida.
requires authentication
Verifica si el usuario pertenece a la sala y si hay al menos 2 jugadores para poder iniciar la partida , la idea general es que cuando se cree la sala o se una a la sala ramdon o privada lo pase al star para ver el contrincante.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/start/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/start/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "incompleto",
"users": [
{
"id": 5,
"first_name": "Carlos"
}
],
"message": "Esperando jugadores."
}
Example response (200):
{
"status": "success",
"message": "Partida iniciada.",
"data": {
"room_name": "Room-ABCD12",
"users": [
{
"id": 5,
"first_name": "Carlos"
},
{
"id": 6,
"first_name": "Ana"
}
]
}
}
Example response (403):
{
"status": "error",
"message": "No tienes acceso a esta sala."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Repartir cartas a un jugador en la sala.
requires authentication
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/deal/Room-ABCD12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://www.nexasplay.com/api/match/deal/Room-ABCD12"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"status": "success",
"message": "Cartas asignadas.",
"cards": [
{
"id": 12,
"name": "Fuego Básico",
"element": "fire",
"power": 3,
"sprite_key": "fire_basic",
"win_effect": "fire_blast",
"lose_effect": "smoke"
},
{
"id": 20,
"name": "Agua Básica",
"element": "water",
"power": 2,
"sprite_key": "water_basic",
"win_effect": "water_splash",
"lose_effect": "drowned"
}
]
}
Example response (403):
{
"status": "error",
"message": "No tienes acceso a esta sala."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Jugar una carta en la sala.
requires authentication
Permite al jugador enviar una carta durante una ronda activa. Si la carta es válida y aún no ha sido jugada, se marca como jugada y se le asigna una nueva carta al jugador. Cuando ambos jugadores han jugado, la ronda se resuelve automáticamente.
Example request:
curl --request POST \
"https://www.nexasplay.com/api/match/playcard/Room-OD9PHT94" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"card_id\": 5
}"
const url = new URL(
"https://www.nexasplay.com/api/match/playcard/Room-OD9PHT94"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"card_id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"status": "success",
"message": "Carta enviada correctamente",
"new_card": {
"id": 12
}
}
Example response (400):
{
"status": "error",
"message": "No existe esa carta en la baraja o ya fue jugada"
}
Example response (400):
{
"status": "error",
"message": "Ya jugaste tu carta en esta ronda."
}
Example response (400):
{
"status": "error",
"message": "No hay más cartas disponibles."
}
Example response (403):
{
"status": "error",
"message": "No tienes acceso a esta sala."
}
Example response (404):
{
"status": "error",
"message": "Sala no encontrada."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.