Cricket API — OpenAPI Specification Updates
We've updated the Cricket v2 OpenAPI specification so that its field types, path parameters, and timeline event types match the data the API returns. API responses are unchanged.
The update covers three areas:
- Integer types. Fields that hold whole numbers are now declared
type: integer. They were previously declaredtype: number. - Daily Schedule path parameter. The path template is now
/{locale}/schedules/{urn_date}/schedule— the placeholder name now matches theurn_dateparameter. The URL you actually send to the API is unchanged, so existing integrations that already hit this endpoint don't need to change their requests. - Timeline event types. The
typeenum for timeline events now includesball(a ball delivery) andmatch_ended(the match conclusion). These events have always appeared in Match Timeline responses — the specification previously omitted them.
The following fields are now declared as integers:
| Endpoints | Fields now declared type: integer |
|---|---|
| Match Summary, Match Timeline, Match Timeline Delta | Team batting runs |
| Match Timeline, Match Timeline Delta | Timeline event id, inning, over_number, ball_number, delivery, dismissals_home, dismissals_away; batting_params: angle_traversed, runs_scored; bowling_params: extra_runs_conceded, pitch_x, pitch_y |
| Tournament Leaders | rank (every leaderboard); total on the runs, wickets, sixes, fours, fifties, hundreds, maidens, dot balls, and catches leaderboards |
| Tournament Standings | rank, played, win, draw, loss, runs_for, runs_against |
⭐ Benefit
Generated clients and data models now match the API's actual behavior out of the box — no hand-patching the spec, no custom deserialization for integer fields, and no unknown-enum errors on existing timeline events.
If you generate a client or data models from the OpenAPI specification, regenerate them after pulling the updated spec. In typed languages, the integer-type changes may require updates to any code that currently reads those fields as decimals.
📋 Recommended Actions
- If you generate a client or data models from the OpenAPI specification, regenerate them and review the following:
- In typed languages, the fields listed above change from a floating-point type to an integer type. Update any code that reads them as decimals.
- The date parameter of the Daily Schedule operation is named
urn_date. Update calls that pass it by name. - Code that switches on the timeline event
typeenum gains two values,ballandmatch_ended.
- If you do not generate code from the specification, no action is needed.
🔢 Products
| Sport | Product | Version(s) |
|---|---|---|
| Cricket | Cricket API | v2 |
🔁 Endpoints Affected
- Daily Schedule
- Match Summary
- Match Timeline
- Match Timeline Delta
- Tournament Leaders
- Tournament Standings
📚 Documentation
- Cricket v2 OpenAPI Specification — view and download the updated spec
- Cricket API Overview
