Purchasing Manager API · pos
Report what was wrong with a delivery
POST /pos/{poId}/issues
Report what was wrong with a delivery: per line, how many units arrived damaged, short (fewer than the supplier's paperwork said), over (more than ordered, not accepted) or as the wrong-item, each with an optional reason.
None of them is taken into stock — the order still expects them until it is short-closed — and they are what a supplier's damage, short and over-shipment rates, and the carrier that brought them (shipmentId), are measured by. receiptId names the receipt the rest of the delivery came in on; reportedOn the day it was found when not today. 409 UnknownPoLine for a SKU not on the order, 409 PoNotAuthorised on a draft or cancelled order. Appends purchasing.receipt-issue-recorded, and purchasing.supplier-alert-raised when the supplier's damage rate crosses the organization's threshold. issueId, a caller-minted rci_…, is required and is the idempotency key: a retry with the same id is acknowledged and appends nothing.
Access
Requires receiving:write or purchasing:write.
Any one of these scopes is enough.
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
issueId, a caller-minted rci_…, is required and is the idempotency key: a retry with the same id is acknowledged and appends nothing.
A retry with the same key answers 200, with what the first call recorded.
Why every write carries a key: Idempotency and retries.
Facts appended
purchasing.receipt-issue-recordedpurchasing.supplier-alert-raised
What a fact is: Facts and the journal.
AI agent tool
Agents call this as purchasing_report_receipt_issue (Purchasing: Report receipt issue), in the receiving toolset.
Connecting an agent: AI agents.
Example
curl -X POST 'https://purchasing.getmanifold.io/pos/po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d/issues' \
-H "Authorization: Bearer $MANIFOLD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"issueId": "rci_01a1586b-3d5f-7e62-8c4b-3f5a7b9d1e2f",
"receiptId": "rcpt_01a15864-bc4f-7f80-b1c3-5d6e7f809a1b",
"lines": [
{
"sku": "WIDGET-BLUE",
"condition": "damaged",
"quantity": 2,
"reason": "Carton crushed in transit"
}
]
}'const response = await fetch("https://purchasing.getmanifold.io/pos/po_01a15876-6c9e-7b3a-8c4d-9e0f1a2b3c4d/issues", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"issueId": "rci_01a1586b-3d5f-7e62-8c4b-3f5a7b9d1e2f",
"receiptId": "rcpt_01a15864-bc4f-7f80-b1c3-5d6e7f809a1b",
"lines": [
{
"sku": "WIDGET-BLUE",
"condition": "damaged",
"quantity": 2,
"reason": "Carton crushed in transit"
}
]
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"issueId": "rci_01a1586b-3d5f-7e62-8c4b-3f5a7b9d1e2f",
"receiptId": "rcpt_01a15864-bc4f-7f80-b1c3-5d6e7f809a1b",
"lines": [
{
"sku": "WIDGET-BLUE",
"condition": "damaged",
"quantity": 2,
"reason": "Carton crushed in transit"
}
]
}{
"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": "received",
"lines": [
{
"sku": "WIDGET-BLUE",
"ordered": 40,
"received": 40,
"cancelled": 0,
"unitCostCents": 1250
}
],
"landedCosts": [],
"payables": [],
"payments": [],
"revision": 0,
"createdAt": "2026-09-22T01:15:00.000Z",
"updatedAt": "2026-10-01T03:50:00.000Z",
"expectedOn": "2026-10-01",
"receipts": [
{
"receiptId": "rcpt_01a15864-bc4f-7f80-b1c3-5d6e7f809a1b",
"receivedOn": "2026-10-01",
"lines": [
{
"sku": "WIDGET-BLUE",
"quantity": 40
}
]
}
],
"issues": [
{
"issueId": "rci_01a1586b-3d5f-7e62-8c4b-3f5a7b9d1e2f",
"receiptId": "rcpt_01a15864-bc4f-7f80-b1c3-5d6e7f809a1b",
"reportedOn": "2026-10-01",
"lines": [
{
"sku": "WIDGET-BLUE",
"condition": "damaged",
"quantity": 2,
"reason": "Carton crushed in transit"
}
]
}
]
}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. |
UnknownInboundShipment poId, shipmentId | 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, with the same key. |
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, with the same key. |
How refusals work everywhere: Errors.