{ "swagger": "2.0", "info": { "description": "Swagger documentation for admin", "title": "Admin API", "contact": {}, "version": "1.0" }, "paths": { "/api/admin/brands": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Brand" ], "summary": "Search brand", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Brand" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Brand" ], "summary": "Create brand", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.Brand" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/brands/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Brand" ], "summary": "Get brand by id", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Brand" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Brand" ], "summary": "Update brand", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.Brand" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Brand" ], "summary": "Delete brand", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/compatibility-rules": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Compatibility Rules" ], "summary": "Search compatibility rules", "parameters": [ { "type": "string", "description": " ", "name": "sourceComponentTypeCode", "in": "query" }, { "type": "string", "description": " ", "name": "targetComponentTypeCode", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.CompatibilityRule" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Compatibility Rules" ], "summary": "Create compatibility rules", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.CompatibilityRule" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/compatibility-rules/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Compatibility Rules" ], "summary": "Get compatibility rules by id", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.CompatibilityRule" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Compatibility Rules" ], "summary": "Update compatibility rules", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.CompatibilityRule" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Compatibility Rules" ], "summary": "Delete compatibility rules", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/component-types": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Component Type" ], "summary": "Search component type", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.ComponentType" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Component Type" ], "summary": "Create Component ype", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ComponentType" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/component-types/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Component Type" ], "summary": "Get component type by id", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.ComponentType" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Component Type" ], "summary": "Update component type", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ComponentType" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Component Type" ], "summary": "Delete component type", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/dashboard": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get dashboard summary with optional date range filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Dashboard" ], "summary": "Get Summary", "parameters": [ { "type": "string", "description": "Start date for filtering (format: 2006-01-02 15:04:05)", "name": "fromDate", "in": "query" }, { "type": "string", "description": "End date for filtering (format: 2006-01-02 15:04:05)", "name": "toDate", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.WebResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.Dashboard" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/files": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "image/jpeg" ], "tags": [ "File" ], "summary": "Get Photo by ID", "parameters": [ { "type": "string", "description": "File UUID without extension", "name": "id", "in": "query", "required": true } ], "responses": { "200": { "description": "Photo content", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "File" ], "summary": "Upload Multiple Photos", "parameters": [ { "type": "file", "description": "Multiple photo files (max 1MB each, .jpg/.jpeg/.png)", "name": "photos", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "413": { "description": "File too large", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/menus": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Search menu", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" }, { "type": "integer", "description": " ", "name": "parentId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Menu" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Create menu", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.Menu" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/menus/delete-item/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Delete menu item", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/menus/{id}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Update menu", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.Menu" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Delete menu", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/menus/{menuId}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Menu" ], "summary": "Create menu item", "parameters": [ { "type": "integer", "description": " ", "name": "menuId", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.MenuItem" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/orders": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Order" ], "summary": "Search order", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" }, { "type": "string", "description": " ", "name": "status", "in": "query" }, { "type": "string", "description": " ", "name": "fromDate", "in": "query" }, { "type": "string", "description": " ", "name": "toDate", "in": "query" }, { "type": "integer", "description": " ", "name": "page", "in": "query", "required": true }, { "type": "integer", "description": " ", "name": "pageSize", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Order" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/orders/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Order" ], "summary": "Get order by id", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Order" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/orders/{id}/update-shipping-info": { "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Order" ], "summary": "Update shipping info order", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateOrderShippingByAdmin" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Order" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/orders/{id}/update-status": { "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Order" ], "summary": "Update status order", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.UpdateOrderStatusByAdmin" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Order" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/product-categories": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Category" ], "summary": "Search category", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.ProductCategory" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Category" ], "summary": "Create category", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ProductCategory" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/product-categories/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Category" ], "summary": "Get category by id", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.ProductCategory" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Category" ], "summary": "Update category", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ProductCategory" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Category" ], "summary": "Delete category", "parameters": [ { "type": "integer", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/products": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Search products", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" }, { "type": "string", "description": " ", "name": "productTypes", "in": "query" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Array of IDs", "name": "productCategoryIds", "in": "query" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "description": "Array of IDs", "name": "componentTypeIds", "in": "query" }, { "type": "boolean", "description": " ", "name": "isActive", "in": "query" }, { "type": "boolean", "description": " ", "name": "isShowOnlyInMarketplace", "in": "query" }, { "type": "integer", "description": " ", "name": "page", "in": "query" }, { "type": "integer", "description": " ", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/response.ProductResponse" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/products/browse-product-sku": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Browse products sku", "parameters": [ { "type": "string", "description": " ", "name": "query", "in": "query" }, { "type": "string", "description": " ", "name": "productTypes", "in": "query" }, { "type": "integer", "description": " ", "name": "productCategoryId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/response.ProductResponse" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/products/change-component": { "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "change component (for product bundle)", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ChangeComponent" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/products/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Get product by id", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.ProductResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Update Product", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ProductPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Create Product", "parameters": [ { "type": "string", "format": "uuid", "description": "Id (UUID format)", "name": "id", "in": "path", "required": true }, { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.ProductPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product" ], "summary": "Delete product", "parameters": [ { "type": "string", "description": " ", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/admin/variant-options": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Variant Option" ], "summary": "Get Variant Options", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/response.VariantOption" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Product Variant Option" ], "summary": "Create Variant Option", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.VariantOptionPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/auth/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Login", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.LoginUserPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/user/getByEmail": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get user by email", "parameters": [ { "type": "string", "description": " ", "name": "email", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.User" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/user/me": { "get": { "security": [ { "ApiKeyAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get my profile", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.User" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } }, "/api/user/register": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Register user", "parameters": [ { "description": " ", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/request.RegisterUserPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.WebResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.WebResponse" } } } } } }, "definitions": { "enum.EOrderStatus": { "type": "string", "enum": [ "pending", "paid", "preparing", "shipped", "arrived", "completed", "cancelled" ], "x-enum-varnames": [ "OrderStatusPending", "OrderStatusPaid", "OrderStatusPreparing", "OrderStatusShipped", "OrderStatusArrived", "OrderStatusCompleted", "OrderStatusCancelled" ] }, "enum.EProductType": { "type": "string", "enum": [ "single", "group", "admin", "customer" ], "x-enum-varnames": [ "ProductTypeSingle", "ProductTypeGroup", "Admin", "Customer" ] }, "request.Brand": { "type": "object", "properties": { "name": { "type": "string" } } }, "request.ChangeComponent": { "type": "object", "properties": { "newProductSkuId": { "type": "string" }, "oldProductSkuId": { "type": "string" } } }, "request.CompatibilityRule": { "type": "object", "properties": { "condition": { "type": "string" }, "errorMessage": { "type": "string" }, "isActive": { "type": "boolean" }, "sourceComponentTypeCode": { "type": "string" }, "sourceKey": { "type": "string" }, "targetComponentTypeCode": { "type": "string" }, "targetKey": { "type": "string" }, "valueType": { "type": "string" } } }, "request.ComponentSpec": { "type": "object", "properties": { "id": { "type": "string" }, "specKey": { "type": "string" }, "specValue": { "type": "string" } } }, "request.ComponentType": { "type": "object", "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" } } }, "request.LoginUserPayload": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string", "maxLength": 500, "minLength": 5 }, "password": { "type": "string", "maxLength": 500, "minLength": 3 } } }, "request.Menu": { "type": "object", "properties": { "name": { "type": "string" }, "parentId": { "type": "integer" }, "path": { "type": "string" } } }, "request.MenuItem": { "type": "object", "properties": { "productCategoryId": { "type": "integer" } } }, "request.ProductCategory": { "type": "object", "properties": { "name": { "type": "string" } } }, "request.ProductGroupItemPayload": { "type": "object", "properties": { "id": { "type": "string" }, "productId": { "type": "string" }, "productSkuId": { "type": "string" }, "qty": { "type": "integer" } } }, "request.ProductPayload": { "type": "object", "properties": { "brandId": { "type": "integer" }, "componentTypeId": { "type": "integer" }, "description": { "type": "string" }, "imageIds": { "type": "array", "items": { "type": "string" } }, "isActive": { "type": "boolean" }, "isShowOnlyInMarketPlace": { "type": "boolean" }, "name": { "type": "string" }, "productCategoryId": { "type": "integer" }, "productSkuVariants": { "type": "array", "items": { "$ref": "#/definitions/request.ProductSkuVariantPayload" } }, "productSkus": { "type": "array", "items": { "$ref": "#/definitions/request.ProductSkuPayload" } }, "productSpec": { "type": "string" }, "productType": { "$ref": "#/definitions/enum.EProductType" }, "productVariantOptionValues": { "type": "array", "items": { "$ref": "#/definitions/request.ProductVariantOptionValuePayload" } }, "productVariantOptions": { "type": "array", "items": { "$ref": "#/definitions/request.ProductVariantOptionPayload" } }, "sku": { "type": "string" }, "tags": { "type": "string" }, "videoUrl": { "type": "string" } } }, "request.ProductSkuPayload": { "type": "object", "properties": { "componentSpecs": { "type": "array", "items": { "$ref": "#/definitions/request.ComponentSpec" } }, "id": { "type": "string" }, "isActive": { "type": "boolean" }, "name": { "type": "string" }, "price": { "type": "number" }, "productGroupItems": { "type": "array", "items": { "$ref": "#/definitions/request.ProductGroupItemPayload" } }, "sku": { "type": "string" }, "stock": { "type": "integer" }, "stockAlert": { "type": "integer" } } }, "request.ProductSkuVariantPayload": { "type": "object", "properties": { "id": { "type": "string" }, "productSkuId": { "type": "string" }, "productVariantOptionId": { "type": "string" }, "productVariantOptionValueId": { "type": "string" } } }, "request.ProductVariantOptionPayload": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "request.ProductVariantOptionValuePayload": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "productVariantOptionId": { "type": "string" } } }, "request.RegisterUserPayload": { "type": "object", "required": [ "email", "fullName", "password", "userName" ], "properties": { "email": { "type": "string", "maxLength": 128, "minLength": 5 }, "fullName": { "type": "string", "maxLength": 128, "minLength": 1 }, "password": { "type": "string", "maxLength": 64, "minLength": 1 }, "userName": { "type": "string", "maxLength": 16, "minLength": 5 } } }, "request.UpdateOrderShippingByAdmin": { "type": "object", "properties": { "deliveredAt": { "type": "string" }, "estimatedDelivery": { "type": "string" }, "shippedAt": { "type": "string" }, "shippingMethod": { "type": "string" }, "trackingNumber": { "type": "string" } } }, "request.UpdateOrderStatusByAdmin": { "type": "object", "properties": { "newStatus": { "$ref": "#/definitions/enum.EOrderStatus" } } }, "request.VariantOptionPayload": { "type": "object", "properties": { "name": { "type": "string" } } }, "response.AuditTrail": { "type": "object", "properties": { "id": { "type": "integer" }, "userName": { "type": "string" } } }, "response.BestSellingProduct": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "sold": { "type": "integer" } } }, "response.Brand": { "type": "object", "properties": { "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "id": { "type": "integer" }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "name": { "type": "string" } } }, "response.CompatibilityRule": { "type": "object", "properties": { "condition": { "type": "string" }, "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "errorMessage": { "type": "string" }, "id": { "type": "integer" }, "isActive": { "type": "boolean" }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "sourceComponentTypeCode": { "type": "string" }, "sourceKey": { "type": "string" }, "targetComponentTypeCode": { "type": "string" }, "targetKey": { "type": "string" }, "valueType": { "type": "string" } } }, "response.ComponentSpec": { "type": "object", "properties": { "id": { "type": "string" }, "productSkuId": { "type": "string" }, "specKey": { "type": "string" }, "specValue": { "type": "string" } } }, "response.ComponentType": { "type": "object", "properties": { "code": { "type": "string" }, "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "description": { "type": "string" }, "id": { "type": "integer" }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "name": { "type": "string" } } }, "response.CustomerInfo": { "type": "object", "properties": { "email": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "phoneNumber": { "type": "string" } } }, "response.Dashboard": { "type": "object", "properties": { "bestSellingProduct": { "type": "array", "items": { "$ref": "#/definitions/response.BestSellingProduct" } }, "stockAlert": { "type": "array", "items": { "$ref": "#/definitions/response.StockAlert" } }, "totalActiveProduct": { "type": "integer" }, "totalOrder": { "type": "integer" }, "totalPendingOrder": { "type": "integer" }, "totalSales": { "type": "number" } } }, "response.EnumResponse": { "type": "object", "properties": { "code": { "type": "string" }, "name": { "type": "string" } } }, "response.Menu": { "type": "object", "properties": { "childs": { "type": "array", "items": { "$ref": "#/definitions/response.Menu" } }, "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "id": { "type": "integer" }, "menuItems": { "type": "array", "items": { "$ref": "#/definitions/response.MenuItem" } }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "name": { "type": "string" }, "parentId": { "type": "integer" }, "path": { "type": "string" } } }, "response.MenuItem": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "productCategoryId": { "type": "integer" } } }, "response.Order": { "type": "object", "properties": { "code": { "type": "string" }, "createdByCustomerAt": { "type": "string" }, "customerId": { "type": "integer" }, "customerInfo": { "$ref": "#/definitions/response.CustomerInfo" }, "id": { "type": "string" }, "isPaid": { "type": "boolean" }, "modifiedByCustomerAt": { "type": "string" }, "notes": { "type": "string" }, "orderDate": { "type": "string" }, "orderItems": { "type": "array", "items": { "$ref": "#/definitions/response.OrderItem" } }, "paidAt": { "type": "string" }, "paymentUrl": { "type": "string" }, "shippingInfo": { "$ref": "#/definitions/response.ShippingInfo" }, "status": { "$ref": "#/definitions/response.EnumResponse" }, "totalPaid": { "type": "number" } } }, "response.OrderItem": { "type": "object", "properties": { "id": { "type": "string" }, "orderId": { "type": "string" }, "price": { "type": "number" }, "product": { "$ref": "#/definitions/response.OrderItemProduct" }, "productId": { "type": "string" }, "productSkuId": { "type": "string" }, "quantity": { "type": "integer" } } }, "response.OrderItemProduct": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "string" }, "imageIds": { "type": "array", "items": { "type": "string" } }, "isActive": { "type": "boolean" }, "name": { "type": "string" }, "productSku": { "$ref": "#/definitions/response.OrderItemProductSku" }, "sku": { "type": "string" } } }, "response.OrderItemProductSku": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "price": { "type": "number" }, "sku": { "type": "string" }, "stock": { "type": "integer" } } }, "response.ProductCategory": { "type": "object", "properties": { "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "id": { "type": "integer" }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "name": { "type": "string" } } }, "response.ProductGroupItemResponse": { "type": "object", "properties": { "id": { "type": "string" }, "product": { "$ref": "#/definitions/response.ProductResponse" }, "productId": { "type": "string" }, "productSkuId": { "type": "string" }, "qty": { "type": "integer" } } }, "response.ProductResponse": { "type": "object", "properties": { "brand": { "$ref": "#/definitions/response.Brand" }, "componentType": { "$ref": "#/definitions/response.ComponentType" }, "createdAt": { "type": "string" }, "createdById": { "$ref": "#/definitions/response.AuditTrail" }, "description": { "type": "string" }, "id": { "type": "string" }, "imageIds": { "type": "array", "items": { "type": "string" } }, "isActive": { "type": "boolean" }, "isShowOnlyInMarketPlace": { "type": "boolean" }, "modifiedAt": { "type": "string" }, "modifiedById": { "$ref": "#/definitions/response.AuditTrail" }, "name": { "type": "string" }, "productCategory": { "$ref": "#/definitions/response.ProductCategory" }, "productSkuVariants": { "type": "array", "items": { "$ref": "#/definitions/response.ProductSkuVariant" } }, "productSkus": { "type": "array", "items": { "$ref": "#/definitions/response.ProductSku" } }, "productSpec": { "type": "string" }, "productType": { "$ref": "#/definitions/response.EnumResponse" }, "productVariantOptionValues": { "type": "array", "items": { "$ref": "#/definitions/response.ProductVariantOptionValue" } }, "productVariantOptions": { "type": "array", "items": { "$ref": "#/definitions/response.ProductVariantOption" } }, "sku": { "type": "string" }, "tags": { "type": "string" }, "videoUrl": { "type": "string" } } }, "response.ProductSku": { "type": "object", "properties": { "componentSpecs": { "type": "array", "items": { "$ref": "#/definitions/response.ComponentSpec" } }, "id": { "type": "string" }, "isActive": { "type": "boolean" }, "name": { "type": "string" }, "price": { "type": "number" }, "productGroupItems": { "type": "array", "items": { "$ref": "#/definitions/response.ProductGroupItemResponse" } }, "productId": { "type": "string" }, "sequence": { "type": "integer" }, "sku": { "type": "string" }, "stock": { "type": "integer" }, "stockAlert": { "type": "integer" } } }, "response.ProductSkuVariant": { "type": "object", "properties": { "id": { "type": "string" }, "productSkuId": { "type": "string" }, "productVariantOptionId": { "type": "string" }, "productVariantOptionValueId": { "type": "string" } } }, "response.ProductVariantOption": { "type": "object", "properties": { "allowDelete": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "productId": { "type": "string" }, "sequence": { "type": "integer" } } }, "response.ProductVariantOptionValue": { "type": "object", "properties": { "allowDelete": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "productVariantOptionId": { "type": "string" }, "sequence": { "type": "integer" } } }, "response.ShippingInfo": { "type": "object", "properties": { "address": { "type": "string" }, "city": { "type": "string" }, "createdAt": { "type": "string" }, "deliveredAt": { "type": "string" }, "district": { "type": "string" }, "estimatedDelivery": { "type": "string" }, "id": { "type": "string" }, "notes": { "type": "string" }, "orderId": { "type": "string" }, "postalCode": { "type": "string" }, "province": { "type": "string" }, "recipientName": { "type": "string" }, "shippedAt": { "type": "string" }, "shippingMethod": { "type": "string" }, "trackingNumber": { "type": "string" }, "updatedAt": { "type": "string" } } }, "response.StockAlert": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "stock": { "type": "integer" } } }, "response.User": { "type": "object", "properties": { "email": { "type": "string" }, "fullName": { "type": "string" }, "id": { "type": "integer" }, "username": { "type": "string" } } }, "response.VariantOption": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } }, "response.WebResponse": { "type": "object", "properties": { "code": { "type": "integer" }, "content": {}, "message": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }