Purchasing Manager API · pos

When a unit of each SKU is likely to be in hand

GET /restock-eta

When a unit of each SKU is likely to be in hand (sku, or skus comma-separated, up to 200): first the earliest open purchase order whose outstanding units are not already taken by the SKU's backorders (basis: inbound-po), at its projected arrival — a carrier ETA, the expected day moved by the supplier's lateness, or the SKU's own lead-time estimate from the day placed; else, if ordered today, the lead-time estimate of the SKU's priced supplier, or the soonest supplier (reorder-lead-time); else none.

A lead-time estimate weighs each past delivery by its age (the organization's leadTimeHalfLifeDays) and shrinks a SKU with little history toward its supplier's other SKUs (leadTime: expected days, p10/p50/p80/p90, effective sample, the factors used). availableOn with its band (earliestOn–latestOn), daysAway, confidence and the supplier; backordered is what the inbound supply was netted against, absent when inventory did not answer. Precomputed in the background as facts land and daily; a SKU never asked about is computed on the spot.

Access

Requires purchasing:read or products:read.

Any one of these scopes is enough.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

AI agent tool

Agents call this as purchasing_get_restock_eta (Purchasing: Get restock eta), in the orders toolset. It only reads.

Connecting an agent: AI agents.

Example

curl
curl -X GET 'https://purchasing.getmanifold.io/restock-eta?skus=WIDGET-BLUE%2CWIDGET-RED' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN"
JavaScript (fetch)
const response = await fetch("https://purchasing.getmanifold.io/restock-eta?skus=WIDGET-BLUE%2CWIDGET-RED", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}` },
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Response · 200 · application/json
{
  "asOf": "2026-10-29",
  "items": [
    {
      "sku": "WIDGET-BLUE",
      "asOf": "2026-10-29",
      "basis": "inbound-po",
      "availableOn": "2026-11-04",
      "earliestOn": "2026-11-02",
      "latestOn": "2026-11-07",
      "daysAway": 6,
      "confidence": "high",
      "supplier": "Northwind Components",
      "supplierId": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
      "poId": "po_01a1340f-9980-7c41-9d37-d97a5cec069b",
      "poNumber": "PO-00002",
      "inboundUnits": 30,
      "backordered": 12
    },
    {
      "sku": "WIDGET-RED",
      "asOf": "2026-10-29",
      "basis": "reorder-lead-time",
      "availableOn": "2026-11-09",
      "earliestOn": "2026-11-05",
      "latestOn": "2026-11-16",
      "daysAway": 11,
      "confidence": "medium",
      "supplier": "Northwind Components",
      "supplierId": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
      "inboundUnits": 0,
      "leadTime": {
        "sku": "WIDGET-RED",
        "supplierKey": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
        "supplierId": "cmp_01a15884-6399-7e5f-8a6b-1c2d3e4f5a6b",
        "supplier": "Northwind Components",
        "expectedDays": 10.8,
        "p10Days": 7,
        "p50Days": 10,
        "p80Days": 14,
        "p90Days": 18,
        "skuReceipts": 2,
        "supplierReceipts": 14,
        "effectiveSample": 4.6,
        "skuWeightPercent": 38.2,
        "halfLifeDays": 180,
        "confidence": "medium",
        "factors": [
          "sku-history",
          "supplier-history",
          "recency"
        ],
        "lastReceivedOn": "2026-09-30"
      }
    }
  ]
}

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.

401

RefusalWhat it meansWhat 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

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat 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.

409

RefusalWhat it meansWhat to do
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.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Try again shortly.

How refusals work everywhere: Errors.