Fulfillment Manager API · orders

Edit an order in place

POST /orders/{orderId}/edits

Edit an order in place, the way a storefront edits one: lines, discounts, charges, ship-to, ship-from site or customer.

A draft quote takes an edit and allocates nothing; an issued quote refuses one (409 EditNotAllowed until reopened). A reduction reaches only unpicked quantity (409 EditNotAllowed) and releases its hold; an addition is priced like a create's line (409 LineUnpriced, 409 SkuNotInCatalogs) and allocated now. Added or resized lines keep their order rules (422), their attributes the line item properties, and are re-taxed (409 TaxRateMissing); shipping-rate-chosen takes a POST /rates rate. A discount past the line's worth is 409 LineDiscountRefused. customer-changed sets who the order is for (absent customer: none) with the addresses; a placed order only gains a customer it never had (409 EditNotAllowed), and on a draft quote a company with its own catalogs moves the quote onto them, repricing every line without a priceOverride (409 OrderCatalogCurrencyMismatch across currencies). Appends fulfillment.order-edited (and fulfillment.stock-allocated / fulfillment.shipment-created for new quantity). editId is required and is the idempotency key: a retry with the same id is acknowledged and appends nothing.

Access

Requires orders:write.

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

Retries

editId 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 201, with what the first call recorded.

Why every write carries a key: Idempotency and retries.

Facts appended

  • fulfillment.order-edited
  • fulfillment.stock-allocated
  • fulfillment.shipment-created

What a fact is: Facts and the journal.

AI agent tool

Agents call this as fulfillment_edit_order (Fulfillment: Edit order), in the fulfillment toolset.

Connecting an agent: AI agents.

Example

curl
curl -X POST 'https://fulfillment.getmanifold.io/orders/ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60/edits' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "editId": "edit-po-7795-1",
  "reason": "Customer added a bowl by phone",
  "changes": [
    {
      "_tag": "quantity-changed",
      "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
      "quantity": 8
    },
    {
      "_tag": "line-added",
      "sku": "BOWL-SALT-L",
      "quantity": 1
    }
  ]
}'
JavaScript (fetch)
const response = await fetch("https://fulfillment.getmanifold.io/orders/ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60/edits", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "editId": "edit-po-7795-1",
    "reason": "Customer added a bowl by phone",
    "changes": [
      {
        "_tag": "quantity-changed",
        "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
        "quantity": 8
      },
      {
        "_tag": "line-added",
        "sku": "BOWL-SALT-L",
        "quantity": 1
      }
    ]
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "editId": "edit-po-7795-1",
  "reason": "Customer added a bowl by phone",
  "changes": [
    {
      "_tag": "quantity-changed",
      "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
      "quantity": 8
    },
    {
      "_tag": "line-added",
      "sku": "BOWL-SALT-L",
      "quantity": 1
    }
  ]
}
Response · 201 · application/json
{
  "id": "ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60",
  "reference": "PO-7795",
  "source": {
    "kind": "api"
  },
  "customer": {
    "companyId": "cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d",
    "shippingAddressId": "cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e",
    "billingAddressId": "cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"
  },
  "party": {
    "companyId": "cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d",
    "name": "Harbour Ceramics Pty Ltd",
    "paymentTermsDays": 30,
    "shipTo": {
      "id": "cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e",
      "label": "Fremantle warehouse",
      "address": {
        "firstName": "Receiving",
        "lastName": "Dock",
        "company": "Harbour Ceramics",
        "address1": "14 Kiln Street",
        "city": "Fremantle",
        "province": "Western Australia",
        "provinceCode": "WA",
        "country": "Australia",
        "countryCode": "AU",
        "zip": "6160"
      }
    },
    "billTo": {
      "id": "cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e",
      "label": "Fremantle warehouse",
      "address": {
        "company": "Harbour Ceramics Pty Ltd",
        "address1": "PO Box 412",
        "city": "Fremantle",
        "provinceCode": "WA",
        "countryCode": "AU",
        "zip": "6959"
      }
    }
  },
  "catalogIds": [
    "cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"
  ],
  "currency": "AUD",
  "fx": {
    "currency": "AUD",
    "home": "AUD",
    "rate": 1,
    "rateDate": "2026-10-20",
    "source": "same"
  },
  "convention": "exclusive",
  "shippingTaxBasis": {
    "_tag": "calculated",
    "treatment": "domestic",
    "country": "AU",
    "class": "follows-goods",
    "rateBps": 1000
  },
  "number": "SO-01043",
  "serial": 1043,
  "status": "open",
  "lines": [
    {
      "id": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
      "sku": "MUG-SPECKLE",
      "name": "Speckled stoneware mug",
      "ordered": 8,
      "removed": false,
      "catalogId": "cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e",
      "discountCents": 0,
      "allocated": 8,
      "picked": 0,
      "packed": 0,
      "dispatched": 0,
      "invoiced": 0,
      "returned": 0,
      "unitPriceCents": 2400,
      "listPriceCents": 2400,
      "inclusive": false,
      "taxBasis": {
        "_tag": "calculated",
        "treatment": "domestic",
        "country": "AU",
        "parts": [
          {
            "class": "standard",
            "rateBps": 1000,
            "weight": 1
          }
        ]
      },
      "orderDiscountCents": 0,
      "tax": {
        "inclusive": false,
        "amountCents": 19200,
        "entries": [
          {
            "class": "standard",
            "treatment": "domestic",
            "country": "AU",
            "rateBps": 1000,
            "netCents": 19200,
            "taxCents": 1920,
            "source": "manifold"
          }
        ],
        "netCents": 19200,
        "taxCents": 1920,
        "grossCents": 21120
      }
    },
    {
      "id": "lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182",
      "sku": "BOWL-SALT-L",
      "name": "Salt-glaze serving bowl, large",
      "ordered": 1,
      "removed": false,
      "discountCents": 0,
      "allocated": 1,
      "picked": 0,
      "packed": 0,
      "dispatched": 0,
      "invoiced": 0,
      "returned": 0,
      "unitPriceCents": 3800,
      "listPriceCents": 3800,
      "inclusive": false,
      "taxBasis": {
        "_tag": "calculated",
        "treatment": "domestic",
        "country": "AU",
        "parts": [
          {
            "class": "standard",
            "rateBps": 1000,
            "weight": 1
          }
        ]
      },
      "orderDiscountCents": 0,
      "tax": {
        "inclusive": false,
        "amountCents": 3800,
        "entries": [
          {
            "class": "standard",
            "treatment": "domestic",
            "country": "AU",
            "rateBps": 1000,
            "netCents": 3800,
            "taxCents": 380,
            "source": "manifold"
          }
        ],
        "netCents": 3800,
        "taxCents": 380,
        "grossCents": 4180
      }
    }
  ],
  "workflow": {
    "paymentTerms": "prepaid",
    "pick": "manual",
    "pack": "manual",
    "ship": "manual",
    "invoice": "manual",
    "shortfall": "wait",
    "allocation": "single-site-preferred",
    "routing": {
      "order": "rank",
      "decider": "manifold",
      "priority": []
    },
    "routingByCatalog": {}
  },
  "paymentTermsBy": "changed",
  "createdSequence": 4131,
  "shipments": [
    {
      "id": "shp_01a158e0-8b90-7ca1-9db2-4e5f60718293",
      "number": "SH-01060",
      "reference": "auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:1",
      "status": "pending",
      "locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
      "lines": [
        {
          "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
          "sku": "MUG-SPECKLE",
          "quantity": 6
        }
      ],
      "cartons": [],
      "createdAt": "2026-10-20T05:10:03.447Z",
      "updatedAt": "2026-10-20T05:10:03.447Z"
    },
    {
      "id": "shp_01a15900-9ca0-7db1-8ec2-5f60718293a4",
      "number": "SH-01061",
      "reference": "auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:2",
      "status": "pending",
      "locationId": "loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4",
      "lines": [
        {
          "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
          "sku": "MUG-SPECKLE",
          "quantity": 2
        },
        {
          "lineId": "lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182",
          "sku": "BOWL-SALT-L",
          "quantity": 1
        }
      ],
      "cartons": [],
      "createdAt": "2026-10-20T05:31:40.808Z",
      "updatedAt": "2026-10-20T05:31:40.808Z"
    }
  ],
  "invoices": [],
  "refunds": [],
  "payments": [],
  "notes": [],
  "edits": [
    {
      "editId": "edit-po-7795-1",
      "changes": [
        {
          "_tag": "quantity-changed",
          "lineId": "lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071",
          "quantity": 8
        },
        {
          "_tag": "line-added",
          "lineId": "lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182",
          "sku": "BOWL-SALT-L",
          "name": "Salt-glaze serving bowl, large",
          "quantity": 1,
          "unitPriceCents": 3800,
          "listPriceCents": 3800,
          "inclusive": false,
          "taxBasis": {
            "_tag": "calculated",
            "treatment": "domestic",
            "country": "AU",
            "parts": [
              {
                "class": "standard",
                "rateBps": 1000,
                "weight": 1
              }
            ]
          }
        }
      ],
      "reason": "Customer added a bowl by phone",
      "by": {
        "_tag": "user",
        "id": "usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"
      },
      "editedAt": "2026-10-20T05:31:40.808Z"
    }
  ],
  "consignments": [],
  "money": {
    "subtotalCents": 23000,
    "charges": {
      "shippingCents": 0,
      "shippingDiscountCents": 0,
      "discountCents": 0
    },
    "discountCents": 0,
    "tax": {
      "netCents": 23000,
      "taxCents": 2300,
      "grossCents": 25300,
      "breakdown": [
        {
          "class": "standard",
          "treatment": "domestic",
          "country": "AU",
          "rateBps": 1000,
          "exempt": false,
          "taxableCents": 23000,
          "taxCents": 2300
        }
      ]
    },
    "totalCents": 25300,
    "paidCents": 0,
    "refundedCents": 0,
    "balanceCents": 25300,
    "refundOwedCents": 0,
    "status": "unpaid"
  },
  "discounts": [],
  "shortfalls": [],
  "createdAt": "2026-10-20T05:10:03.447Z",
  "updatedAt": "2026-10-20T05:31:40.808Z"
}

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.

400

RefusalWhat it meansWhat to do
ShippingRateInvalid reason The request was refused. reason says why.Fix the request. Sending it again unchanged gets the same answer.
LineAttributeInvalid sku, name, reason The request was refused. reason says why.Fix the request. Sending it again unchanged gets the same answer.

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
CatalogNotOpenToRep catalogIds The request was refused, and nothing changed.The caller may not do this. Use a token whose roles allow it.
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
FulfillmentOrderNotFound orderId No such record in this organization.Check the id in the path or the body.
OrderLineNotFound orderId, lineId No such record in this organization.Check the id in the path or the body.
ItemNotFound sku No such record in this organization.Check the id in the path or the body.
OrderCatalogNotFound catalogId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
OrderNotOpen orderId, status The order is cancelled, closed or still a quote, so it takes no more of this. status says which.Read the order before doing anything else.
EditNotAllowed orderId, lineId, reason The edit would change units already picked or packed, or the order cannot be edited now. reason says which.Cancel the parcel first, or reopen the quote.
LineUnpriced orderId, lineIds, skus A line has no price, and every line of an order needs one. lineIds names them.Send unitPriceCents for those lines, or list the SKUs in a catalog.
LineDiscountRefused lineId, sku, discountCents, lineCents, reason The request was refused. reason says why.Nothing changed. Read the record, then decide.
TaxRateMissing class, at The organization charges tax on this class but has no rate for it on that day.An owner adds a rate for the class in Settings › Tax.
OrderCatalogCurrencyMismatch catalogIds, currencies The catalogs that would price the order use more than one currency, or not the one asked for.Name one catalog, or send a currency it uses.
FulfillmentLocationInvalid locationId, reason The request was refused. reason says why.Nothing changed. Read the record, then decide.
LineAttributeRequired sku, name The request was refused, and nothing changed.Nothing changed. Read the record, then decide.
SkuNotInCatalogs catalogIds, skus, message The request was refused, and nothing changed.Nothing changed. Read the record, then decide.
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.

422

RefusalWhat it meansWhat to do
QuantityBelowMinimum lineId, sku, quantity, minQuantity, reason The request was refused. reason says why.Fix the request. Sending it again unchanged gets the same answer.
QuantityNotInStep lineId, sku, quantity, minQuantity, step, reason The request was refused. reason says why.Fix the request. Sending it again unchanged gets the same answer.

502

RefusalWhat it meansWhat to do
InventoryUnavailable reason The inventory service did not answer, so nothing changed.Send the same request again, with the same key.
CrmUnavailable reason Customer records could not be read, so nothing changed.Send the same request again, with the same key.

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, with the same key.

How refusals work everywhere: Errors.