
Web Services from OPAP SA
Web Services is a platform and programming language independent technology, which allows two or more applications to communicate over a network. A Web Service exposes a set of operations that can be used by an application to exchange data and functionality with another application.
OPAP has publicly exposed REST (Representational State Transfer) Web Services, in order for them to be used by any interested external party. These Web Services return the relative data in JSON (JavaScript Object Notation) format.
Notes:
- All URLs, methods and parameter values that are mentioned in this document are case sensitive.
- A Swagger file for the Web Services may be found at : https://api.opap.gr/numerics/v1.0/api-swagger
Numeric Games Draws and Results
For games POWERSPIN, ΤΖΟΚΕR, KINO, LΟΤΤΟ, PRΟΤΟ, SUPER3 and EXTRA5 the following service operations are available:
Description |
URL |
Get the last draw with results or pending results and the active draw for a game. |
https://api.opap.gr/draws/v3.0/{gameId}/last-result-and-active |
Get draws for a game by date range |
https://api.opap.gr/draws/v3.0/{gameId}/draw-date/{fromDate}/{toDate} |
Get last draws for a game |
https://api.opap.gr/draws/v3.0/{gameId}/last/{limit} |
Get draw ids for a game by date range |
https://api.opap.gr/draws/v3.0/{gameId}/draw-date/{fromDate}/{toDate}/draw-id |
Get draw |
https://api.opap.gr/draws/v3.0/{gameId}/{drawId} |
Get draws for a game by draw id range |
https://api.opap.gr/draws/v3.0/{gameId}/draw-id/{fromDrawId}/{toDrawId} |
Upcoming draw for a game |
https://api.opap.gr/draws/v3.0/{gameId}/upcoming/1 |
Get the active draw for a game |
https://api.opap.gr/draws/v3.0/{gameId}/active |
Get game statistics for a game based on a day range (all games except KINO) |
https://api.opap.gr/games/v1.0/{gameId}/statistics |
Get game statistics for KINO based on a day range |
https://api.opap.gr/games/v1.0/1100/statistics?drawRange=1801 |
Notation |
|
{gameId} - Game 1100 Kino |
{fromDate} / {toDate} : Date Format: yyyy-mm-dd(e.g. 2018-06-01 for June 1st, 2018) |
{limit} : Number of last draws to get data for |
|
{drawId} : Draw ID of game |
|
{fromDrawId} / {toDrawId} : From-To Range of DrawId to get data for |
PROPO/PROPOGOAL Schedule, Draws and Results
For games PROPO and PROPOGOAL the following service operations are available:
Description |
URL |
Get the last draw with results or pending results and the active draw for a game. |
https://api.opap.gr/draws/v3.0/{gameId}/last-result-and-active |
Get draws for a game by date range |
https://api.opap.gr/draws/v3.0/{gameId}/draw-date/{fromDate}/{toDate} |
Get last draws for a game |
https://api.opap.gr/draws/v3.0/{gameId}/last/{limit} |
Get draw ids for a game by date range |
https://api.opap.gr/draws/v3.0/{gameId}/draw-date/{fromDate}/{toDate}/draw-id |
Get draw |
https://api.opap.gr/draws/v3.0/{gameId}/visual-draw/{visualDraw} |
Upcoming draw for a game |
https://api.opap.gr/draws/v3.0/{gameId}/upcoming/1 |
Get the active draw for a game |
https://api.opap.gr/draws/v3.0/{gameId}/active |
Get the Program of a game |
https://api.opap.gr/program/v1.0/{gameId}/visual-draw/{visualDrawId} |
Notation |
|
{gameId} - Game 3100 Propo (Sunday) 3101 Propo (Wednesday) 3102 Propo (Saturday) 5105 PropoGoal |
{fromDate} / {toDate} : Date Format: yyyy-mm-dd (e.g. 2018-06-01 for June 1st, 2018) |
{limit} : Number of last draws to get data for |
|
{visualDraw} : The Draw ID of game in format <YYYY><Competition> (e.g. 20185 for the 5th competition of year 2018) |
Examples:
- Schedule for Propo Sunday:
- Invoke /draws/v3.0/3100/active in order to get the Visual Draw of the active Propo Sunday schedule.
- Assuming Visual Draw is 201889, invoke /program/v1.0/3100/visual-draw/201889 in order to get the full Program (team names, match dates and match evaluation).
- Results for Propo Sunday:
- Invoke / draws/v3.0/3100/last-result-and-active, in order to get the draw id of the active Propo schedule for Sunday and the last resulted draw
- Assuming that drawID of active draw is 963 then invoke:
- /draws/v3.0/3100/draw-id/962 (active drawid -1) in order to get the visual draw
- /program/v1.0/3100/962 (active drawid -1) in order to get the full Program (teams, dates, evaluation) along with Results (scores and 1/X/2 mark).
If no active draw is returned by / draws/v3.0/3100/last-result-and-active then for the invocation of the above services the drawid of the last result should be used
- Previous programs of Propo Sunday:
- Invoke /program/v1.0/3100/draw-date/2018-01-01/2108-12-31 in order to get the Visual Draw and its corresponding start/end dates for every Propo Sunday competition of 2018.
- Assuming Visual Draw 201888 is part of the response, invoke /program/v1.0/3100/visual-draw/201888 in order to get the full Program (team names, match dates and match evaluation) along with Results (scores and 1/X/2 mark).