Tournaments API Documentation
This API allows you to retrieve a paginated list of tournaments in the NR system, filtered by date range, game system, and optional status.
Authentication
All requests require authentication via HTTP headers.NR-Login
: Your usernameNR-Password
: Your password
If authentication fails, you will receive:
{ "message": "Wrong username/password, please contact NR if you need to access this API" }
Endpoint
POST https://www.newrecruit.eu/api/tournaments
Request Body
Send a JSON object with the following fields:
Field | Type | Required | Description |
---|---|---|---|
start | string | Yes | Start date (ISO format or YYYY-MM-DD) |
end | string | Yes | End date (ISO format or YYYY-MM-DD) |
id_game_system | number | Yes | ID of the game system (query /api/systems to find IDs) |
status | number | No | 0 = pending, 1 = open, 2 = ongoing, 3 = closed |
page | number | No | Page number for pagination (default: 1, 50 tournaments per page) |
All fields except
status
and page
are required.Example Request
POST /api/tournaments HTTP/1.1 Host: www.newrecruit.eu Content-Type: application/json NR-Login: myuser NR-Password: mypassword { "start": "2024-01-01", "end": "2024-12-31", "id_game_system": 1, "status": 1, "page": 2 }
Response
- On success:
Returns an object containing:tournaments
: An array of tournament objects (with_id
,name
,start
,end
,status
)total
: Total number of matching tournaments
- If
id_game_system
is missing:
{ "message": "Please specify an id_game_system field, query api /systems to find the id for your system" }
- On other errors:
{ "error": "Incorrect input" }
Notes
start
andend
define the date range for tournaments.- You must specify
id_game_system
to filter tournaments by game system. status
is optional and can be used to filter tournaments by their status.- Results are paginated, with 50 tournaments per page. Use the
page
field to navigate pages (default is 1). - The API logs the user and date of each request internally.
Error Handling
If
If required fields are missing or input is invalid, you will receive:
Internal errors are logged, and you may receive the same response.
id_game_system
is missing, you will receive:{ "message": "Please specify an id_game_system field, query api /systems to find the id for your system"
}
If required fields are missing or input is invalid, you will receive:
{ "error": "Incorrect input" }
Internal errors are logged, and you may receive the same response.
Contact
If you require access or encounter authentication issues, please contact the NR team.