Create a purchase order
Creates a new purchase order with line items for the specified supplier. Automatically generates a sequential PO number and calculates totals.
Creates a new purchase order with line items for the specified supplier. Automatically generates a sequential PO number and calculates totals.
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/inventory/purchase-orders" \ -H "Content-Type: application/json" \ -d '{ "supplierId": "string", "items": [ { "inventoryItemId": "string", "quantityOrdered": 0, "unitCost": "string" } ] }'{ "data": { "id": "string", "poNumber": "string", "status": "string", "supplierId": "string", "subtotal": "string", "totalAmount": "string", "currency": "string", "createdAt": "string", "updatedAt": "string", "property1": null, "property2": null }}Create an inventory item POST
Creates a new inventory item in the organization's catalog. If the initial quantity is greater than zero, an initial stock adjustment is automatically recorded.
Create a stock adjustment POST
Records a manual stock adjustment for an inventory item. The quantity change can be positive (adding stock) or negative (removing stock). The item's current quantity is updated atomically.