{
  "openapi": "3.1.0",
  "info": {
    "title": "FavouriteOdds B2B Data API",
    "version": "1.1.0",
    "summary": "Read-only commercial odds, lifecycle, decision, bet and result data.",
    "description": "Provisioned early-access API. Coverage is source-specific; Betano soccer and tennis are selected-market feeds, not full-market feeds. The API never accepts or places bets."
  },
  "paths": {
    "/coverage": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Coverage and release evidence",
        "operationId": "get_coverage_data_v1_coverage_get",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoverageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "description": "Coverage and release evidence."
      }
    },
    "/odds/current": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Latest eligible odds",
        "operationId": "get_current_odds_data_v1_odds_current_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sport"
            }
          },
          {
            "name": "odds_phase",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(pre_match|live)$",
              "default": "pre_match",
              "title": "Odds Phase"
            }
          },
          {
            "name": "coverage_scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(full_market|selected_markets|player_props_only)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Coverage Scope"
            }
          },
          {
            "name": "include_stale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Stale"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OddsPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Latest eligible odds."
      }
    },
    "/odds/changes": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Ordered quote changes",
        "operationId": "get_odds_changes_data_v1_odds_changes_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangesPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Ordered quote changes."
      }
    },
    "/odds/summaries": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Opening, closing and movement metrics",
        "operationId": "get_price_summaries_data_v1_odds_summaries_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummariesPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Opening, closing and movement metrics."
      }
    },
    "/markets/lifecycle": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Ordered market lifecycle",
        "operationId": "get_market_lifecycle_data_v1_markets_lifecycle_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LifecyclePage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Ordered market lifecycle."
      }
    },
    "/mappings": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Versioned canonical mappings",
        "operationId": "get_mappings_data_v1_mappings_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Entity Type"
            }
          },
          {
            "name": "include_history",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include History"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MappingsPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Versioned canonical mappings."
      }
    },
    "/decisions": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Complete value-decision records",
        "operationId": "get_decisions_data_v1_decisions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionsPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Complete value-decision records."
      }
    },
    "/bets/summary": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Separate recommendation, paper and placed counts",
        "operationId": "get_bet_summary_data_v1_bets_summary_get",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "description": "Separate recommendation, paper and placed counts."
      }
    },
    "/bets": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "All accessible bet records",
        "operationId": "get_bets_data_v1_bets_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "record_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(paper|placed)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Record Type"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetsPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "All accessible bet records."
      }
    },
    "/bets/{bet_id}": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "One bet record",
        "operationId": "get_bet_data_v1_bets__bet_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "bet_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Bet Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bet"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "One bet record."
      }
    },
    "/bets/{bet_id}/history": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Bet state and settlement audit trail",
        "operationId": "get_bet_history_data_v1_bets__bet_id__history_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "bet_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Bet Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BetHistoryEntry"
                      }
                    }
                  },
                  "additionalProperties": true,
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Bet state and settlement audit trail."
      }
    },
    "/results": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Latest versioned results",
        "operationId": "get_results_data_v1_results_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultsPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Latest versioned results."
      }
    },
    "/exports": {
      "post": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Create a complete NDJSON+gzip export",
        "operationId": "create_export_data_v1_exports_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAccepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Create a complete NDJSON+gzip export."
      }
    },
    "/exports/{export_id}": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Inspect export status and manifest",
        "operationId": "get_export_data_v1_exports__export_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJob"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Inspect export status and manifest."
      }
    },
    "/exports/{export_id}/download": {
      "get": {
        "tags": [
          "B2B Data API"
        ],
        "summary": "Download a ready export",
        "operationId": "download_export_data_v1_exports__export_id__download_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gzip-compressed NDJSON artifact",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Download a ready export."
      }
    }
  },
  "components": {
    "schemas": {
      "ExportAccepted": {
        "properties": {
          "export_id": {
            "type": "string",
            "title": "Export Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "failed"
            ],
            "title": "Status"
          },
          "status_url": {
            "type": "string",
            "title": "Status Url"
          }
        },
        "type": "object",
        "required": [
          "export_id",
          "status",
          "status_url"
        ],
        "title": "ExportAccepted"
      },
      "ExportRequest": {
        "properties": {
          "dataset": {
            "type": "string",
            "enum": [
              "odds_current",
              "odds_changes",
              "odds_summaries",
              "market_lifecycle",
              "mappings",
              "decisions",
              "bets",
              "results"
            ],
            "title": "Dataset"
          },
          "format": {
            "type": "string",
            "const": "ndjson",
            "title": "Format",
            "default": "ndjson"
          },
          "compression": {
            "type": "string",
            "const": "gzip",
            "title": "Compression",
            "default": "gzip"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "sport": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sport"
          },
          "odds_phase": {
            "type": "string",
            "enum": [
              "pre_match",
              "live"
            ],
            "title": "Odds Phase",
            "default": "pre_match"
          },
          "coverage_scope": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "full_market",
                  "selected_markets",
                  "player_props_only"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage Scope"
          },
          "include_stale": {
            "type": "boolean",
            "title": "Include Stale",
            "default": false
          },
          "include_history": {
            "type": "boolean",
            "title": "Include History",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "dataset"
        ],
        "title": "ExportRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "Page": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "additionalProperties": true,
        "required": [
          "next_cursor",
          "has_more"
        ]
      },
      "CoverageResponse": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoverageObservation"
            }
          },
          "releases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchiveRelease"
            }
          }
        },
        "additionalProperties": true,
        "required": [
          "sources",
          "releases"
        ]
      },
      "CoverageObservation": {
        "type": "object",
        "properties": {
          "bookmaker": {
            "type": "string"
          },
          "sport": {
            "type": "string"
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "success": {
            "type": "boolean"
          },
          "complete": {
            "type": "boolean"
          },
          "expected_events": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_events": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "missing_intervals": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "partial_response": {
            "type": "boolean"
          },
          "source_latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "freshness_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_eligible": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "bookmaker",
          "sport",
          "coverage_scope",
          "observed_at",
          "current_eligible"
        ]
      },
      "ArchiveRelease": {
        "type": "object",
        "properties": {
          "release_version": {
            "type": "string"
          },
          "schema_version": {
            "type": "integer"
          },
          "api_version": {
            "type": "string"
          },
          "released_at": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "required": [
          "release_version",
          "schema_version",
          "api_version",
          "released_at"
        ]
      },
      "CoverageScope": {
        "type": "string",
        "enum": [
          "full_market",
          "selected_markets",
          "player_props_only",
          "unavailable"
        ]
      },
      "OddsRecord": {
        "type": "object",
        "properties": {
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "event_name": {
            "type": "string"
          },
          "sport": {
            "type": "string"
          },
          "league": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "kickoff": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_captured_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_eligible": {
            "type": "boolean"
          },
          "market_id": {
            "type": "string"
          },
          "market_name": {
            "type": "string"
          },
          "outcome_id": {
            "type": "string"
          },
          "outcome_name": {
            "type": "string"
          },
          "decimal_odds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "available": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "odds_phase": {
            "type": "string",
            "enum": [
              "pre_match",
              "live"
            ]
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "market_metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "outcome_metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "bookmaker",
          "event_id",
          "market_id",
          "outcome_id",
          "odds_phase",
          "coverage_scope"
        ]
      },
      "PriceSummary": {
        "type": "object",
        "properties": {
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "outcome_id": {
            "type": "string"
          },
          "odds_phase": {
            "type": "string",
            "enum": [
              "pre_match",
              "live"
            ]
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "opening_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "closing_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "highest_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "lowest_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "opening_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "closing_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "movement_count": {
            "type": "integer"
          },
          "line_movement_count": {
            "type": "integer"
          },
          "suspension_count": {
            "type": "integer"
          },
          "reopen_count": {
            "type": "integer"
          },
          "closing_minutes_before_kickoff": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "opening_at": {
            "type": "string",
            "format": "date-time"
          },
          "latest_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "required": [
          "bookmaker",
          "event_id",
          "market_id",
          "outcome_id"
        ]
      },
      "QuoteChange": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "outcome_id": {
            "type": "string"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "odds_phase": {
            "type": "string",
            "enum": [
              "pre_match",
              "live"
            ]
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "old_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "old_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "change_flags": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "required": [
          "id",
          "bookmaker",
          "event_id",
          "market_id",
          "outcome_id",
          "observed_at"
        ]
      },
      "LifecycleEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "outcome_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "odds_phase": {
            "type": "string",
            "enum": [
              "pre_match",
              "live"
            ]
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "lifecycle_event": {
            "type": "string",
            "enum": [
              "market_appeared",
              "outcome_appeared",
              "market_line_moved",
              "market_status_changed",
              "status_changed",
              "line_moved",
              "suspended",
              "reopened",
              "market_disappeared",
              "disappeared"
            ]
          },
          "old_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "new_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "id",
          "bookmaker",
          "event_id",
          "market_id",
          "observed_at",
          "lifecycle_event"
        ]
      },
      "CanonicalMapping": {
        "type": "object",
        "properties": {
          "bookmaker": {
            "type": "string"
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "event",
              "player",
              "market",
              "period",
              "line",
              "outcome"
            ]
          },
          "source_id": {
            "type": "string"
          },
          "mapping_version": {
            "type": "integer"
          },
          "canonical_id": {
            "type": "string"
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded"
            ]
          },
          "valid_from": {
            "type": "string",
            "format": "date-time"
          },
          "valid_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "bookmaker",
          "entity_type",
          "source_id",
          "mapping_version",
          "canonical_id",
          "confidence",
          "status"
        ]
      },
      "ValueDecision": {
        "type": "object",
        "properties": {
          "decision_id": {
            "type": "string"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "outcome_id": {
            "type": "string"
          },
          "coverage_scope": {
            "$ref": "#/components/schemas/CoverageScope"
          },
          "fair_probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "offered_odds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "model_name": {
            "type": "string"
          },
          "model_version": {
            "type": "string"
          },
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "review"
            ]
          },
          "rejection_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_snapshot": {
            "type": "object",
            "additionalProperties": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "decision_id",
          "observed_at",
          "bookmaker",
          "model_name",
          "model_version",
          "decision"
        ]
      },
      "Bet": {
        "type": "object",
        "properties": {
          "bet_id": {
            "type": "string"
          },
          "decision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "record_type": {
            "type": "string",
            "enum": [
              "paper",
              "placed"
            ]
          },
          "placed_at": {
            "type": "string",
            "format": "date-time"
          },
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "outcome_id": {
            "type": "string"
          },
          "requested_odds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted_odds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "stake": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "placement_status": {
            "type": "string"
          },
          "settlement_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "payout": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "profit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "closing_odds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clv": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "void_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "correction_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "bet_id",
          "record_type",
          "bookmaker",
          "event_id",
          "market_id",
          "outcome_id",
          "stake",
          "currency",
          "placement_status"
        ]
      },
      "BetSummary": {
        "type": "object",
        "properties": {
          "recommendation_count": {
            "type": "integer"
          },
          "accepted_recommendation_count": {
            "type": "integer"
          },
          "bet_record_count": {
            "type": "integer"
          },
          "paper_bet_count": {
            "type": "integer"
          },
          "placed_bet_count": {
            "type": "integer"
          },
          "settled_bet_count": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": [
          "recommendation_count",
          "paper_bet_count",
          "placed_bet_count"
        ]
      },
      "BetHistoryEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "bet_id": {
            "type": "string"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "change_type": {
            "type": "string"
          },
          "old_state": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "new_state": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true,
        "required": [
          "id",
          "bet_id",
          "observed_at",
          "change_type",
          "new_state"
        ]
      },
      "EventResult": {
        "type": "object",
        "properties": {
          "bookmaker": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "result_version": {
            "type": "integer"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "home_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "away_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "player_statistics": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "void_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancellation_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "correction_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provenance_source": {
            "type": "string"
          },
          "provenance_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "required": [
          "bookmaker",
          "event_id",
          "result_version",
          "status",
          "provenance_source"
        ]
      },
      "ExportJob": {
        "type": "object",
        "properties": {
          "export_id": {
            "type": "string"
          },
          "dataset": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "ndjson"
            ]
          },
          "compression": {
            "type": "string",
            "enum": [
              "gzip"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "failed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "manifest": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "required": [
          "export_id",
          "dataset",
          "status",
          "created_at"
        ]
      },
      "OddsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OddsRecord"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "ChangesPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteChange"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "SummariesPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceSummary"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "LifecyclePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LifecycleEvent"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "MappingsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CanonicalMapping"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "DecisionsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValueDecision"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "BetsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bet"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      },
      "ResultsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventResult"
            }
          },
          "page": {
            "$ref": "#/components/schemas/Page"
          }
        },
        "additionalProperties": true,
        "required": [
          "data",
          "page"
        ]
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.favouriteodds.com/data/v1",
      "description": "Provisioned production base URL"
    }
  ],
  "x-archive-schema-version": 6,
  "x-archive-release": "commercial-archive-v1",
  "tags": [
    {
      "name": "B2B Data API",
      "description": "Scoped read-only commercial datasets."
    }
  ]
}
