Numbers API
Overview

Numbers API


Version: 2.0

The William Hill Numbers API uses a single method that allows you to generate random numbers for your application. Numbers can either be unique or can be produced with the chance that some might be the same. For example, you can have a highest value of 6 and a lowest value of 1 with a count of 2 with a unique value of false - this will give you two numbers between 1 and 6 which are independent, just like two dice being rolled.

The Numbers API is a Private API and therefore not automatically available to developers. To use this API, contact your business manager who will guide you through the separate Terms and Conditions of use before you can have the API assigned to your application.
Summary
Method Name Description Resource
getRandomNumbers This method is used to generate random numbers for your app. Within the request, you can specify the lowest number, the highest number and the amount of numbers returned. There is also an option to generate a unique set of numbers with no repetition of the same numbers allowed in the return. https://sandbox.whapi.com/v2/numbers/generate/integers
Resources Expand All Collapse All
getRandomNumbers()
This method is used to generate random numbers for your app. Within the request, you can specify the lowest number, the highest number and the amount of numbers returned. There is also an option to generate a unique set of numbers with no repetition of the same numbers allowed in the return.
Request Example
get https://sandbox.whapi.com/v2/numbers/generate/integers?gameCode=POKER&highest=100&lowest=0&count=7&unique=true HTTP/1.1
Host: sandbox.whapi.com
Accept: application/json
apiKey: l7xx999dd7276c4e4ff7b6aa810cb106xxxx
apiSecret: 04d2db4f6baa456489774afc121exxxx
apiTicket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx

Request Parameters
header parameters
Name Description
apiKey*
apiSecret*
apiTicket
query parameters
Name Description
gameCode*
highest*
lowest*
count*
unique*
Responses Expand All Collapse All
HEAD and OPTIONS
You can call the following idempotent REST methods on all version 2 APIs:

HEAD

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The metainformation contained in the HTTP headers in response to a HEAD request is identical to the information sent in response to a GET request. This method is often used for testing hypertext links for validity, accessibility, and recent modification. The response to a HEAD request may be cacheable in the sense that the information contained in the response can be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache treats the cache entry as stale.

OPTIONS

The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows you to determine the options and/or requirements associated with a resource without implying a resource action or initiating a resource retrieval. Responses to this method are not cacheable. The response includes any header fields that indicate optional features. The response body also includes information about the communication options.



Copyright (c) WHG (International) Limited 2016
Generated Date: 2020-08-07T13:16:32.891+01:00
Use of this document is subject to the William Hill Partner Developer Portal Terms and Conditions.