{
  "openapi": "3.0.3",
  "info": {
    "title": "OffWeGoSIM Catalog API",
    "version": "1.0.0",
    "description": "Public read-only retail catalog. No API key. Poll hourly; responses may be cached for 60 seconds. No per-partner quota or uptime SLA is currently provided. No ordering, provisioning or customer-data API."
  },
  "servers": [
    {
      "url": "https://offwegosim.com"
    }
  ],
  "paths": {
    "/api/public/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "Get all current sellable initial-purchase plans",
        "security": [],
        "responses": {
          "200": {
            "description": "Full replacement catalog snapshot. Remove absent offers. Prices are revalidated at checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schema_version",
                    "generated_at",
                    "currency",
                    "count",
                    "products"
                  ],
                  "properties": {
                    "schema_version": {
                      "type": "integer",
                      "enum": [
                        1
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "USD"
                      ]
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Product"
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Catalog unavailable. Do not interpret as an empty catalog. Retry with backoff; alert on persistent failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "coverage",
          "currency",
          "price_minor",
          "data_gb",
          "data_label",
          "validity_days",
          "networks",
          "hotspot",
          "service",
          "activation_trigger",
          "activation_window_days",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "coverage": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Country and territory codes from the catalog."
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "price_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "USD cents. 599 means USD 5.99."
          },
          "data_gb": {
            "type": "number",
            "exclusiveMinimum": true,
            "minimum": 0
          },
          "data_label": {
            "type": "string"
          },
          "validity_days": {
            "type": "integer",
            "minimum": 1
          },
          "networks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Network names; no per-country availability mapping."
          },
          "hotspot": {
            "type": "boolean",
            "nullable": true
          },
          "service": {
            "type": "string",
            "enum": [
              "data_only"
            ]
          },
          "activation_trigger": {
            "type": "string",
            "nullable": true,
            "enum": [
              "installation",
              "first_network_connection",
              null
            ]
          },
          "activation_window_days": {
            "type": "integer",
            "nullable": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Direct checkout URL; not an affiliate tracking link."
          }
        }
      }
    }
  }
}
