{
  "openapi": "3.1.0",
  "info": {
    "title": "VarYar public site API",
    "version": "1.0.0",
    "description": "Public endpoints served by varyar.com: read-only storefront content, a waitlist signup, and a health check. Authenticated and internal routes are intentionally not described here.",
    "contact": {
      "name": "VarYar",
      "url": "https://varyar.com/contact"
    },
    "termsOfService": "https://varyar.com/legal/terms"
  },
  "servers": [
    {
      "url": "https://varyar.com"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness check",
        "description": "Returns 200 while the site is up. Never cached.",
        "responses": {
          "200": {
            "description": "The site is up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products-menu": {
      "get": {
        "operationId": "getProductsMenuOverrides",
        "summary": "Products mega-menu curation",
        "description": "Ordering/visibility overrides for the Products mega menu. Returns an empty list when nothing is curated.",
        "responses": {
          "200": {
            "description": "Current overrides.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "overrides"
                  ],
                  "properties": {
                    "overrides": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "productId",
                          "tab",
                          "sortOrder",
                          "active"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "productId": {
                            "type": "string"
                          },
                          "tab": {
                            "type": "string",
                            "enum": [
                              "apps",
                              "suites",
                              "store"
                            ]
                          },
                          "sortOrder": {
                            "type": "number"
                          },
                          "active": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/product-page-layout/{slug}": {
      "get": {
        "operationId": "getProductPageLayout",
        "summary": "Custom hero layout for a store product page",
        "description": "Returns the admin-authored hero layout for /store/{slug}, or `null` when the product uses the default artwork.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The product's store slug, as used in /store/{slug}.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The layout, or null.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "layout"
                  ],
                  "properties": {
                    "layout": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "required": [
                            "productSlug",
                            "layouts"
                          ],
                          "properties": {
                            "productSlug": {
                              "type": "string"
                            },
                            "layouts": {
                              "type": "object",
                              "description": "Slide layout per device class.",
                              "required": [
                                "desktop",
                                "tablet",
                                "mobile"
                              ],
                              "additionalProperties": {
                                "type": "object"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist": {
      "post": {
        "operationId": "joinWaitlist",
        "summary": "Join a product waitlist",
        "description": "Adds an email to the named waitlist and sends a confirmation email. Signing up the same email for another waitlist appends to the existing record.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "waitlist"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "waitlist": {
                    "type": "string",
                    "description": "Name of the waitlist to join."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signup saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed body, invalid email, or missing waitlist name.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The signup could not be saved; retry shortly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}