---
title: "Odds API contract testing checklist"
description: "Test v2 odds API IDs, nullable estimates, statuses, cursors and errors against OpenAPI before a production rollout."
url: https://valueoddsapi.com/guides/odds-api-contract-tests/
---

VALUEODDSAPI / BUYER GUIDES

# How do you test an odds API contract before launch?

Pin the OpenAPI version, assert the fields your client uses, and verify real entitled responses before each release.

Published by ValueOddsAPI · 29 November 2026 · Updated 30 November 2026

Check the published schema and your actual response together; a passing schema alone does not prove your target markets are covered.

## In 30 seconds

- Pin a contract revision. The published v2 OpenAPI copy identifies version 2.0.0.
- Test fields you consume. Include IDs, nullable values, status, cursors and error codes.
- Run a live-key smoke test. Compare your entitled response with the contract before release.
- Keep a separate data test. Schema validity cannot establish bookmaker coverage or freshness.

## Which contract should an integration use?

The [v2 reference](https://valueoddsapi.com/docs/#contract) links to a live OpenAPI 3.1 document and a [published copy of v2.0.0](https://valueoddsapi.com/api-contract.json). Keep the version you validated with your application build. Compare a later contract before updating generated clients; do not assume a field absent from your client model is irrelevant to your product.

Use the documented `X-API-Key` header for requests. `GET /v2/me` tells you which products, bookmakers and limits the test key may use. A successful response under one key does not prove another key has the same rights. This is a test-design recommendation based on the documented entitlement model.

## What belongs in a contract test?

Contract assertion and failure signal
| Check | Documented field or behavior | Failure to investigate |
|---|---|---|
| Identity | `event_id`, `selection_id` and `price_id` | A join or upsert key changes shape. |
| Nullable estimate | `fair` and `edge_pct` can be null | The client treats a missing estimate as zero or a signal. |
| Availability | `status`; removed rows have `price: null` | An unavailable quote remains in the offer view. |
| Pagination | `next_cursor` and unchanged filters | A client stops after the first page or mutates the cursor. |
| Errors | `error.code` and `request_id` | A retry loop hides an access or validation fault. |

The fields and response shapes are in the [v2 contract](https://valueoddsapi.com/api-contract.json). The failure signals are suggested client checks.

## How do you avoid a false pass?

Validate at least one complete, entitled response for each endpoint your product calls. Test a deliberately invalid parameter and an access-denied product separately from temporary faults. Do not require a non-null `fair` value on every row: the contract allows null when no reliable estimate is available. Preserve unknown response fields so an additive field does not make a client fail unnecessarily.

Keep schema tests separate from domain tests. A row can satisfy JSON types while its market mapping is wrong or its `checked_at` is too old for your use case. The [mapping guide](https://valueoddsapi.com/guides/market-mapping-odds-api/) and [freshness guide](https://valueoddsapi.com/guides/odds-api-freshness/) describe those checks. No compatibility guarantee beyond the published contract is asserted here.

## What should a release gate measure?

Store the contract version, client commit, test-key entitlement snapshot, tested endpoints and pass/fail assertions with your release candidate. Count failures by field and endpoint. Then run a small real-data pilot on your target sports, markets and bookmakers; record the denominator and observation window. Decide an acceptance threshold before testing rather than after seeing the result.

Check [current product scope](https://valueoddsapi.com/pricing/) and `GET /v2/me` before making a purchase or rollout decision. This guide gives a test plan, not a measured reliability or coverage result.

## Frequently asked questions

**Is a valid OpenAPI response enough to launch? **

No. It checks structure, not whether your target market is mapped, fresh or licensed for your key.

**Should fair always be a number? **

No. The v2 contract permits null when no reliable fair price is available.

**What should I do when the contract changes? **

Compare the new document with the version your client used, regenerate or update types, and run endpoint and domain tests before release.

ValueOddsAPI provides odds data, not betting advice. Betting involves risk of loss and is for adults (18+) only. If gambling stops being fun, contact your local support service, such as StopSpillet in Denmark.

## Pilot the contract gate

Read the [reference](https://valueoddsapi.com/docs/#contract), save the current contract version and test your own entitled endpoints. Record failures and real-data coverage separately. For the client store, use the [price ID and selection ID guide](https://valueoddsapi.com/guides/odds-api-price-identity/) to check which fields belong in an upsert key.
