GuideLab API

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.

POST
/inventory/purchase-orders

Creates a new purchase order with line items for the specified supplier. Automatically generates a sequential PO number and calculates totals.

Authorization

__Secure-guidelab-prod.session_token<token>

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  }}
Empty
Empty
Empty