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 functions that can be used by an application, to exchange data and functionality with another application, based on XML (Extensible Markup Language) messages that follow the SOAP (Simple Object Access Protocol) standard. SOAP Web Services, offer a detailed description of their interface, through a WSDL (Web Services Description Language) XML document.

An alternative approach is provided through the use of REST (REpresentational State Transfer) Web Services. This approach does not require the use of XML, SOAP or WSDL but they are using different data exchange formats, such as JSON (JavaScript Object Notation).

OPAP SA offers both of the above described service types.

SOAP Services

The WSDL XML document is available at:

http://applications.opap.gr/DrawsQueryServices/services/DrawQueriesServiceImplPort?wsdl

(A) For the games KINO, LOTTO, JOKER, PROTO, SUPER3, EXTRA5, PROPOGOAL, POWERSPIN, BOWLING and PENALTIES the following methods are exposed:

  • fetch{game}LatestDraw – Accepts no parameters and returns data for the most recent draw or competition of the respective game.
  • fetch{game}DrawsByDate – Accepts a specific date as a parameter and returns data for all the draws or competitions of the respective game for the given date.
  • fetch{game}DrawByNumber – Accepts a specific draw or competition number and returns data for the respective game for the given draw or competition number. The competition number comprises of the year (e.g. 2013) followed by the week that the competition took place (e.g. 42, for the 42nd week of the year).

where {game} is Kino, Lotto, Joker, Proto, Super3, Extra5, PropoGoal, PοwerSpin, Bowling, Penalties

(B) For the game PROPO (Saturday, Sunday or Wednesday) the following methods are exposed:

  • fetchPropoDrawByNumberAndDay – Accepts the competition number and the DayOfTheWeek as parameters. The competition number comprises of the year (e.g. 2013) followed by the week that the competition took place (e.g. 42, for the 42nd week of the year).  DayOfTheWeek  is 7 for Sunday, 3 for Wednesday and 6 for Saturday). The method returns the data of a single draw (if one exists), that matches the given competition number and the given DayOfTheWeek.
  • fetchPropoDrawsByDate – Accepts a specific date as a parameter and returns data for all the competitions that have the given date as starting date.
  • fetchLatest{game}Draw – Accepts no parameters and returns data for the latest competition of the respective game, where {game} is PropoSunday, PropoSaturday or PropoWednesday.

REST Services

For the games KINO, LOTTO, JOKER, PROTO, SUPER3, EXTRA5, PROPO, PROPOGOAL, POWERSPIN, BOWLING and PENALTIES the following services are available:

(A) Data for the most recent draw or competition of a game can be obtained through the URL:

http://applications.opap.gr/DrawsRestServices/{game}/last.{extension}

Where:

  • {game}: kino, lotto, joker, proto, super3, extra5, propogoal, penalties, bowling, pοwerspin, proposun, proposat, propowed
  • {extension}: json ήxml

(B) Data for a specific draw or competition of a game can be obtained through the URL:

http://applications.opap.gr/DrawsRestServices/{game}/{draw_number}.{extension}

Where:

  • {game}: kino, lotto, joker, proto, super3, extra5, propogoal, penalties, bowling, pοwerspin, proposun, proposat, propowed
  • {draw_number}: The draw or competition number. The competition number comprises of the year (e.g. 2013) followed by the week that the competition took place (e.g. 42, for the 42nd week of the year).
  • {extension}: json ήxml

(C) Data for draws or competitions of a specific date can be obtained through the URL:

http://applications.opap.gr/DrawsRestServices/{game}/drawDate/{date}.{extension}

Where:

  • {game}: kino, lotto, joker, proto, super3, extra5, propogoal, penalties, bowling, pοwerspin, proposun, proposat, propowed
  • {date}: The desired date (dd-MM-yyyy)
  • {extension}: json or xml

Note: All URLs, methods and parameter values that are mentioned in this document, are case sensitive.