Openapi
Create a draft purchase order for a supplier. Sending and emailing it happens in the app.
Supabase browser session cookie. Supabase may split larger session values into chunked cookies like sb-auth-token.0.
In: cookie
uuidapplication/json
The supplier and variant lines.
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/organizations/123/purchase-orders" \ -H "Content-Type: application/json" \ -d '{ "supplierId": "e01eb4c4-8eb9-4fb7-b625-61f58c6148db", "supplierReference": "string", "notes": "string", "supplierNotes": "string", "lines": [ { "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf", "supplierSku": "string", "title": "string", "quantityOrdered": 1, "unitCost": 0, "vatRate": 0 } ] }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "number": 0, "formattedNumber": "string", "supplier": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "orderingEmail": "string", "email": "string" }, "status": "draft", "currency": "string", "exchangeRate": 0, "expectedAt": "2019-08-24", "shipToLocationId": "17d01ddf-03d0-401e-8692-7b8be54e80b5", "shipToLocationName": "string", "supplierReference": "string", "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "subtotalExcl": 0, "vatTotal": 0, "totalIncl": 0, "lineCount": 0, "receivedRatio": 0, "sentAt": "string", "receivedAt": "string", "closedAt": "string", "cancelledAt": "string", "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "createdAt": "string", "updatedAt": "string", "notes": "string", "supplierNotes": "string", "lines": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf", "productName": "string", "variantTitle": "string", "sku": "string", "productSupplierLinkId": "21596cd8-f6bb-4540-85e0-ab9655b92639", "supplierSku": "string", "title": "string", "quantityOrdered": 0, "quantityReceived": 0, "quantityCancelled": 0, "quantityOpen": 0, "unitCost": 0, "vatRate": 0, "expectedAt": "2019-08-24", "position": 0 } ]}uuid^[A-Z]{3}$0 < value <= 1000000uuidlength <= 120uuidlength <= 4000length <= 4000items <= 500