{"openapi":"3.0.0","info":{"title":"API App Nhập Kho Tổng CSVC","description":"API for warehouse product management and permission checking","version":"1.0.0"},"paths":{"/csvc/product/check-warehouse-permission":{"get":{"operationId":"checkWarehousePermission","summary":"Check if current user has warehouse permission","responses":{"200":{"description":"Permission check result","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"data":{"type":"object","properties":{"has_permission":{"type":"boolean"}}}}}}}}}}},"/csvc/product/warehouse":{"get":{"operationId":"getWarehouseProducts","summary":"Get list of products available for warehouse input","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of products with pagination","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductItem"}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"per_page":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"}}},"error":{"type":"boolean"},"message":{"type":"string","nullable":true}}}}}}}}},"/csvc/product/search-barcode":{"get":{"operationId":"searchProductByBarcode","summary":"Search product by barcode","parameters":[{"name":"barcode","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product detail or error message if not found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductItem"},{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"message":{"type":"string"}}}]}}}}}}},"/csvc/product/warehouse/add-quantity":{"post":{"operationId":"addProductQuantities","summary":"Add quantities for multiple products in warehouse","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["products"],"properties":{"products":{"type":"array","minItems":1,"items":{"type":"object","required":["product_id","quantity"],"properties":{"product_id":{"type":"integer"},"quantity":{"type":"integer","minimum":1}}}}}}}}},"responses":{"200":{"description":"Quantity update result","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"string"}}}}}}}}}},"components":{"schemas":{"ProductItem":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"quantity":{"type":"integer"},"reorder_level":{"type":"integer","nullable":true},"is_warning":{"type":"boolean"},"barcode":{"type":"string"},"type_detail":{"type":"integer","nullable":true},"type_detail_text":{"type":"string"}}}}}}