openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: API specification for Custom Florenza e-commerce platform servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: products description: Product operations - name: cart description: Cart operations - name: orders description: Order operations - name: contacts description: Contact form operations - name: reviews description: Customer reviews paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /products: get: operationId: listProducts tags: [products] summary: List all products parameters: - name: category in: query schema: type: string enum: [tshirt, hoodie, shirt, all] - name: minPrice in: query schema: type: number - name: maxPrice in: query schema: type: number responses: "200": description: List of products content: application/json: schema: type: array items: $ref: "#/components/schemas/Product" post: operationId: createProduct tags: [products] summary: Create a product requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateProductBody" responses: "201": description: Product created content: application/json: schema: $ref: "#/components/schemas/Product" /products/{id}: get: operationId: getProduct tags: [products] summary: Get product by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Product detail content: application/json: schema: $ref: "#/components/schemas/Product" "404": description: Not found /products/featured: get: operationId: listFeaturedProducts tags: [products] summary: List featured products for homepage responses: "200": description: Featured products content: application/json: schema: type: array items: $ref: "#/components/schemas/Product" /cart: get: operationId: getCart tags: [cart] summary: Get cart items responses: "200": description: Cart items content: application/json: schema: $ref: "#/components/schemas/Cart" post: operationId: addToCart tags: [cart] summary: Add item to cart requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AddToCartBody" responses: "201": description: Item added content: application/json: schema: $ref: "#/components/schemas/CartItem" /cart/{id}: delete: operationId: removeFromCart tags: [cart] summary: Remove item from cart parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Item removed /orders: get: operationId: listOrders tags: [orders] summary: List orders for the current session responses: "200": description: Orders list content: application/json: schema: type: array items: $ref: "#/components/schemas/Order" post: operationId: createOrder tags: [orders] summary: Place an order requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateOrderBody" responses: "201": description: Order created content: application/json: schema: $ref: "#/components/schemas/Order" /orders/{id}: get: operationId: getOrder tags: [orders] summary: Get order by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Order detail content: application/json: schema: $ref: "#/components/schemas/Order" /contacts: post: operationId: submitContact tags: [contacts] summary: Submit contact form requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ContactBody" responses: "201": description: Message submitted content: application/json: schema: $ref: "#/components/schemas/Contact" /reviews: get: operationId: listReviews tags: [reviews] summary: List customer reviews responses: "200": description: Reviews list content: application/json: schema: type: array items: $ref: "#/components/schemas/Review" /stats/summary: get: operationId: getSummary tags: [products] summary: Get homepage summary stats responses: "200": description: Summary stats content: application/json: schema: $ref: "#/components/schemas/SummaryStats" components: schemas: HealthStatus: type: object properties: status: type: string required: - status Product: type: object properties: id: type: integer name: type: string description: type: string basePrice: type: number customizationPrice: type: number category: type: string enum: [tshirt, hoodie, shirt] imageUrl: type: string colors: type: array items: type: string sizes: type: array items: type: string isFeatured: type: boolean inStock: type: boolean createdAt: type: string required: - id - name - description - basePrice - customizationPrice - category - imageUrl - colors - sizes - isFeatured - inStock - createdAt CreateProductBody: type: object properties: name: type: string description: type: string basePrice: type: number customizationPrice: type: number category: type: string enum: [tshirt, hoodie, shirt] imageUrl: type: string colors: type: array items: type: string sizes: type: array items: type: string isFeatured: type: boolean inStock: type: boolean required: - name - description - basePrice - customizationPrice - category - imageUrl - colors - sizes CartItem: type: object properties: id: type: integer productId: type: integer productName: type: string productImageUrl: type: string quantity: type: integer size: type: string color: type: string customizationNotes: type: string unitPrice: type: number sessionId: type: string required: - id - productId - productName - productImageUrl - quantity - size - color - unitPrice - sessionId Cart: type: object properties: items: type: array items: $ref: "#/components/schemas/CartItem" totalItems: type: integer totalPrice: type: number required: - items - totalItems - totalPrice AddToCartBody: type: object properties: productId: type: integer quantity: type: integer size: type: string color: type: string customizationNotes: type: string required: - productId - quantity - size - color Order: type: object properties: id: type: integer customerName: type: string customerEmail: type: string customerPhone: type: string items: type: array items: $ref: "#/components/schemas/CartItem" totalPrice: type: number status: type: string enum: [pending, processing, shipped, delivered] paymentMethod: type: string enum: [upi, card, cod] address: type: string createdAt: type: string required: - id - customerName - customerEmail - items - totalPrice - status - paymentMethod - address - createdAt CreateOrderBody: type: object properties: customerName: type: string customerEmail: type: string customerPhone: type: string paymentMethod: type: string enum: [upi, card, cod] address: type: string required: - customerName - customerEmail - paymentMethod - address ContactBody: type: object properties: name: type: string email: type: string message: type: string required: - name - email - message Contact: type: object properties: id: type: integer name: type: string email: type: string message: type: string createdAt: type: string required: - id - name - email - message - createdAt Review: type: object properties: id: type: integer customerName: type: string rating: type: integer comment: type: string productName: type: string avatarUrl: type: string createdAt: type: string required: - id - customerName - rating - comment - productName - createdAt SummaryStats: type: object properties: totalProducts: type: integer totalOrders: type: integer totalReviews: type: integer averageRating: type: number happyCustomers: type: integer required: - totalProducts - totalOrders - totalReviews - averageRating - happyCustomers