{"openapi":"3.0.3","info":{"title":"NKB Manufacturing Corporation — Developer REST API","version":"1.0.0","description":"Official programmatic API for external eCommerce platforms, ERPs, accounting systems, and warehouse logistics."},"servers":[{"url":"https://my.nkbmanufacturing.com/api/v1","description":"Current Server Environment"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Enter your NKB API Key (e.g. nkb_live_...)"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API_KEY"}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/ping":{"get":{"summary":"Ping API & verify key metadata","responses":{"200":{"description":"Successful pong with key scopes"}}}},"/products":{"get":{"summary":"List cosmetic products","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of products"}}}},"/orders":{"get":{"summary":"List purchase orders","responses":{"200":{"description":"List of purchase orders"}}},"post":{"summary":"Create a purchase order programmatically","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"client_id":{"type":"string"},"tolerance_percent":{"type":"number","default":10},"billing_policy":{"type":"string","enum":["ACTUAL_DELIVERY","FIXED_PO_BUFFER"]},"form_of_payment":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["product_id","target_quantity"],"properties":{"product_id":{"type":"string"},"target_quantity":{"type":"integer"},"unit_price":{"type":"number"}}}}}}}}},"responses":{"201":{"description":"Order created"}}}},"/deliveries":{"get":{"summary":"List delivery receipts and tracking","responses":{"200":{"description":"Delivery receipts"}}}},"/invoices":{"get":{"summary":"List sales invoices and balances","responses":{"200":{"description":"Sales invoices"}}}},"/inventory":{"get":{"summary":"Get finished cosmetic inventory and formula pull sheets","responses":{"200":{"description":"Inventory availability"}}}},"/payables":{"get":{"summary":"List cheque payables for COO review & ERP synchronization","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["PENDING_COO_APPROVAL","CONFIRMED","ISSUED","CLEARED","REJECTED"]}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"bank","in":"query","schema":{"type":"string"}},{"name":"date_from","in":"query","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of cheque payables"}}},"post":{"summary":"Create a cheque payable request","responses":{"201":{"description":"Cheque payable created"}}}},"/payables/{id}/confirm":{"post":{"summary":"Confirm or reject cheque payable by COO via API Key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["CONFIRMED","REJECTED"]},"cheque_number":{"type":"string"},"notes":{"type":"string"},"confirmed_by":{"type":"string"}}}}}},"responses":{"200":{"description":"Cheque payable confirmed or rejected"}}}}}}