{
  "openapi": "3.1.0",
  "info": {
    "title": "Product Price Comparison API",
    "description": "Ranks merchant offers for a product by total landed cost to simplify comparison shopping. Pre-launch design; endpoints are not live yet.",
    "version": "0.1.0",
    "x-planned-pricing": {
      "model": "free tier for evaluation, paid tiers by volume",
      "status": "planned; nothing charged before launch"
    }
  },
  "servers": [
    {
      "url": "https://openapiregistry.com/api/v1/price-comparison",
      "description": "Pre-launch: endpoints are not live yet and answer 503."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/offers": {
      "get": {
        "summary": "Rank merchant offers",
        "description": "Returns merchant offers for a GTIN ranked by total landed cost.",
        "tags": [
          "ecommerce"
        ],
        "operationId": "price-comparison-get-offers",
        "parameters": [
          {
            "name": "gtin",
            "in": "query",
            "required": true,
            "description": "Global trade item number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "description": "Destination for delivery cost context.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Offers ranked.",
            "content": {
              "application/json": {
                "example": {
                  "offers": [
                    {
                      "merchant": "acme",
                      "total": 29.99,
                      "deliveryDays": 3
                    }
                  ]
                },
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No offers for GTIN."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Planned for launch: an API key issued on request. Free tier for evaluation, paid tiers by volume; nothing is charged before launch."
      }
    }
  }
}
