{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/golfdata-co/json-schema/golfdata-co-offer-discovery-response-schema.json",
  "title": "OfferDiscoveryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/golfdata-co-api-openapi.json#/components/schemas/OfferDiscoveryResponse",
  "type": "object",
  "required": [
    "schema_version",
    "canonical_product_id",
    "variant_id",
    "status",
    "results",
    "variants",
    "variants_truncated",
    "coverage"
  ],
  "properties": {
    "schema_version": {
      "const": "golf-offers.v1"
    },
    "canonical_product_id": {
      "type": "string",
      "format": "uuid"
    },
    "variant_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "offers",
        "unavailable",
        "variant_required",
        "variant_unavailable",
        "invalid_request"
      ]
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/VerifiedOfferResponse"
      }
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "variant_id",
          "attributes",
          "specs_verified",
          "specs_observed_at",
          "role"
        ],
        "properties": {
          "variant_id": {
            "type": "string",
            "format": "uuid"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "number"
              ]
            }
          },
          "specs_verified": {
            "type": "boolean"
          },
          "specs_observed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "const": "selection_metadata_not_offer"
          }
        }
      }
    },
    "variants_truncated": {
      "type": "boolean"
    },
    "coverage": {
      "type": "object",
      "required": [
        "candidates_examined",
        "unavailable_count",
        "source_window_count",
        "source_window_truncated",
        "may_have_more",
        "next_offset",
        "pagination_consistency"
      ],
      "properties": {
        "candidates_examined": {
          "type": "integer"
        },
        "unavailable_count": {
          "type": "integer"
        },
        "source_window_count": {
          "type": "integer"
        },
        "source_window_truncated": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "may_have_more": {
          "type": "boolean"
        },
        "next_offset": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 15
        },
        "pagination_consistency": {
          "const": "live_window_not_snapshot"
        }
      }
    }
  },
  "$defs": {
    "AgentOffer": {
      "type": "object",
      "required": [
        "source",
        "canonical_product_id",
        "offer_id",
        "variant_id",
        "variant",
        "attributes",
        "title",
        "merchant",
        "image_url",
        "price",
        "last_observed_price",
        "stock",
        "verification",
        "affiliate",
        "unknown_fields"
      ],
      "properties": {
        "source": {
          "type": "object",
          "required": [
            "kind",
            "id"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "deal",
                "product"
              ]
            },
            "id": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "canonical_product_id": {
          "type": "string",
          "format": "uuid"
        },
        "offer_id": {
          "type": "string",
          "format": "uuid"
        },
        "variant_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "variant": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "hand",
                "flex",
                "loft",
                "shaftMaterial",
                "shaftModel",
                "setMakeup",
                "headSize",
                "length",
                "condition"
              ],
              "properties": {
                "hand": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "flex": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "loft": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "shaftMaterial": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shaftModel": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "setMakeup": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "headSize": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "length": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "condition": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "null"
            ]
          }
        },
        "title": {
          "type": "string"
        },
        "merchant": {
          "type": "string"
        },
        "image_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": "object",
          "required": [
            "amount",
            "currency",
            "observed_at",
            "freshness"
          ],
          "properties": {
            "amount": {
              "type": [
                "number",
                "null"
              ]
            },
            "currency": {
              "type": "null"
            },
            "observed_at": {
              "type": "string",
              "format": "date-time"
            },
            "freshness": {
              "type": "string"
            }
          }
        },
        "last_observed_price": {
          "type": "object",
          "required": [
            "amount",
            "currency",
            "observed_at"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "null"
            },
            "observed_at": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "stock": {
          "type": "object",
          "required": [
            "in_stock_at_observation",
            "observed_at"
          ],
          "properties": {
            "in_stock_at_observation": {
              "const": true
            },
            "observed_at": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "verification": {
          "type": "object",
          "required": [
            "path",
            "link_verified_at",
            "policy_version",
            "valid_until"
          ],
          "properties": {
            "path": {
              "const": "chip-commerce-gate"
            },
            "link_verified_at": {
              "type": "string",
              "format": "date-time"
            },
            "policy_version": {
              "type": "string"
            },
            "valid_until": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "affiliate": {
          "type": "object",
          "required": [
            "status",
            "network",
            "url",
            "click_attribution"
          ],
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "affiliate",
                "nonaffiliate"
              ]
            },
            "network": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "click_attribution": {
              "const": "not_created"
            }
          }
        },
        "unknown_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "actionability": {
          "type": "object",
          "required": [
            "status",
            "blockers"
          ],
          "properties": {
            "status": {
              "const": "not_purchase_ready"
            },
            "blockers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "description": "Read-only observed evidence. verified_offer is not purchase readiness. Currency is unknown; no click attribution or purchase authority is created. valid_until bounds verification evidence, not a merchant price guarantee."
    },
    "VerifiedOfferResponse": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "schema_version",
            "status",
            "reason",
            "offer"
          ],
          "properties": {
            "schema_version": {
              "const": "golf-offer.v1"
            },
            "status": {
              "const": "verified_offer"
            },
            "reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "offer": {
              "$ref": "#/$defs/AgentOffer"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "schema_version",
            "status",
            "reason",
            "offer"
          ],
          "properties": {
            "schema_version": {
              "const": "golf-offer.v1"
            },
            "status": {
              "const": "check_price"
            },
            "reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "offer": {
              "$ref": "#/$defs/AgentOffer"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "schema_version",
            "status",
            "reason",
            "offer"
          ],
          "properties": {
            "schema_version": {
              "const": "golf-offer.v1"
            },
            "status": {
              "const": "unavailable"
            },
            "reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "offer": {
              "type": "null"
            }
          }
        }
      ]
    }
  }
}