{
  "openapi": "3.1.0",
  "info": {
    "title": "OUACC Account Public API",
    "version": "0.1.0-trial",
    "summary": "Public catalog and status API for OUACC Account trial catalog mode.",
    "description": "OUACC Account currently exposes public read-only catalog endpoints and static machine-readable files. Payment, checkout, order creation, reseller keys, stock locking, and private customer APIs are not enabled.",
    "contact": {
      "name": "OUACC Account",
      "url": "https://ouacc.cc/contact"
    }
  },
  "servers": [
    {
      "url": "https://ouacc.cc",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Public catalog",
      "description": "Read-only public Dujiao-Next catalog endpoints."
    },
    {
      "name": "Static index",
      "description": "Static JSON files generated for search, status, and API discovery."
    },
    {
      "name": "Pending private APIs",
      "description": "Reserved for future authenticated reseller/order APIs; disabled during trial mode."
    }
  ],
  "paths": {
    "/api/v1/public/config": {
      "get": {
        "tags": [
          "Public catalog"
        ],
        "summary": "Get public site configuration",
        "description": "Returns OUACC public configuration, navigation, SEO, contact placeholders, and feature flags.",
        "responses": {
          "200": {
            "description": "Public configuration response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/categories": {
      "get": {
        "tags": [
          "Public catalog"
        ],
        "summary": "List public categories",
        "description": "Returns active public categories. Current public category count: 81.",
        "responses": {
          "200": {
            "description": "Category list response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/banners": {
      "get": {
        "tags": [
          "Public catalog"
        ],
        "summary": "List home banners",
        "description": "Returns active home hero banners, including desktop and mobile images. Current banner count: 4.",
        "responses": {
          "200": {
            "description": "Banner list response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/public/products": {
      "get": {
        "tags": [
          "Public catalog"
        ],
        "summary": "List public product templates",
        "description": "Returns public product templates. Current active product templates: 153; all are zero-stock trial catalog templates.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Optional page number when supported by the frontend API."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Optional page size when supported by the frontend API."
          }
        ],
        "responses": {
          "200": {
            "description": "Product list response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/catalog/search-index.json": {
      "get": {
        "tags": [
          "Static index"
        ],
        "summary": "Get static search index",
        "description": "Static index for platforms, categories, and product templates used by /search.",
        "responses": {
          "200": {
            "description": "Search index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/service-status.json": {
      "get": {
        "tags": [
          "Static index"
        ],
        "summary": "Get OUACC service/status snapshot",
        "description": "Machine-readable status snapshot. It includes trial mode, payment disabled, zero-stock product counts, and private transfer policy.",
        "responses": {
          "200": {
            "description": "Service status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceStatus"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "Static index"
        ],
        "summary": "Get this OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicEnvelope": {
        "type": "object",
        "properties": {
          "status_code": {
            "type": "integer",
            "example": 0
          },
          "msg": {
            "type": "string",
            "example": "success"
          },
          "data": {
            "description": "Endpoint-specific public data"
          },
          "pagination": {
            "type": "object",
            "description": "Present on list endpoints when paginated."
          }
        },
        "required": [
          "status_code",
          "msg"
        ]
      },
      "ServiceStatus": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "example": "trial_catalog"
          },
          "active_products": {
            "type": "integer",
            "example": 153
          },
          "zero_stock_products": {
            "type": "integer",
            "example": 153
          },
          "payment_channels": {
            "type": "integer",
            "example": 0
          },
          "private_transfer_allowed": {
            "type": "boolean",
            "example": false
          }
        }
      }
    }
  },
  "x-ouacc-status": {
    "mode": "trial_catalog",
    "payment_channels": 0,
    "active_products": 153,
    "zero_stock_products": 153,
    "empty_payment_products": 153,
    "private_order_or_payment_api_enabled": false,
    "reseller_api_enabled": false
  }
}