Fulfillment Manager API · writeOffs
Write off stock — damaged, expired or lost units leaving the platform
POST /write-offs
locationId is the site the units leave from (the organization's default location when absent): one inventory does not know is 404 LocationNotFound, an archived one 409 LocationArchived, and nothing is written off. For tracked SKUs writing off on-hand stock the units must be named exactly as a pick names them: serials free on the shelf at that site, or a lot with enough free units there (409 PickTrackingMismatch / UnitsNotOnShelf otherwise; expired units are claimable — leaving as a write-off is what expiry is for). disposition decides what happens physically: dispose (default) removes the units from inventory entirely; keep-damaged moves them to the damaged bucket (broken but kept). Either way the units leave the free shelf and registry, and accounting consumes their cost layers per the SKU's costing method and posts a write-down ledger entry — the loss is recognised when the damage is, so a later disposal of kept-damaged stock posts nothing. bucket: "damaged" is that later disposal: it empties units already in inventory's damaged bucket (damaged refund returns, earlier keep-damaged write-offs), skips shelf validation (those units are not on the free shelf), and posts no ledger entry. Inventory is commanded before the append (inventory.stock-disposed or inventory.stock-damaged, reference = the write-off id; 409 InsufficientStock when the bucket is short). Appends fulfillment.stock-written-off. writeOffId (a caller-minted wo_…) is required and is the idempotency key — a retried write-off is acknowledged with the original document, never applied twice.
Access
Requires stock:write.
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
writeOffId (a caller-minted wo_…) is required and is the idempotency key — a retried write-off is acknowledged with the original document, never applied twice.
A retry with the same key answers 201, with what the first call recorded.
Why every write carries a key: Idempotency and retries.
Facts appended
fulfillment.stock-written-off
What a fact is: Facts and the journal.
AI agent tool
Agents call this as fulfillment_write_off_stock (Fulfillment: Write off stock), in the parcels toolset. It is marked destructive, so the agent asks before running it.
Connecting an agent: AI agents.
Example
curl -X POST 'https://fulfillment.getmanifold.io/write-offs' \
-H "Authorization: Bearer $MANIFOLD_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"writeOffId": "wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e",
"sku": "MUG-SPECKLE",
"locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
"quantity": 2,
"reason": "damaged",
"disposition": "dispose",
"note": "Dropped during a stock count"
}'const response = await fetch("https://fulfillment.getmanifold.io/write-offs", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"writeOffId": "wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e",
"sku": "MUG-SPECKLE",
"locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
"quantity": 2,
"reason": "damaged",
"disposition": "dispose",
"note": "Dropped during a stock count"
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"writeOffId": "wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e",
"sku": "MUG-SPECKLE",
"locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
"quantity": 2,
"reason": "damaged",
"disposition": "dispose",
"note": "Dropped during a stock count"
}{
"id": "wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e",
"sku": "MUG-SPECKLE",
"locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
"quantity": 2,
"reason": "damaged",
"disposition": "dispose",
"bucket": "onHand",
"note": "Dropped during a stock count",
"occurredAt": "2026-10-20T08:20:41.556Z"
}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: fulfillment-manager.openapi.json. Base URL https://fulfillment.getmanifold.io.
Errors
Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.
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 |
|---|---|---|
ItemNotFound sku | No such record in this organization. | Check the id in the path or the body. |
LocationNotFound locationId | No such record in this organization. | Check the id in the path or the body. |
409
| Refusal | What it means | What to do |
|---|---|---|
InsufficientStock sku, available, requested, locationId | Fewer units are free than the call needs. available and requested say how many. | Receive or move stock in first, or ask for fewer. |
LocationArchived locationId | The location is archived, and an archived location takes no changes or stock. | Use an active location. |
PickTrackingMismatch sku, tracking, reason | The units picked are not named the way the SKU is tracked. | Name serials or a batch for a tracked SKU, nothing for an untracked one. |
UnitsNotOnShelf sku, reason, serials | The serials or batch named are not free on the shelf. serials lists them. | Name units that are on the shelf and not held by another parcel. |
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. |
PurchasingUnavailable reason | The purchasing 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.