canonical: https://jentic.com/apis/whapi.com

# William Hill APIs

William Hill's whapi.com developer platform exposes its sportsbook as a set of REST APIs covering sports and pricing data, customer accounts, bet placement, session authentication, address and location lookup, and random number generation. Together the six APIs let an application read live competition, event, market and selection data, authenticate a customer session, place and track bets, and query account balances and payments. All endpoints run against the whapi.com sandbox host and return structured JSON that agents can parse directly.

## For AI agents

An agent can authenticate a customer session, read sports competitions, events, markets and prices, place single, multiple or complex bets and check bet history, then look up account balances, payments and card details across William Hill's connected APIs. It can also resolve UK addresses, countries and currencies and generate random numbers for use inside those flows.

## Scope

Use for: Programmatic sports betting against the William Hill sportsbook: reading competition, event and market prices, authenticating a customer session, placing and tracking bets, and querying account balances, payments and card details.

Not supported:
- deposits or withdrawals
- casino or gaming products
- non-UK address lookup
- real-time price streaming
- webhook subscriptions
- production credentials

## APIs

| API | Category | Endpoints | Description |
| --- | --- | --- | --- |
| SportsData API | e-commerce | 15 | Programmatically retrieves a list of competitions for a given class id., retrieves a list of events for a given class id.. |
| Accounts API | productivity | 9 | Programmatically retrieves details of a customers account, get a customers account balance. |
| Bets API | maps-geolocation | 6 | Programmatically places a multiple or a complex bet., places a single bet. |
| Locations | crm | 5 | Programmatically addresslookup, getcountries. |
| Sessions API | identity-auth | 4 | Programmatically logs in a customer and obtains an authentication ticket., checks the validity of a session ticket.. |
| Numbers API | developer-tools | 1 | Programmatically getrandomnumbers. |

## Which API to use

| Need | API | Why |
| --- | --- | --- |
| Read sports competitions, events, markets and prices | sportsdata-api | SportsData API returns competition, event, market and selection data including prices for building a betslip |
| Authenticate a customer and get a session ticket | sessions-api | Sessions API logs in a customer and issues, validates and revokes the authentication ticket other calls rely on |
| Place bets and read bet history | bets-api | Bets API places single, multiple and complex bets, validates betslips, and returns settled and unsettled history |
| Read a customer's balance, payments and card details | accounts-api | Accounts API queries account details, balance, payments and Plus Card status for the logged-in customer |
| Resolve a UK address, country or currency | locations | Locations returns address lookups and reference data for countries and currencies to populate registration forms |

## Cross-API use cases

### Authenticate then place a bet

Log a customer in to obtain a session ticket, read the current markets and prices for an event, then place a single or complex bet against the priced selection.

Example prompt: Call POST /tickets on the Sessions API to log the customer in, GET the event's markets from the SportsData API, then POST /bet/single on the Bets API for the chosen selection

### Reconcile bets against balance

After placing bets, read the customer's bet history and compare it against their account balance and payments to confirm stakes and returns were applied.

Example prompt: Call GET /history on the Bets API for settled and unsettled bets, then GET /account/balance and GET /account/payments on the Accounts API to reconcile

### Price a competition's events

Pull the events and market groups for a competition and enrich each with the customer's account context so an agent can surface relevant markets for a logged-in session.

Example prompt: Validate the session ticket with GET /tickets/{tgt} on the Sessions API, then GET /competitions/{competitionId}/events/ and marketgroups from the SportsData API

### Populate registration then open an account view

Resolve a UK address and reference currency for a new customer, then read the resulting account details once the customer is signed in.

Example prompt: Call GET /address/lookup/ and GET /currencies/ on Locations to fill the form, then GET /account on the Accounts API for the signed-in customer

## Why Jentic

- **Setup:** Instead of wiring each William Hill API against its whapi.com sandbox host and stitching the session, sports data, betting and account calls together by hand, you install Jentic One once and add the APIs you need from the Jentic directory, then your agent calls them.
- **Permission scoping:** Your own Jentic One rules decide which operations each API exposes to the agent. You can allow read-only sports data and balance lookups while withholding write actions such as placing bets or reporting a Plus Card lost until you add them explicitly.
- **Credential handling:** Where an API needs a key, such as the Locations apiKey, your own Jentic One instance stores it once, encrypted, and injects it at execution time so it never enters the agent's prompt, logs, or context. Session tickets from the Sessions API are handled the same way.
- **Discovery method:** An agent searches the Jentic directory by intent, such as 'log in a customer' or 'place a single bet', and Jentic returns the matching William Hill operation with its input schema, so the right API is selected without reading the reference docs.

## Related vendors

- **The Odds API** — Aggregates sports odds across bookmakers, complementing William Hill's single-book pricing data
- **Betfair** — Alternative betting platform with sports markets and account and betting APIs
- **Sportradar** — Sports data and odds feeds that pair with or substitute for the SportsData API
- **Stripe** — Handles payments and payouts, which the William Hill account APIs read but do not process

## FAQ

### What can an agent build across the William Hill APIs?

An agent can run a full sportsbook flow: authenticate a customer with the Sessions API, read competitions, events, markets and prices from the SportsData API, place and track bets with the Bets API, and query balances, payments and card details with the Accounts API. The Locations and Numbers APIs supply supporting address, reference and random-number data.

### Do these APIs share one set of credentials?

No. The Locations API uses an apiKey header, while the other five rely on a session ticket issued by the Sessions API for any call that touches a customer's account or betting. You authenticate once through the Sessions API and reuse the ticket across the account, betting and sports data calls that require it.

### Which API should an agent start with?

For anything customer-specific, start with the Sessions API to obtain an authentication ticket. For read-only market data an agent can call the SportsData API directly, then move to the Bets and Accounts APIs once a session exists.

### Are these production or sandbox endpoints?

The specs point at the whapi.com sandbox host. Treat them as test endpoints for building and validating flows, and confirm production hosts and credentials with William Hill before handling real customer accounts or stakes.

### What is out of scope for this portfolio?

The APIs cover sports betting, accounts, sessions, and location and number utilities. They do not cover deposits or withdrawals, casino or gaming products, non-UK address lookup, real-time price streaming, or webhook subscriptions.

### How does Jentic help an agent use these APIs together?

Once Jentic One is installed, an agent finds and adds any of the William Hill APIs from the Jentic directory by intent, and your own Jentic One instance injects any stored key at execution time. That lets an agent chain the Sessions, SportsData, Bets and Accounts APIs without hardcoding hosts or handling secrets in its context.
