Purchasing Manager API · pos
Record an inbound shipment carrying goods of the order
PUT /pos/{poId}/shipments/{shipmentId}
Record an inbound shipment carrying goods of the order — or correct one already recorded (replace semantics): the carrier (shipping provider) and service, its trackingNumbers, dispatchedOn, the eta, what it holds (lines) and who said so (source: the buyer — often from pasted tracking —, the supplier's advance shipping notice, or a shipping app).
An order may arrive in several shipments; a receipt names the one it took in. Its tracking events and the receipts that took it in are kept across a correction, and its first ETA is what the carrier's lateness is measured against. 409 PoNotAuthorised unless the order is with its supplier and still owed goods (a recorded shipment may be corrected while it is), 409 UnknownPoLine for a line it does not have. Appends purchasing.inbound-shipment-recorded. Idempotent by content: saying what the shipment already says appends nothing; shipmentId, a caller-minted ibs_… in the path, names it.
Access
Requires purchasing:write or receiving:write.
Any one of these scopes is enough.
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
Idempotent by content: saying what the shipment already says appends nothing; shipmentId, a caller-minted ibs_… in the path, names it.
Why every write carries a key: Idempotency and retries.
Facts appended
purchasing.inbound-shipment-recorded
What a fact is: Facts and the journal.
AI agent tool
Agents call this as purchasing_record_inbound_shipment (Purchasing: Record inbound shipment), in the receiving toolset.
Connecting an agent: AI agents.
Example
curl -X PUT 'https://purchasing.getmanifold.io/pos/po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d/shipments/ibs_01a1586a-7c2e-7d41-9b3a-2e4f6a8c0d1e' \
-H "Authorization: Bearer $MANIFOLD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"carrier": "StarTrack",
"service": "Road Express",
"trackingNumbers": [
"ST4471093"
],
"dispatchedOn": "2026-09-28",
"eta": "2026-10-01",
"source": "supplier",
"lines": [
{
"sku": "WIDGET-BLUE",
"quantity": 40
}
]
}'const response = await fetch("https://purchasing.getmanifold.io/pos/po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d/shipments/ibs_01a1586a-7c2e-7d41-9b3a-2e4f6a8c0d1e", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"carrier": "StarTrack",
"service": "Road Express",
"trackingNumbers": [
"ST4471093"
],
"dispatchedOn": "2026-09-28",
"eta": "2026-10-01",
"source": "supplier",
"lines": [
{
"sku": "WIDGET-BLUE",
"quantity": 40
}
]
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"carrier": "StarTrack",
"service": "Road Express",
"trackingNumbers": [
"ST4471093"
],
"dispatchedOn": "2026-09-28",
"eta": "2026-10-01",
"source": "supplier",
"lines": [
{
"sku": "WIDGET-BLUE",
"quantity": 40
}
]
}{
"id": "po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d",
"number": "PO-00001",
"serial": 1,
"reference": "PO-WIDGET-BLUE",
"supplier": "Northwind Components",
"supplierId": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
"currency": "AUD",
"status": "authorised",
"lines": [
{
"sku": "WIDGET-BLUE",
"ordered": 40,
"received": 0,
"cancelled": 0,
"unitCostCents": 1250
}
],
"landedCosts": [],
"payables": [],
"payments": [],
"revision": 0,
"createdAt": "2026-09-22T01:15:00.000Z",
"updatedAt": "2026-09-28T06:00:00.000Z",
"expectedOn": "2026-10-01",
"shipments": [
{
"shipmentId": "ibs_01a1586a-7c2e-7d41-9b3a-2e4f6a8c0d1e",
"carrier": "StarTrack",
"service": "Road Express",
"trackingNumbers": [
"ST4471093"
],
"dispatchedOn": "2026-09-28",
"eta": "2026-10-01",
"firstEta": "2026-10-01",
"source": "supplier",
"lines": [
{
"sku": "WIDGET-BLUE",
"quantity": 40
}
],
"status": "in-transit",
"events": [],
"receiptIds": []
}
]
}The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web
page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: purchasing-manager.openapi.json. Base URL https://purchasing.getmanifold.io.
Errors
Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.
400
| Refusal | What it means | What to do |
|---|---|---|
DayInFuture day, today | The request was refused, and nothing changed. | Fix the request. Sending it again unchanged gets the same answer. |
401
| Refusal | What it means | What to do |
|---|---|---|
Unauthorized reason | The token is missing, expired or not one Manifold issued. | Get a fresh token and send the call again. |
TokenAlreadyUsed tokenId | A single-use app token was already spent. | Mint a new token for this call. |
402
| Refusal | What it means | What to do |
|---|---|---|
SubscriptionRequired status | The organization's subscription has lapsed, so writes are refused. | An owner settles billing. Reads still work meanwhile. |
403
| Refusal | What it means | What to do |
|---|---|---|
TenantRequired userId | The token names no organization. | Choose the organization, then get a new token. |
ScopeRequired required | The token's roles do not grant the scope this call needs. | Ask an owner or admin for a role that grants it. |
404
| Refusal | What it means | What to do |
|---|---|---|
PoNotFound poId | No such record in this organization. | Check the id in the path or the body. |
409
| Refusal | What it means | What to do |
|---|---|---|
PoNotAuthorised poId, status | The purchase order is not authorised, so it cannot receive or be invoiced. | Authorise it first. |
UnknownPoLine poId, sku | The SKU is not on the purchase order. | Add the line first, or check the SKU. |
MirroredFromSource source | This area is fed by your source system until the organization goes live. | Make the change in the source system, or go live first. |
502
| Refusal | What it means | What to do |
|---|---|---|
InventoryUnavailable reason | The inventory service did not answer, so nothing changed. | Send the same request again shortly. |
503
| Refusal | What it means | What to do |
|---|---|---|
RequestLogUnavailable tokenId, reason | The service could not record the request, so it did nothing. | Send the same request again shortly. |
How refusals work everywhere: Errors.