In this section we will take you through the most common user journey your customers would go through before actually placing a bet.

The William Hill API

The William Hill API is a collection of REST services , which enables the developer to create applications that cover the whole betting journey:

  1. Creating a customer betting account  (using William Hill Online Registration Pages through williamhill.com)
  2. Logging into the customer account (Sessions API)
  3. Querying a Customer Betting Account (Accounts API, Sessions API)
  4. Getting the latest market price (Competitions API)
  5. Placing a single bet (Bets API, Betslips API)
  6. Checking the winning's of a customer and what has been bet upon(Bets API)

Integrating with CAS

The William Hill gateways support the HTTP version 1.1. (http://tools.ietf.org/html/rfc2616)

What is Rest?

Representational State Transfer (REST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. REST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture.

REST has gained widespread acceptance across the Web as a simpler alternative to SOAP and WSDL-based Web services. RESTful systems typically, but not always, communicate over the Hypertext Transfer Protocol with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) used by web browsers to retrieve web pages and send data to remote servers.

The REST architectural style was developed by W3C Technical Architecture Group (TAG) in parallel with HTTP 1.1, based on the existing design of HTTP 1.0. The World Wide Web represents the largest implementation of a system conforming to the REST architectural style.

More information here:

HTTP Request methods

The William Hill API follows the best practice HTTP verbs, detailed on http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods. You have to follow the API specific documentation for details. The service will return error code 10003 for all requests with wrong HTTP verb or on wrong HTTP endpoint. See error codes page for more details.

For trouble shooting request please provide the following

  • Approximate date and time of the incident (including time zone)
  • URI of request
  • Request post data
  • Request headers
  • Response
  • Response headers

We recommend that you log all the request ids (returned by the gateway)