Inventory Manager API · locations

Set the organization's site priority

PUT /locations/priority

Set the organization's site priority — the order routing tries sites in under the rank policy, and the tie-break under nearest.

locationIds lists sites highest priority first; each listed site's rank becomes its place in the list (10, 20, 30 …), and a site the list leaves out keeps the rank it had. Appends one inventory.location-updated (carrying rank) per site whose rank moved, in one commit. Idempotent by content: a list that moves no rank appends nothing. 404 LocationNotFound for an id the organization does not have, 409 LocationArchived for an archived site. Answers every location in routing order. A catalog's own priority is part of its routing policy (PUT /workflow, routingByCatalog), not this list.

Access

Requires locations:write.

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

Retries

Idempotent by content: a list that moves no rank appends nothing.

Why every write carries a key: Idempotency and retries.

Facts appended

  • inventory.location-updated

What a fact is: Facts and the journal.

AI agent tool

No agent tool. The admin's drag-to-order list in Settings › Workflow; an agent moves a site in the priority order with inventory_update_location's rank instead.

Connecting an agent: AI agents.

Example

Put the shopfront ahead of Main.

curl
curl -X PUT 'https://inventory.getmanifold.io/locations/priority' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "locationIds": [
    "loc_019cd06e-3b38-7e92-b496-c92f8184a3aa",
    "loc_019cadd3-8330-7e12-aa44-2cd5f05da74a"
  ]
}'
JavaScript (fetch)
const response = await fetch("https://inventory.getmanifold.io/locations/priority", {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "locationIds": [
      "loc_019cd06e-3b38-7e92-b496-c92f8184a3aa",
      "loc_019cadd3-8330-7e12-aa44-2cd5f05da74a"
    ]
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "locationIds": [
    "loc_019cd06e-3b38-7e92-b496-c92f8184a3aa",
    "loc_019cadd3-8330-7e12-aa44-2cd5f05da74a"
  ]
}
Response · 200 · application/json
{
  "items": [
    {
      "id": "loc_019cd06e-3b38-7e92-b496-c92f8184a3aa",
      "name": "Shopfront",
      "fulfillable": true,
      "archived": false,
      "note": "Counter stock; restocked from Main twice a week.",
      "address": {
        "company": "Tidewater Supply Co.",
        "address1": "Shop 2, 40 Example Parade",
        "city": "Brookvale",
        "province": "New South Wales",
        "provinceCode": "NSW",
        "country": "Australia",
        "countryCode": "AU",
        "zip": "2100"
      },
      "coordinates": {
        "latitude": -33.7633,
        "longitude": 151.2694
      },
      "rank": 10,
      "bindings": [],
      "createdAt": "2026-03-09T02:30:11.000Z",
      "updatedAt": "2026-10-29T06:00:00.000Z"
    },
    {
      "id": "loc_019cadd3-8330-7e12-aa44-2cd5f05da74a",
      "name": "Main",
      "fulfillable": true,
      "archived": false,
      "address": {
        "company": "Tidewater Supply Co.",
        "address1": "Unit 4, 18 Example Road",
        "city": "Brookvale",
        "province": "New South Wales",
        "provinceCode": "NSW",
        "country": "Australia",
        "countryCode": "AU",
        "zip": "2100"
      },
      "coordinates": {
        "latitude": -33.7614,
        "longitude": 151.2675
      },
      "rank": 20,
      "bindings": [
        {
          "channelId": "chn_019ce0d8-5d50-7597-8115-9ea4c1b646da",
          "externalId": "store-location-1",
          "externalName": "Warehouse"
        }
      ],
      "createdAt": "2026-03-02T09:14:06.000Z",
      "updatedAt": "2026-10-29T06:00:00.000Z"
    },
    {
      "id": "loc_01a15b90-35a0-738e-af06-23ef7db9fddc",
      "name": "Quarantine bay",
      "fulfillable": false,
      "archived": false,
      "note": "Returns awaiting inspection. Never sold from.",
      "rank": 100,
      "bindings": [],
      "createdAt": "2026-10-20T23:05:40.000Z",
      "updatedAt": "2026-10-20T23:05:40.000Z"
    }
  ],
  "total": 3,
  "offset": 0
}

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: inventory-manager.openapi.json. Base URL https://inventory.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.

404

RefusalWhat it meansWhat to do
LocationNotFound locationId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
LocationArchived locationId The location is archived, and an archived location takes no changes or stock.Use an active location.
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.Send the same request again shortly.

How refusals work everywhere: Errors.