Inventory
Inventory tracks how much of each thing you stock, where it is, and how much of it is already promised to a buyer. Flint keeps the quantities per Location, derives what you can still sell, holds stock while a buyer pays, and records every change as an immutable movement that names its cause.
Selling through Flint takes no inventory calls beyond stocking the shelf: an order with an inventory_routing_source holds, commits, and consumes its own stock, as Orders and checkout describes. Call the inventory API to:
- Put stock on the shelf and report what happened to it: Which call records what.
- Hold stock for a cart you run outside Flint: Reserving stock.
- Record whether an item may carry units on backorder: Backorders.
- Decide which Locations serve demand: Routing across locations.
- Count stock, move it between Locations, or withhold it from sale: Operations.
- Trace any quantity back to the command that changed it: Reading the ledger.
The Inventory guide walks one item from first stock through a paid, shipped order.
Each inventory receipt line includes required return_id beside return_line_item_id. It is null when the line has no Return line reference.
The records#
| Record | ID prefix | What it is |
|---|---|---|
| Inventory item | invi_ | The thing you stock. A catalog variant points at one instead of keeping its own count, so several variants can sell from one pool of stock. |
| Inventory level | invl_ | One item at one Location. It carries the quantities, and you never write them directly. |
| Inventory movement | invm_ | One immutable change to a level, naming the record that caused it. |
| Adjustment | invadj_ | A physical event you report: stock received, returned, sold, lost, changed condition, counted, or corrected. |
| Receipt | invrec_ | Units a Flint reservation consumed, put back on the shelf. |
| Reservation | invr_ | A claim on stock, with one line (invrln_) for each item and Location it claims. |
| Allocation policy | invp_ | Ranked Locations that route demand. Each configuration is an immutable revision (invpv_). |
| Count | invc_ | A stocktake of selected items at one Location, applied in one step. |
| Transfer | invtr_ | Stock moving from one Location to another, with one line (invtrln_) for each item and condition. |
Items and allocation policies share one status lifecycle:
- active moves to inactive on PATCH status
- inactive moves to active on PATCH status
- active moves to archived on DELETE
- inactive moves to archived on DELETE
Only stock behind an active item can be routed or reserved, and only an active policy routes new demand. An archived item or policy stays readable by ID, and lists include it only when you filter on status=archived. It can't change again: a PATCH or DELETE returns 409 ACTION_NOT_ALLOWED with reason unsupported_state. Making an item or policy inactive or archived while stock, claims, or open records depend on it returns 409 RESOURCE_IN_USE.
An inventory item's sku is separate from a variant's sku, and Flint doesn't sync one to the other. To find what the catalog sells from an item, see Find products through their variants.
A level exists once stock has been recorded for its item and Location. To create one before any stock arrives, such as to set safety stock first, record a counted adjustment with on_hand_quantity 0. It creates the level without writing a movement and returns it in inventory_levels.
Quantity states#
A level holds physical stock and claims against it. You change stock by recording what happened, and Flint derives the rest.
| Kind | Fields |
|---|---|
| Physical | on_hand_quantity: everything present at the Location, in any condition. Of that, quality_control_quantity, damaged_quantity, and quarantined_quantity aren't sellable; unavailable_on_hand_quantity is their sum. |
| Claims | held_quantity for open reservations, such as a buyer who is paying, and committed_quantity for accepted orders. |
| Backordered | backordered_quantity, units waiting for stock. It is separate from held_quantity and committed_quantity, and neither formula below uses it. See Backorders. |
| Withheld | safety_stock_quantity, kept back from sale on purpose. |
| Inbound | incoming_quantity, departed on a transfer to this Location and not yet received. It doesn't count toward availability. |
| Derived | available_quantity and shortage_quantity, never below 0 and never written. |
available_quantity = on_hand_quantity - unavailable_on_hand_quantity
- held_quantity - committed_quantity - safety_stock_quantity
shortage_quantity = held_quantity + committed_quantity
- (on_hand_quantity - unavailable_on_hand_quantity)
The level in the Create inventory reservation response example has 48 on hand, 2 damaged, 4 held, 6 committed, and 5 in safety stock, so 31 are available: 48 - 2 - 4 - 6 - 5. Its claims (10) are well inside its sellable stock (46), so shortage_quantity is 0. Safety stock lowers available_quantity but never counts toward a shortage.
Because committed stock leaves on_hand_quantity only when fulfillment consumes it, canceling an order before shipment restores availability without any physical movement.
Poll changed levels#
GET /v1/inventory-levels orders by updated_at, then inventory_level_id, both ascending. Level timestamps have whole-second precision. Its opaque next_page_token preserves the returned timestamp and ID; use it with the same filters. Continuation returns matching levels that sort after that pair. A lower-ID level changed in the cursor's second stays behind the cursor, even if the write commits before the next page request. An update can also move a level to a later page or outside a fixed time window.
Use an inclusive updated_after and exclusive updated_before to scan a fixed window. Before page 1, round the upper boundary down to a whole second so the current second belongs to a later window. Save that boundary only when every page is stored, then start the next scan one second before it. Deduplicate by level ID and retain the newest version. updated_at is not a commit watermark: a delayed commit can become visible behind the checkpoint. Consume durable inventory events, or finish every polling sync with a complete scan without time bounds, to recover same-second omissions and delayed commits. A full scan includes levels committed before it starts whose timestamps and filter membership remain unchanged during the scan; keep reconciling on every scheduled sync. See Poll changed levels for the full checkpoint recipe.
Backorders#
A backordered unit is a sale counted ahead of the stock that will fill it. An inventory item's backorder object records whether the item may carry backordered units, how many, and when Flint expects to ship them.
| Field | Rule |
|---|---|
enabled | false unless you set it. |
limit_quantity | The most units that can be on backorder at once across all of the item's levels, counting tentative and firm units. At least 1, or null for no cap. |
expected_ship_date | A calendar date in YYYY-MM-DD form, or null when unknown. |
Every inventory item response includes all three fields. POST /v1/inventory-items and PATCH /v1/inventory-items/{inventory_item_id} accept backorder as a patch object: the fields you send change, and the fields you leave out stay as they are. Send at least one field. enabled can't be null, and null clears limit_quantity or expected_ship_date.
curl -X PATCH https://api.withflintpay.com/v1/inventory-items/invi_1kmn0aExample \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "backorder": { "enabled": true, "limit_quantity": 50, "expected_ship_date": "2026-12-15" } }'
With enabled set to true, tracked orders you create directly and payment link checkouts claim the units stock can't cover as backordered units, as Orders and checkout describes. Bundle components and subscription renewals never backorder, and a reservation you create with POST /v1/inventory-reservations never backorders: these return 409 INVENTORY_INSUFFICIENT when stock falls short, or for a renewal keep waiting in inventory_wait. backordered_quantity reads 0 on levels and reservation lines until a unit is backordered.
Reading backordered quantity#
- A level's
backordered_quantityis separate from held and committed quantity. It doesn't changeavailable_quantityorshortage_quantity, doesn't put a reservation line at risk, and never blocks a commit or consume. - Backordered units are tentative until the order is paid. While a hold is open, such as a delivery selection or a payment in progress, its backordered units carry the hold's deadline, and the reservation's
expires_atstays set. They become firm when the order that owns them is paid in full (payment_status: paid). Partial funding, such as a partial payment or one tender of a split payment, commits held units but doesn't make backordered units firm. The payment that completes the order does. - A level with firm backordered units has
available_quantity0. Tentative backordered units can sit beside available stock, because the stock isn't promised to anyone yet. - Arriving stock fills firm units first. Every write that raises sellable stock moves firm backordered units to committed in the same transaction: an adjustment, a transfer receive, an applied count, a return receipt, a release of held or committed units, and a safety stock or condition change. The oldest payment goes first, ties break in a fixed order, and a line can be filled in part. Tentative units wait until their order is paid.
The command's inventory_levels show the levels after that allocation.
On a reservation line, backordered_quantity counts units waiting for stock and released_from_backordered_quantity counts units released while they were waiting. Both are always present and never below 0. allocated_quantity equals the sum of the line's held_quantity, committed_quantity, backordered_quantity, consumed_quantity, released_from_held_quantity, released_from_committed_quantity, released_from_backordered_quantity, and reallocated_quantity. A reservation stays active while any line holds, has committed, or has backordered units.
A movement's backordered_quantity_delta is the change to the level's backordered_quantity. When arriving stock fills waiting units, the reservation_committed movement shows the negative change there and the same positive change in committed_quantity_delta.
Orders and checkout#
Selling through a Flint order needs no reservation calls. Give the order an inventory_routing_source, and Flint holds stock when a payment begins, commits it when the payment succeeds, releases it when the payment fails or is canceled, and consumes it when fulfillment hands the goods off. The order's inventory_reservation_id names that reservation, which you can read but not change. Payment links, quick pay invoices, and subscription plans take a routing source and move stock the same way.
- Tracked demand needs a routing source. A request with tracked demand that omits
inventory_routing_sourceuses the merchant'ssettings.inventory.default_routing_sourceand stores it on the resource, as if the caller had sent it; changing the default later doesn't move existing routing. With no default, orders, payment links, and subscription plans use the active Location in the current environment that has had inventory allocation enabled the longest. Links and plans leave the implicit source unstored and resolve it again on use. With no eligible Location and no default, creating an order with a tracked line and no source returns400 INVALID_REQUESTwith detailREQUIREDatinventory_routing_source. On an existing order without one, adding a tracked line uses the default or the same fallback Location and otherwise returns409 ACTION_NOT_ALLOWEDwith reasonconfiguration_required. Paying such an order doesn't read the default: it returns409 ACTION_NOT_ALLOWEDwith reasonconfiguration_requireduntil you set the order'sinventory_routing_source. - Stock must cover the order before money moves, unless the item allows backorders. If no eligible Location can serve the demand at payment preflight, Flint returns
409 INVENTORY_INSUFFICIENTbefore creating an attempt. If another buyer takes the stock after preflight and an attempt already exists, Flint returns200with the attempt instatus: "failed"andstatus_reason: "inventory_unavailable". Neither outcome charges the buyer. When the item hasbackorder.enabled, an order claims the units stock can't cover as backordered units, up to the item'sbackorder.limit_quantity. When the limit blocks a route, the preflight error uses reasonbackorder_limit_reached. The detail identifies theinventory_item_id, itslimit, and thecurrent_countalready backordered across all locations.available_quantitycounts sellable stock. The remaining backorder room ismax(0, limit - current_count). Sell past available stock walks through it. - Backordered units can't ship until stock fills them. A fulfillment that claims them returns
409 INVENTORY_INSUFFICIENT. What an order can fulfill now is each line'sunassigned_quantityminus itsbackordered_quantity; see Backordered and pre-ordered lines. - Some demands never backorder. Bundle components and reservations you create return
409 INVENTORY_INSUFFICIENTwhen stock falls short. A subscription renewal that stock can't cover keeps waiting ininventory_wait. - A paid order whose stock can't be committed reports an exception. The order sets
inventory_exception_statustopaid_inventory_failedand sendsorder.inventory_exception_created. Resolve it withPOST /v1/orders/{order_id}/resolve-inventory-exception, or setpost_payment_inventory_failure_actiontoauto_refundin anorigin_policiesentry of inventory settings to have Flint refund instead. Track inventory covers both.
Reserve stock yourself only when the cart lives outside Flint: your own storefront, a POS, or a system that holds stock before an order exists.
Which call records what#
Each physical event has one call. Choose it by what happened, not by what the stock should look like afterward.
| What happened | Call | Movement type |
|---|---|---|
| New stock arrived from a supplier | POST /v1/inventory-adjustments with reason: received | adjustment |
| Stock moved between your Locations | POST /v1/inventory-transfers, then its lifecycle actions | transfer_* |
| A buyer returned units a Flint order or reservation consumed | A Return disposition, or POST /v1/inventory-receipts naming the reservation line | return_received |
| A customer returned units sold outside Flint | POST /v1/inventory-adjustments with reason: returned | adjustment |
| A sale already happened outside Flint, such as at a POS | POST /v1/inventory-adjustments with reason: sold, which doesn't check claims | adjustment |
| A cart needs stock held before payment | POST /v1/inventory-reservations, then commit, consume, or release | reservation_* |
| Stock was stolen, lost, or discarded | POST /v1/inventory-adjustments with reason: theft or loss | adjustment |
| Units changed condition | POST /v1/inventory-adjustments with reason: condition_changed | adjustment |
| Another system reports what is on hand | POST /v1/inventory-adjustments with reason: counted | adjustment |
| A recorded number is wrong | POST /v1/inventory-adjustments with reason: correction and a note | adjustment |
| A stocktake across many items | POST /v1/inventory-counts, save observations, then apply | count_applied |
| Withhold stock from sale | PATCH /v1/inventory-levels/{inventory_level_id} with safety_stock_quantity | safety_stock_change |
An adjustment that would take a quantity below zero, or leave more unsellable stock than is on hand, returns 409 INVENTORY_INSUFFICIENT. A counted or correction line and each count observation can carry source_observation_sequence, so a late message from another system can't overwrite a newer one. Source sequences order observations from one source; they do not protect against Flint movements. Every counted or correction adjustment with an explicit occurred_at requires expected_physical_version on each line. Read the level before taking the count and submit that version. A missing or stale physical version returns 409 VERSION_CONFLICT at lines[i].expected_physical_version; take a fresh count before retrying. The sequence is an integer from 1 to 9007199254740991, allowed only with source_system.type of pos, wms, erp, or other and a non-empty external_source_id.
A receipt never adds new stock. It puts back units a Flint reservation consumed, so every line names inventory_reservation_id and inventory_reservation_line_id, and its quantity can't exceed what that line consumed less what earlier receipts returned. The line's disposition picks the bucket: sellable, quality_control, damaged, or quarantined adds on-hand stock there, and lost records units that never came back and changes no stock. A Return disposition writes its receipt for you, so it needs no reservation fields.
How a command states a quantity#
You never send a signed change. Every command says what happened, in one of three forms:
| Form | Fields | Used by | Reads as |
|---|---|---|---|
| Quantity | quantity | received, returned, sold, theft, loss, and condition_changed adjustments; receipt lines | "Twenty-five arrived." |
| Absolute value | on_hand_quantity and the condition quantities, counted_*_quantity, safety_stock_quantity | counted and correction adjustments, count observations, the level PATCH | "Forty are on hand." Quantities you leave out stay unchanged. |
| Cumulative target | target_*_quantity | Reservation and transfer actions | "Two should be committed by now." |
Flint computes the change against the level as it is when the command commits, so a quantity or absolute value is never applied to a stale read. Targets converge: this POST /v1/inventory-reservations/{inventory_reservation_id}/commit body moves the line to 2 committed, and sending it again succeeds and changes nothing, even after the reservation closes.
{
"lines": [
{ "inventory_reservation_line_id": "invrln_1kmn0aExample", "target_committed_quantity": 2 }
]
}
What a command returns#
Adjustment, receipt, and reservation creates, and every reservation, transfer, and count action, return a result: the subject resource first, then inventory_levels, the state of every level the command touched after it committed. You don't need a follow-up read.
| Command | Result schema | Subject member |
|---|---|---|
| Create an adjustment | InventoryAdjustmentResult | inventory_adjustment |
| Create a receipt | InventoryReceiptResult | inventory_receipt |
| Create a reservation or run one of its actions | InventoryReservationResult | inventory_reservation |
| Run a transfer action | InventoryTransferResult | inventory_transfer |
| Apply or cancel a count | InventoryCountResult | inventory_count |
An action that moves no stock still returns a result, so a count cancel returns an empty inventory_levels array. A replay returns the levels as of the original command. The level PATCH returns the InventoryLevel itself, and the reservation PATCH returns the InventoryReservation.
To find the movements a command wrote, read the subject's lines: adjustment, receipt, and applied count lines carry the inventory_movement_id each wrote. It is null on an adjustment line that changed nothing, such as a counted line that matched the level, and absent on a receipt or count line that changed no stock. Or list movements by source, as Reading the ledger shows.
Reserving stock#
POST /v1/inventory-reservations routes demand and holds stock in one atomic step. You send demands, an owner, and an inventory_routing_source, which defaults to settings.inventory.default_routing_source when you omit it; Flint picks the Locations and holds the quantity there until expires_at. If the whole request can't be met, nothing is held and the request returns 409 INVENTORY_INSUFFICIENT.
{
"demands": [
{ "inventory_item_id": "invi_1kmn0aExample", "quantity": 2 }
],
"inventory_routing_source": { "type": "fixed_location", "location_id": "loc_1kmn0aExample" },
"owner": { "key": "cart_1842" }
}
| Field | Rule |
|---|---|
demands | 1 to 100 entries, each needing only inventory_item_id and quantity. demand_key defaults to the item ID and is required on every demand when an item appears more than once. allowed_location_ids limits the demand to those Locations, forced_location_id pins it to one, and splitting_behavior: single_location keeps it at one Location. |
owner.key | Your identifier for what holds the stock, such as a cart ID, 1 to 255 characters. A key can have one active reservation; a second create returns 409 ALREADY_EXISTS with the existing one in details[0].current_resource. |
expires_at | The hold deadline: after now and at most 24 hours from now, defaulting to 15 minutes after creation. Retrying a create with the same key and body after its deadline replays the original response and never creates a new hold. |
Owners#
A reservation's owner.type says who changes it.
owner.type | Response shape | Who changes it |
|---|---|---|
merchant | {"type": "merchant", "key": "cart_1842"} | You, through PATCH and the reservation's action routes. |
order | {"type": "order", "order_id": "ord_..."} | Only the order's payment and fulfillment. supported_actions is empty, and a PATCH returns 403 FORBIDDEN with details[0].reason owner_workflow_required. order_id is absent only on a closed reservation whose order Flint can no longer identify. |
Moving reserved quantity#
Each reservation line moves quantity forward, never back. Consumed and released quantity is final.
- held moves to committed on commit
- committed moves to consumed on consume
- held moves to released on release, or expires_at passes
- committed moves to released on release
Send each step to its own route, POST /v1/inventory-reservations/{inventory_reservation_id}/{action}, with a cumulative target per line and no action in the body. The reservation's supported_actions lists the actions that can change it now:
| Action | Line target | Listed while |
|---|---|---|
commit | target_committed_quantity | A line holds quantity and expires_at hasn't passed |
consume | target_consumed_quantity | A line has committed quantity that isn't at risk |
release | target_released_from_held_quantity or target_released_from_committed_quantity | A line holds or has committed quantity |
release names the bucket it drains, so no priority rule decides for you. Each action accepts only its own targets: another action's target returns 400 INVALID_REQUEST with param set to that field, such as lines[0].target_consumed_quantity. Only consume accepts provenance. There is no release target for backordered units: a reservation you create never backorders, and a reservation Flint holds for an order takes no actions from you.
An action that isn't listed returns 409 ACTION_NOT_ALLOWED with current_status, current_version, and supported_actions in details[0]. On a closed reservation, or a commit after expires_at, the reason is terminal_status, and a closed reservation adds closed_reason.
supported_actions and expires_at depend on the clock, so a replay returns their values from the original response, and a webhook carries them as of the moment it was sent. Read the reservation again for the current values.
status on inventory reservationactiveA line still holds, has committed, or has backordered quantity.closedFinalNo line holds, has committed, or has backordered quantity.closed_reasonsays how it ended:consumed,released,expired,reallocated, ormixedwhen more than one applied.
Hold deadlines#
expires_at is a timestamp while any line holds quantity or has tentative backordered units, and null once none does: after a full commit, release, or expiry, or once payment makes the backordered units firm. Committed, firm backordered, and consumed quantity never expire. A stock hold that passes its deadline keeps that timestamp until Flint releases it. The expires_* filters match the reported deadline for reservations that still hold quantity or have tentative backordered units.
An order payment waiting for a buyer action such as 3D Secure gives the buyer 30 minutes from the start of the attempt. While the payment waits for the buyer, expires_at shows the earlier of the payment attempt's deadline and the stock hold's deadline. If Flint is still determining the outcome after the buyer's window ends, the stock stays held and expires_at can return to the stock hold's deadline.
To give a buyer more time or free stock sooner, PATCH /v1/inventory-reservations/{inventory_reservation_id} with a new expires_at, under the same 24-hour limit measured from the PATCH. You can extend or shorten the hold, but a lapsed hold can't be revived: create a new reservation. A PATCH on a closed reservation or a lapsed hold returns 409 ACTION_NOT_ALLOWED with reason terminal_status; on an active reservation with nothing held, the reason is unsupported_state.
Routing across locations#
Every request that creates tracked demand carries exactly one routing source, which decides the Locations that can serve it:
type | Send | Routes with |
|---|---|---|
fixed_location | location_id | One Location. A single-site merchant never needs a policy. |
policy | inventory_allocation_policy_id | The policy's current configuration when the request is made. |
policy_revision | inventory_allocation_policy_revision_id | One immutable revision of a policy, pinned. |
Send only the ID field that belongs to the source's type. Responses name both the policy and the revision wherever Flint can: a reservation routed by policy reports the inventory_allocation_policy_revision_id it resolved to, and a policy_revision source reports the inventory_allocation_policy_id its revision belongs to.
An allocation policy's configuration ranks up to 25 Locations into priority groups and says whether demand may be split. Creating and editing policies needs commerce.inventory.policies.write. Routing is deterministic and keeps an order together when it can:
- Eligible Locations are ordered by
group_priority, lowest first, then by location ID. - If one Location can serve the whole request, the first such Location takes all of it.
- Otherwise, with
splitting_behavior: split_when_required, Flint walks the same order and takes what each Location can serve, using at mostmaximum_locations_per_assignmentLocations. That limit defaults to 10;single_locationalways uses 1 and fails instead of splitting.
Demand constraints only narrow routing, never widen it: a demand marked single_location, or a line that must ship whole, stays whole even under split_when_required. INVENTORY_INSUFFICIENT can include details[0].reason location_ineligible or location_limit.
A tracked variant order line currently needs its full quantity at one eligible Location, including checkout and payment. A delivery profile's quantity_split_allowed does not remove this limit. Consolidate enough stock at one Location before ordering. This refusal can omit details[0].reason; do not infer from available_quantity that an order line can combine stock across Locations. Merchant reservation demands can still split when their own splitting_behavior permits it.
A policy that is inactive or archived can't route new demand, whether the source names the policy or one of its revisions. It returns 409 ACTION_NOT_ALLOWED with reason unsupported_state and the policy's status in details[0].current_status. Location rules covers which Locations can take part.
Policy revisions#
Each configuration is an immutable revision with its own ID. Creating a policy publishes the first one, and every PATCH that replaces configuration publishes another, even when the new configuration matches the old. Editing only name, metadata, external_reference_id, or status keeps the current revision. current_inventory_allocation_policy_revision_id names the revision that new policy routing resolves to.
Changing a policy affects only future routing. Reservations and quotes keep the revision they pinned, so editing a policy never reroutes stock that is already claimed.
Policy version | Revision ID | |
|---|---|---|
| Changes | On every policy edit | Never; a new configuration gets a new ID |
| Use it to | Fence an edit with expected_version | Pin routing with a policy_revision source, or audit what routed a claim |
The revision routes need commerce.inventory.read and work for a policy in any status, including archived. A revision that doesn't exist or belongs to another policy returns 404 RESOURCE_NOT_FOUND with param inventory_allocation_policy_revision_id. A routing source that names a missing revision returns the same code with param inventory_routing_source.inventory_allocation_policy_revision_id.
When stock is promised but missing#
A sale, loss, condition change, or correction recorded as an adjustment, or an applied count, can leave more claims than sellable stock. Flint records the physical change rather than refusing it, protects claims in a fixed order, committed before held and oldest first, and reports the rest:
- The level's
shortage_quantityshows the claims its sellable stock no longer covers, and Flint sendsinventory_level.shortage_detected. - The affected reservation lines report
at_risk_held_quantityandat_risk_committed_quantity, and Flint sendsinventory_reservation.at_risk. List them withGET /v1/inventory-reservations?has_at_risk_quantity=true.
A consume or fulfillment handoff that runs into at-risk quantity, or a commit that would leave committed quantity at risk, fails with 409 ACTION_NOT_ALLOWED and reason stock_at_risk. Each detail names an affected inventory_reservation_line_id. The error has remediation.retry: "none" and error_source: "merchant".
The refusal changes no quantities. Flint then records inventory_action_required with reason inventory_shortage separately, naming the affected lines in inventory_reservation_line_ids. A retry with the same Idempotency-Key returns the same refusal. Replenish, reallocate, or release the affected stock before sending a new request with a new key. Flint sends inventory_reservation.action_required whenever it sets that field:
inventory_action_required.reason | Meaning |
|---|---|
inventory_shortage | Physical stock no longer covers the claim. |
hold_expired | An order's hold deadline passed while it still needs the stock. |
payment_pending | The payment outcome isn't known yet. |
other | Anything else. Treat a reason you don't recognize like other. |
A payment won't start against an at-risk hold either, so Flint never takes money for stock it can't supply. Replenish with an adjustment, or release the affected claim, before you retry.
Operations#
Counts and transfers are stock operations with more than one step and their own status. Safety stock is a single PATCH.
Safety stock#
PATCH /v1/inventory-levels/{inventory_level_id} sets safety_stock_quantity as an absolute value and writes a safety_stock_change movement. Find the level with GET /v1/inventory-levels?inventory_item_id=invi_...&location_id=loc_.... A level's version moves on every hold and commit, so if you send expected_version, read the level right before you write.
Counts#
A count compares the shelf with what Flint expects, then applies every difference in one step.
- 1
Open the count#
POST /v1/inventory-countswith alocation_idand theinventory_item_idsto count. While the count is a draft, each line shows theexpected_*_quantityvalues Flint holds for that item there right now. - 2
Read each level, then count#
Read each draft count line's live
physical_versionalongside its expected quantities before you count that item's shelf. The version is0when no level exists andnullafter the count is applied or canceled. Creating a count captures no fence.captured_physical_versionisnulluntil an observation is saved for the line; saving captures the submittedexpected_physical_version, including zero. - 3
Save the observations#
PATCH /v1/inventory-counts/{inventory_count_id}with the count's currentexpected_versionand the complete observation set: every item exactly once, each withcounted_on_hand_quantityand thephysical_versionyou read asexpected_physical_version. Leave out a condition quantity you didn't count, and Flint keeps the expected one; send0only when you counted none. - 4
Apply or cancel#
POST /v1/inventory-counts/{inventory_count_id}/applysets the levels to the counted quantities.POST /v1/inventory-counts/{inventory_count_id}/cancelcloses the count without changing stock.
status on inventory countdraftOpen for observations.supported_actionslistscancel, andapplyonce every line has an observation.appliedFinalThe differences becamecount_appliedmovements. Each line reportson_hand_variance,quality_control_variance,damaged_variance, andquarantined_varianceinstead of the expected quantities.canceledFinalClosed without changing stock. Lines report neither expected quantities nor variances.
A count stays usable while stock sells. Holds and commitments don't move physical_version, so they never make a count stale. A sale, receipt, correction, or condition change at a counted level does, and then you count that item again. To recount, send the complete set again: unchanged lines with their saved quantities and captured_physical_version, and recounted lines with the physical_version you read before counting them, even when the number is the same. Reading a newer physical_version without counting again doesn't make an old observation current.
| Problem | Response |
|---|---|
| An observation's fence is stale when you save | 409 VERSION_CONFLICT with param observations[i].expected_physical_version. Nothing is saved. |
| A saved observation went stale before you apply | 409 VERSION_CONFLICT with no param. Nothing is applied, and the count stays a draft. |
A stale count expected_version | 409 VERSION_CONFLICT with param expected_version and details[0].resource_type inventory_count. |
apply before every line has an observation | 409 ACTION_NOT_ALLOWED with reason status_not_reached. |
| Any action on an applied or canceled count | 409 ACTION_NOT_ALLOWED with reason terminal_status. |
A stale-fence conflict has one details entry per stale line, with resource_type inventory_level, resource_id, inventory_count_line_id, inventory_item_id, location_id, the captured_physical_version you sent, and current_physical_version. Count those items again, save the complete set, and apply with a new Idempotency-Key. If items keep selling and going stale, count fewer at a time or pause physical movement for them while you count.
Transfers#
A transfer moves stock from origin_location_id to destination_location_id. Creating one makes a draft and moves no stock. Each line names an inventory_item_id, a condition (sellable when omitted), and a requested_quantity, with at most one line per item and condition.
Stock moves through one route per action, POST /v1/inventory-transfers/{inventory_transfer_id}/{action}, with underscores written as hyphens (return_to_origin is /return-to-origin). Call an action from the transfer's supported_actions and send a cumulative target per line:
| Action | Line target | Effect | Listed while |
|---|---|---|---|
depart | target_departed_quantity | Takes stock off the origin and adds it to the destination's incoming_quantity | A line has quantity not yet departed or canceled |
receive | target_received_quantity | Puts in-transit stock on hand at the destination | A line has quantity in transit |
return_to_origin | target_returned_quantity | Puts in-transit stock back on hand at the origin | A line has quantity in transit |
report_loss | target_lost_quantity | Records in-transit stock as lost | A line has quantity in transit |
cancel | target_canceled_quantity | Cancels quantity that hasn't departed | A line has quantity not yet departed or canceled |
receive takes either all four of target_received_sellable_quantity, target_received_quality_control_quantity, target_received_damaged_quantity, and target_received_quarantined_quantity, summing to target_received_quantity, or none of them. With none, the newly received quantity lands in the line's condition. A mismatched sum returns 400 INVALID_REQUEST with detail INVALID_VALUE at lines[i].target_received_quantity.
An action that isn't listed returns 409 ACTION_NOT_ALLOWED with reason unsupported_state and current_status, current_version, and supported_actions in details[0].
- draft moves to in_transit on depart
- draft moves to closed on cancel everything
- in_transit moves to partially_resolved on receive, return, or report loss
- in_transit moves to closed on resolve everything
- partially_resolved moves to closed on resolve the rest
status on inventory transferdraftNothing has departed yet.in_transitSome stock has departed, and none has been received, returned, or lost yet.partially_resolvedSome departed stock has been received, returned, or lost, and quantity is still in transit or not yet departed.closedFinalEvery requested unit was departed and resolved, or canceled.closed_reasonisreceived,canceled,received_with_cancellation,returned,lost, ormixed.
Editing lines#
Until a transfer closes, PATCH /v1/inventory-transfers/{inventory_transfer_id} edits it. Without lines, a PATCH changes only note and external_reference_id: an omitted field stays as it is, null clears it, and an empty string is rejected.
lines is an owned collection, so a PATCH that includes it replaces every line and requires expected_version. Read the transfer, change its lines, and send the complete array back:
- To keep or change a line, send its
inventory_transfer_line_id,inventory_item_id, storedcondition, and therequested_quantityyou want. A line's item and condition can't change; to move quantity to another item or condition, leave the old line out and add a new one. - To add a line, send it without an
inventory_transfer_line_id. - To remove a line, leave it out. A line with departed or canceled quantity is part of the transfer's history and must stay.
Flint checks the whole array, then saves every change or none.
| Problem | Response |
|---|---|
| A line with departed or canceled quantity left out | 409 ACTION_NOT_ALLOWED with reason field_locked and param lines, with one details entry per omitted line (resource_type inventory_transfer_line) |
A departed line's requested_quantity changed | 409 ACTION_NOT_ALLOWED with reason field_locked at that indexed field |
requested_quantity below the canceled quantity | 409 LIMIT_EXCEEDED at that indexed field, with minimum_quantity in the detail |
A line's inventory_item_id or condition changed | 400 INVALID_REQUEST with detail NOT_ALLOWED at that indexed field |
A repeated line ID or item and condition, an empty array, more than 100 lines, or no expected_version | 400 INVALID_REQUEST |
An inventory_transfer_line_id that isn't on this transfer | 404 RESOURCE_NOT_FOUND at lines[i].inventory_transfer_line_id |
| A closed transfer | 409 ACTION_NOT_ALLOWED |
Retries and concurrency#
Idempotency keys#
| Routes | Idempotency-Key |
|---|---|
POST /v1/inventory-adjustments, POST /v1/inventory-receipts, POST /v1/inventory-reservations | Required, because each run moves stock again. A request without the header returns 400 INVALID_REQUEST with details[0].param Idempotency-Key. |
| Every other inventory write | Optional. Lifecycle actions send cumulative targets and PATCH routes send absolute values, so a retry without a key can't move stock twice. A create without a key, such as a draft transfer or count, makes a new record each time it runs. |
Send the same key with the same body to replay the original response; the same key with a different body is a conflict. If a retry doesn't settle the outcome, list by key, such as GET /v1/inventory-adjustments?idempotency_key={key}. Adjustments, receipts, reservations, transfers, counts, and movements accept the filter, and an empty list doesn't prove the command had no effect. See Recovery reads.
A resource's idempotency_key is the key of the request that created it, and a movement's is the key of the command that wrote it. The field is null when that request had no key, and an action never changes it. A result doesn't repeat the key; it's in the Idempotency-Key response header.
Versions#
Send expected_version to make a write fail if the resource changed after you read it. A stale value returns 409 VERSION_CONFLICT with param expected_version. It is optional on item, level, policy, transfer, and reservation PATCH requests and on every lifecycle action, and enforced whenever sent. Three writes require it, because they replace a whole collection:
- A count PATCH, which replaces the observation set.
- A policy PATCH that replaces
configuration. - A transfer PATCH that replaces
lines.
A level has three counters, each advancing on its own:
| Counter | Advances when | Use it for |
|---|---|---|
version | Any quantity or claim changes, including each hold, commit, and release | expected_version on the level PATCH |
physical_version | On-hand or a condition quantity changes | expected_physical_version on counted and correction adjustment lines and on count observations |
claim_version | Held, committed, or backordered quantity changes | Telling claim changes apart from physical ones |
expected_physical_version protects a read-then-set edit on a level that is selling, because holds and commitments don't move it. A level that doesn't exist yet reads as 0. A stale value returns 409 VERSION_CONFLICT with param naming the line's field and current_physical_version in details. Without the fence, an absolute value replaces whatever is there when it commits.
Other inventory resources start at version 1. A level that a no-change counted adjustment creates starts with all three counters at 0. Every inventory version is an unsigned 64-bit integer, and level counters stay below 2^63.
Contention#
When other writes keep changing the same stock while Flint applies a command, Flint retries internally. If the retries run out, the request returns 409 CONCURRENT_MODIFICATION and changes nothing: send the same request again with the same Idempotency-Key. VERSION_CONFLICT is different: it reports a stale assertion, named in param, or a persistence race, with no param. Re-read, then rebuild the request with a new Idempotency-Key.
Location rules#
A command that names a resource that doesn't exist returns 404 RESOURCE_NOT_FOUND with the field in param, such as lines[0].inventory_item_id or origin_location_id, and the ID in details[0].resource_id. A Location that exists but can't take part returns 409 ACTION_NOT_ALLOWED:
| Command | inactive Location | archived Location | active, with inventory_allocation_enabled: false |
|---|---|---|---|
| Physical: adjustments, counts, transfers, receipts, safety stock | Accepted | unsupported_state | Accepted |
Routing: reservations, allocation policies, fixed_location sources | unsupported_state | unsupported_state | configuration_required |
Setting a Location's inventory_allocation_enabled needs commerce.inventory.allocation.write alongside merchants.locations.write. A key with commerce.inventory.write alone can move stock but can't change whether a Location's stock is routed to orders and pickup. See Inventory allocation.
Reading the ledger#
A movement says what changed in type, which record caused it in source_reference, and who recorded it in created_by. source_reference is always present and names a resource you can read with its own GET route.
Movement type | source_reference.resource_type | resource_id |
|---|---|---|
adjustment | inventory_adjustment | The adjustment |
count_applied | inventory_count | The count |
return_received | inventory_receipt | The receipt, not one of its lines |
transfer_departed, transfer_received, transfer_returned, transfer_lost | inventory_transfer | The transfer |
safety_stock_change | inventory_level | The level |
reservation_held, reservation_committed, reservation_consumed, reservation_hold_released, reservation_commitment_released, reservation_expired, reservation_reallocated_in, reservation_reallocated_out | inventory_reservation | The reservation whose claim changed |
reservation_consumed and reservation_commitment_released, when a fulfillment handed off or canceled the goods | fulfillment | The fulfillment |
source_reference tells a merchant's consume apart from a fulfillment's handoff, since both write reservation_consumed. A reallocation writes two movements: reservation_reallocated_out names the reservation that lost the claim, and reservation_reallocated_in names the replacement. Movements don't point at a reservation line; match the movement's inventory_item_id and location_id against the reservation's lines.
To list what one resource produced, send source_reference_type and source_reference_id together, and add idempotency_key to keep only one command's movements:
curl -G https://api.withflintpay.com/v1/inventory-movements \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "source_reference_type=inventory_transfer" \
--data-urlencode "source_reference_id=invtr_1kmn0aExample"
The filter accepts the resource_type values above and returns 400 INVALID_REQUEST for any other, including inventory_reservation_line. reason appears only on adjustment movements, where it repeats the adjustment's reason, and the reason filter returns adjustment movements only.
created_by is the credential that made the request:
| Who made the request | created_by |
|---|---|
| An API key | {"resource_type": "api_key", "resource_id": "key_..."} |
| A partner app install | {"resource_type": "partner_app_install", "resource_id": "pinst_..."} |
| A signed-in user, such as in the Dashboard | {"resource_type": "user", "resource_id": "usr_..."} |
| Flint on its own: expired holds, order, payment, and fulfillment automation, and Return dispositions | null |
An API key is recorded as the key, not as the user who created it, so you can tell which integration made a change.
Provenance#
Commands that record a physical event accept occurred_at, source_system, and external_actor_id: adjustments, receipts, count observations, and the provenance object on reservation consume and transfer actions. occurred_at is when the stock moved, not when your system told Flint, so a feed that batches overnight still records when each change happened. Movements, adjustments, and receipts return the same fields.
| Field | Rule |
|---|---|
source_system.type | manual, pos, wms, erp, or other. Events Flint records itself return flint, which requests can't send. |
source_system.external_source_id | Required for pos, wms, erp, and other; not allowed for manual. At most 255 Unicode code points. |
occurred_at | Required for pos, wms, erp, and other. At most 5 minutes in the future. An action without provenance records the time Flint received the command. |
external_actor_id | Optional. At most 255 Unicode code points. |
Flint doesn't inspect external_source_id or external_actor_id, so picker@dc-3 and secret-garden-pos are both valid. Don't put secrets in either field.
A broken rule returns 400 INVALID_REQUEST with the field in param, prefixed with provenance. inside a provenance object. details[0].code is REQUIRED for a missing external_source_id or occurred_at; INVALID_VALUE for a value over 255 code points, an occurred_at too far ahead, or a source_system.type a request can't send; and NOT_ALLOWED for an external_source_id sent with manual, listing both fields in conflicting_fields. Returns apply the same limits under their own names: source_system.source_system_type, received_at on receipts, and inspected_at on inspections.
Webhooks#
Inventory events fire for every qualifying change, including the ones your own requests cause, and carry the level, reservation, count, transfer, or receipt named in the event type:
- inventory_
level. updated A level'sversionadvanced: its stock, claims, or safety stock changed. A change that raisesshortage_quantitysendsinventory_level.shortage_detectedinstead. - inventory_
level. shortage_ detected A level'sshortage_quantityrose, so its sellable stock no longer covers its claims. It carries the level's new quantities. - inventory_
reservation. created A reservation was created and holds stock at the Locations it was routed to. - inventory_
reservation. committed Held quantity became committed. - inventory_
reservation. consumed Committed quantity was consumed, by aconsumeor a fulfillment handoff. - inventory_
reservation. released Held or committed quantity was released, including when a hold expires. - inventory_
reservation. hold_ expired A merchant-owned hold passed itsexpires_at. - inventory_
reservation. closed No line holds, has committed, or has backordered quantity any more. - inventory_
reservation. at_ risk A held or committed claim lost the stock that covered it. - inventory_
reservation. action_ required Flint setinventory_action_requiredon the reservation. - inventory_
reservation. updated A reservation you created changed without one of the events above, such as a newexpires_ator a clearedinventory_action_required. - inventory_
count. applied A count was applied and its variances became movements. - inventory_
count. updated A draft count's observations changed. Creating or canceling a count sends no event. - inventory_
receipt. created Returned units were received, from a Return disposition or a receipt you created. - inventory_
transfer. departed Stock left the transfer's origin. Each departure sends one, including later ones while the transfer is in transit. - inventory_
transfer. received In-transit stock arrived at the destination. - inventory_
transfer. returned In-transit stock went back to the origin. - inventory_
transfer. lost In-transit stock was recorded as lost. - inventory_
transfer. closed The transfer closed, with itsclosed_reason. - inventory_
transfer. updated A transfer changed without a movement or closing: a PATCH changed itsnote,external_reference_id, or lines, or acancelleft it open. Creating a transfer sends no event.
One change can send several events. A merchant-owned hold that expires sends inventory_reservation.released and inventory_reservation.hold_expired, plus inventory_reservation.closed when nothing is left, and inventory_transfer.closed can arrive with the event for the step that closed it. Their order doesn't matter: keep the snapshot with the highest version. The order's own order.inventory_exception_created and order.inventory_exception_resolved events cover paid orders whose stock can't be committed, and the webhook events catalog has every payload.
Errors#
Shortage details#
A durable payment attempt that loses a race for stock returns 200 with status: "failed" and status_reason: "inventory_unavailable", without per-line shortage quantities. Read the attempt status, then refresh the quote or inventory levels for current availability. The same Idempotency-Key replays that failed result; correct the cart or stock and use a new key for a new attempt. See Payment outcomes.
For pay refused before an attempt exists, quote, checkout, and reservation create, 409 INVENTORY_INSUFFICIENT includes one details item per short demand, ordered by request position, then demand_key. Each detail carries:
| Fact | Meaning |
|---|---|
demand_key | An opaque key for the demand. Don't parse it to find a line or item. |
inventory_item_id | The item whose stock is short. Omitted for buyer credentials. |
requested_quantity | The quantity the demand needs. |
available_quantity | The quantity eligible stock can supply. |
shortage_quantity | The part of the requested quantity eligible stock can't supply. |
order_id | The order that owns order_line_item_id. |
order_line_item_id | The order line, when the demand belongs to one. |
bundle_component_id | The bundle component, when the demand belongs to one. |
inventory_reservation_line_id | The reservation line, when the shortage concerns an existing line. |
The details don't include variant_id or bundle_id; read the order line's catalog reference when you need it. Buyer credentials receive the same facts except inventory_item_id.
param appears only when the short input is in the current request: demands[i].quantity on reservation create. Pay and quote omit it. The top-level error fields mirror details[0]. A routing constraint can also set details[0].reason to location_ineligible or location_limit.
- StatusHTTP 409What to doStock can't cover the demand, or a command would take a quantity below zero.
details[0].reasonlocation_ineligibleorlocation_limitnames a routing constraint. Replenish, release a claim, widen the routing, or reduce the quantity. - StatusHTTP 409What to doThe resource's state or setup refuses the request. Branch on
details[0].reason:configuration_required(set a routing source, or turn oninventory_allocation_enabled),stock_at_risk(replenish, reallocate, or release the named reservation lines),terminal_status(the reservation or count is closed, or the hold lapsed),status_not_reached(observe every count line first),unsupported_state(choose fromsupported_actions, or the Location or policy status refuses it), orfield_locked(a transfer line with history can't change). - StatusHTTP 409What to doAn
expected_version,expected_physical_version, orsource_observation_sequenceis stale, named inparam, or a persistence race happened, with noparam. Re-read, then rebuild the request with a newIdempotency-Key. For a stale sequence, drop the observation. - StatusHTTP 409What to doOther writes kept changing the same stock and nothing changed. Send the same request again with the same
Idempotency-Key. - StatusHTTP 409CodeALREADY_
EXISTS What to doTheowner.keyalready has an active reservation, named indetails[0].current_resource. - StatusHTTP 409CodeLIMIT_
EXCEEDED What to doA quantity is outside what the resource allows, such as a transfer line below its canceled quantity.paramnames the field, withavailable_quantityorminimum_quantityin the detail. - StatusHTTP 409CodeRESOURCE_
IN_ USE What to doAn item or policy still has stock, claims, or open records, so it can't becomeinactiveorarchived. - StatusHTTP 403CodeFORBIDDENWhat to doThe reservation belongs to an order, with
details[0].reasonowner_workflow_required. Only the order's payment and fulfillment change it. - StatusHTTP 400CodeINVALID_
REQUEST What to doThe request is malformed, such as a missingIdempotency-Keyon a stock command, another action's target, or a broken provenance rule.paramnames the field, anddetails[0].codesays what's wrong.
Related docs#
Track inventoryStock an item, sell it through an order, hold it for your own cart, and sync counts from a WMS or POS.Inventory eventsEvery level, reservation, count, receipt, and transfer event, and the values enabled_events accepts.Fulfill and ship ordersWhen a fulfillment consumes committed stock, and how canceling one releases it.Pagination, filters, and sortingPage tokens, multi-value filters, and expand=inventory_item on level and movement reads.The Inventory item object#
A stock-keeping unit that inventory quantities are tracked against. Catalog variants reference an inventory item rather than carrying their own counter.
Returned by GET /v1/inventory-items/{inventory_item_id} and carried by the endpoints below.
Attributes
backorderobjectRequiredBackorder settings shared by every variant using this inventory item.
barcodestringOptional searchable barcode.
created_atstringRequiredTime the inventory item was created.
external_reference_idstringCaller-owned identifier for this resource in an external system.
inventory_item_idstringRequiredStable inventory item ID.
metadatamap of stringRequiredCaller-owned metadata.
namestringRequiredMerchant-facing inventory item name.
skustringOptional searchable stock-keeping unit.
statusenumRequiredCurrent inventory item lifecycle status.
activeinactivearchived
updated_atstringRequiredTime the inventory item last changed.
versionintegerRequiredOptimistic-concurrency version for item writes.
{
"backorder": {
"enabled": false,
"expected_ship_date": null,
"limit_quantity": null
},
"barcode": "0781234567890",
"created_at": "2026-05-02T11:04:00Z",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"supplier": "northwind"
},
"name": "Ceramic mug, 12oz",
"sku": "mug-12-white",
"status": "active",
"updated_at": "2026-07-14T09:12:00Z",
"version": 3
}The Inventory adjustment object#
A recorded stock change with its reason and the quantity changes Flint computed.
Returned by GET /v1/inventory-adjustments/{inventory_adjustment_id} and carried by the endpoints below.
Attributes
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
inventory_adjustment_idstringRequiredUnique identifier for this inventory adjustment, prefixed `invadj_`.
linesarray of objectRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringRequiredRFC3339 timestamp.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
receivedreturnedsoldtheftlosscondition_changedcountedcorrection
source_systemobject or nullRequiredSystem the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.
{
"created_at": "2026-07-21T14:18:04Z",
"external_actor_id": "receiver_204",
"idempotency_key": "adjust-1",
"inventory_adjustment_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"damaged_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity_delta": 10,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0
}
],
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"reason": "received",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
}The Inventory allocation policy object#
Named, version-fenced rules that decide which Locations serve demand and in what order.
Returned by GET /v1/inventory-allocation-policies/{inventory_allocation_policy_id} and carried by the endpoints below.
Attributes
configurationobjectRequiredRouting rules: ranked groups of Locations, whether demand can be split, and the most Locations one assignment may use.
created_atstringRequiredRFC3339 timestamp.
current_inventory_allocation_policy_revision_idstringRequiredThe immutable revision containing this policy's current routing configuration. Replacing configuration publishes a new revision; other policy edits keep this ID.
external_reference_idstringCaller-owned identifier for this resource in an external system.
inventory_allocation_policy_idstringRequiredID of the policy this revision belongs to.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredMerchant-facing policy name.
statusenumRequiredCurrent allocation policy status.
activeinactivearchived
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
{
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
},
{
"group_priority": 2,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN"
}
],
"maximum_locations_per_assignment": 3,
"splitting_behavior": "split_when_required",
"within_group_order": "location_id_ascending"
},
"created_at": "2026-06-01T10:00:00Z",
"current_inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {},
"name": "US retail routing",
"status": "active",
"updated_at": "2026-06-01T10:00:00Z",
"version": 2
}The Inventory count object#
A physical count used to reconcile stock.
Returned by GET /v1/inventory-counts/{inventory_count_id} and carried by the endpoints below.
Attributes
applied_atstringRFC3339 timestamp.
created_atstringRequiredRFC3339 timestamp.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
inventory_count_idstringRequiredUnique identifier for this inventory count, prefixed `invc_`.
linesarray of objectRequiredCount lines, one for each inventory item being counted.
location_idstringRequiredID of the Location whose stock is counted.
observation_provenanceobjectSource system, actor, and time reported with the count's observations.
statusenumRequiredWhether the count is still open. Applying or canceling a `draft` count ends it.
draftappliedcanceled
supported_actionsarray of enumRequiredActions that can change this count now. A draft can be canceled, and applied once every line has an observation. Empty after the count is applied or canceled.
applycancel
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
{
"created_at": "2026-07-21T14:00:00Z",
"idempotency_key": "count-1",
"inventory_count_id": "invc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"captured_physical_version": 9,
"counted_damaged_quantity": 2,
"counted_on_hand_quantity": 47,
"counted_quality_control_quantity": 1,
"counted_quarantined_quantity": 0,
"expected_damaged_quantity": 2,
"expected_on_hand_quantity": 48,
"expected_quality_control_quantity": 0,
"expected_quarantined_quantity": 0,
"inventory_count_line_id": "invcln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"physical_version": 9,
"source_observation_sequence": 1842
}
],
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"observation_provenance": {
"external_actor_id": "counter_204",
"occurred_at": "2026-07-21T14:16:00Z",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
},
"status": "draft",
"supported_actions": [
"apply",
"cancel"
],
"updated_at": "2026-07-21T14:16:04Z",
"version": 2
}The Inventory level object#
The quantity state of one inventory item at one Location.
Returned by GET /v1/inventory-levels/{inventory_level_id} and carried by the endpoints below.
Attributes
available_quantityintegerRequiredDerived and never written: on_hand minus unavailable, held, committed, and safety stock, never below 0. See shortage_quantity for the excess. Whole-number quantity; fractional quantities are not supported.
backordered_quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
claim_versionintegerRequiredAdvances only when held, committed, or backordered quantities change.
committed_quantityintegerRequiredUnits promised to accepted orders. Still physically present until fulfillment consumes them. Whole-number quantity; fractional quantities are not supported.
created_atstringRequiredRFC3339 timestamp.
damaged_quantityintegerRequiredOn-hand units known to be damaged. Not sellable. Whole-number quantity; fractional quantities are not supported.
held_quantityintegerRequiredUnits claimed by an open reservation that has not been committed. Whole-number quantity; fractional quantities are not supported.
incoming_quantityintegerRequiredUnits recorded as inbound but not yet on hand. Does not count toward availability. Whole-number quantity; fractional quantities are not supported.
inventory_itemobjectThe inventory item this level belongs to. Present only when the list request asked for expand=inventory_item.
inventory_item_idstringRequiredID of the inventory item the stock is for.
inventory_level_idstringRequiredUnique identifier for this inventory level, prefixed `invl_`.
location_idstringRequiredID of the Location that holds the stock.
on_hand_quantityintegerRequiredUnits physically present at the Location, in any condition. Whole-number quantity; fractional quantities are not supported.
physical_versionintegerRequiredAdvances only when on-hand or condition quantities change.
quality_control_quantityintegerRequiredOn-hand units awaiting inspection. Not sellable. Whole-number quantity; fractional quantities are not supported.
quarantined_quantityintegerRequiredOn-hand units isolated for review. Not sellable. Whole-number quantity; fractional quantities are not supported.
safety_stock_quantityintegerRequiredBuffer withheld from allocation. Change it with PATCH /v1/inventory-levels/{inventory_level_id}. Whole-number quantity; fractional quantities are not supported.
shortage_quantityintegerRequiredDerived: claims exceeding sellable physical stock. Positive only after stock is lost, damaged, or corrected down. Whole-number quantity; fractional quantities are not supported.
unavailable_on_hand_quantityintegerRequiredDerived: quality_control + damaged + quarantined. Whole-number quantity; fractional quantities are not supported.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredChanges on every quantity or claim change at this level, including holds and commits. Read it immediately before a PATCH. A level that a counted adjustment creates without a quantity change starts at version 0.
{
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
}The Inventory movement object#
An immutable record of a single quantity change, including the level state it produced.
Returned by GET /v1/inventory-movements/{inventory_movement_id} and carried by the endpoints below.
Attributes
backordered_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
committed_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
created_atstringRequiredRFC3339 timestamp.
created_byobject or nullRequiredThe credential that recorded this movement. `null` when Flint recorded it on its own, such as an expired hold or a fulfillment handoff.
damaged_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
held_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
incoming_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
inventory_itemobjectThe inventory item this movement is about. Present only when the list request asked for expand=inventory_item.
inventory_item_idstringRequiredID of the inventory item the stock is for.
inventory_level_claim_versionintegerRequiredClaim version of the inventory level after this movement. Advances when held or committed quantities change.
inventory_level_idstringRequiredID of the inventory level this movement changed.
inventory_level_physical_versionintegerRequiredPhysical version of the inventory level after this movement. Advances when on-hand or condition quantities change.
inventory_level_versionintegerRequiredVersion of the inventory level after this movement.
inventory_movement_idstringRequiredUnique identifier for this inventory movement, prefixed `invm_`.
location_idstringRequiredID of the Location that holds the stock.
notestringNote recorded with the command that wrote this movement. Absent when it had none.
occurred_atstringRequiredRFC3339 timestamp.
on_hand_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
quality_control_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
quarantined_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
reasonenumThe adjustment's reason. Present only on adjustment movements; other movement types already describe what happened.
receivedreturnedsoldtheftlosscondition_changedcountedcorrection
resulting_inventory_levelobjectRequiredThe inventory level as it stood after this movement.
return_disposition_idstringID of the Return disposition whose receipt wrote this movement. Absent on other movements.
return_idstringID of the Return whose receipt wrote this movement. Absent on other movements.
safety_stock_quantity_deltaintegerRequiredWhole-number quantity; fractional quantities are not supported.
source_observation_sequenceintegerSequence of the observation in your source system that wrote this movement. Absent when no sequence was sent.
source_referenceobjectRequiredThe GET-able resource whose write recorded this movement.
source_systemobject or nullRequiredSystem the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.
typeenumRequiredWhat caused this movement.
adjustmentcount_appliedreservation_consumedreservation_committedreservation_commitment_releasedreservation_expiredreservation_heldreservation_hold_releasedreservation_reallocated_inreservation_reallocated_outreturn_receivedsafety_stock_changetransfer_departedtransfer_receivedtransfer_returnedtransfer_lost
{
"backordered_quantity_delta": 0,
"committed_quantity_delta": 0,
"created_at": "2026-07-21T14:18:04Z",
"created_by": {
"resource_id": "usr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "user"
},
"damaged_quantity_delta": 0,
"external_actor_id": "receiver_204",
"held_quantity_delta": 0,
"idempotency_key": "adjust-1",
"incoming_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_claim_version": 7,
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_physical_version": 9,
"inventory_level_version": 18,
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"on_hand_quantity_delta": 25,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0,
"reason": "received",
"resulting_inventory_level": {
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
},
"safety_stock_quantity_delta": 0,
"source_reference": {
"resource_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "inventory_adjustment"
},
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
},
"type": "adjustment"
}The Inventory receipt object#
Returned units received into Inventory, from a Return disposition or against the reservation line that consumed them. For supplier deliveries, use POST /v1/inventory-adjustments with reason: received.
Returned by GET /v1/inventory-receipts/{inventory_receipt_id} and carried by the endpoints below.
Attributes
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
inventory_receipt_idstringRequiredUnique identifier for this inventory receipt, prefixed `invrec_`.
linesarray of objectRequiredReceived lines, each with the item, receiving Location, quantity, and disposition.
occurred_atstringRequiredRFC3339 timestamp.
return_disposition_idstringID of the Return disposition this receipt records. Absent when the receipt isn't linked to a Return.
return_idstringID of the Return these units came back on. Absent when the receipt isn't linked to a Return.
source_systemobject or nullRequiredSystem the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.
{
"created_at": "2026-07-21T14:18:04Z",
"idempotency_key": "return-1",
"inventory_receipt_id": "invrec_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"disposition": "sellable",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_receipt_line_id": "invrecln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"quantity": 1,
"receiving_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_line_item_id": "retli_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"occurred_at": "2026-07-21T14:18:00Z",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"source_system": {
"type": "flint"
}
}The Inventory reservation object#
A claim on stock. Quantity moves from held to committed to consumed, and can be released or reallocated.
Returned by GET /v1/inventory-reservations/{inventory_reservation_id} and carried by the endpoints below.
Attributes
closed_reasonenum or nullHow the reservation ended. adopted when its remaining held stock moved to a delivery selection. mixed when more than one terminal outcome applied. `null` when the reservation isn't closed.
consumedreleasedexpiredreallocatedadoptedmixednull
created_atstringRequiredRFC3339 timestamp.
expires_atstring or nullRequiredDeadline for held or unconfirmed backordered quantity. While an order payment waits for a buyer action, this is the earlier of the stock hold deadline and the payment attempt deadline. Flint can keep stock held while the payment outcome is uncertain. `null` when no line holds quantity or has unconfirmed backordered quantity.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
inventory_action_requiredobjectPresent when the claim needs a merchant action before commerce can continue.
inventory_reservation_idstringRequiredUnique identifier for this inventory reservation, prefixed `invr_`.
inventory_routing_sourceobjectRequiredHow Flint chooses the Locations that serve the reservation: one fixed Location, an allocation policy, or a specific policy revision.
linesarray of objectRequiredAllocations of the reserved stock, one for each item and Location.
ownerone ofRequiredWho holds the reservation: a `key` you choose, or an order Flint holds the stock for.
replacement_inventory_reservation_idstringSet on a reservation whose claim Flint moved when it rerouted an order: the replacement reservation that now holds the quantity named in this reservation's reallocated_quantity.
source_inventory_reservation_idstringSet on a replacement reservation: the reservation whose claim Flint moved here when it rerouted an order. This reservation holds the quantity that reservation reports as reallocated_quantity.
statusenumRequiredactive while any held, committed, or backordered quantity remains; closed once none does.
activeclosed
supported_actionsarray of enumRequiredActions that can change this reservation now. Empty for a closed reservation and for one Flint holds for an order. Resending targets already applied succeeds in any status. Computed when Flint produced this response or event, so replays and webhooks keep their original value.
commitconsumerelease
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredThe reservation version. Send it as expected_version to reject a write if the reservation changed.
{
"created_at": "2026-07-21T14:18:00Z",
"expires_at": "2026-07-21T14:33:00Z",
"idempotency_key": "cart-1842-hold",
"inventory_reservation_id": "invr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_routing_source": {
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"type": "policy_revision"
},
"lines": [
{
"allocated_quantity": 3,
"at_risk_committed_quantity": 0,
"at_risk_held_quantity": 0,
"backordered_quantity": 0,
"committed_quantity": 2,
"consumed_quantity": 0,
"demand_key": "cart_line_1",
"held_quantity": 1,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"reallocated_quantity": 0,
"released_from_backordered_quantity": 0,
"released_from_committed_quantity": 0,
"released_from_held_quantity": 0
}
],
"owner": {
"key": "cart_1842",
"type": "merchant"
},
"status": "active",
"supported_actions": [
"commit",
"consume",
"release"
],
"updated_at": "2026-07-21T14:21:00Z",
"version": 4
}The Inventory transfer object#
Stock moving between locations.
Returned by GET /v1/inventory-transfers/{inventory_transfer_id} and carried by the endpoints below.
Attributes
closed_atstringRFC3339 timestamp.
closed_reasonenum or nullHow the transfer ended. `null` when the transfer isn't closed.
receivedcanceledreceived_with_cancellationreturnedlostmixednull
created_atstringRequiredRFC3339 timestamp.
departed_atstringRFC3339 timestamp.
destination_location_idstringRequiredID of the Location the stock goes to.
external_reference_idstringCaller-owned identifier for this resource in an external system.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
inventory_transfer_idstringRequiredUnique identifier for this inventory transfer, prefixed `invtr_`.
linesarray of objectRequiredOwned collection of transfer lines. Lines have no lifecycle outside this transfer; PATCH replaces the full collection.
notestringFree-text note about the transfer.
origin_location_idstringRequiredID of the Location the stock leaves.
received_atstringRFC3339 timestamp.
statusenumRequiredWhere the transfer stands, worked out from the quantities that have left the origin and have since been received, returned, or reported lost.
draftin_transitpartially_resolvedclosed
supported_actionsarray of enumRequiredActions that can change this transfer now. `depart` and `cancel` need units that haven't left the origin. `receive`, `return_to_origin`, and `report_loss` need units in transit. Empty once the transfer is closed.
departreceivereturn_to_originreport_losscancel
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
{
"created_at": "2026-07-21T14:00:00Z",
"destination_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN",
"external_reference_id": "wms-transfer-1842",
"idempotency_key": "move-1",
"inventory_transfer_id": "invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"canceled_quantity": 0,
"condition": "sellable",
"departed_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lost_quantity": 0,
"received_damaged_quantity": 0,
"received_quality_control_quantity": 0,
"received_quantity": 0,
"received_quarantined_quantity": 0,
"received_sellable_quantity": 0,
"requested_quantity": 12,
"returned_quantity": 0
}
],
"note": "Rebalance mug stock",
"origin_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"status": "draft",
"supported_actions": [
"depart",
"cancel"
],
"updated_at": "2026-07-21T14:00:00Z",
"version": 2
}List inventory adjustments#
/v1/inventory-adjustmentsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory adjustments. Default order: inventory_adjustment_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by inventory item.
location_idstringFilter by Location.
reasonarray of enumFilter by adjustment reason. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
receivedreturnedsoldtheftlosscondition_changedcountedcorrection
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
source_system_typearray of enumFilter by source-system type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
manualposwmserpflintother
external_source_idstringFilter by external source ID.
external_actor_idstringFilter by external actor ID.
occurred_afterstringInclusive lower bound on occurred_at.
occurred_beforestringExclusive upper bound on occurred_at.
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-adjustments \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-07-21T14:18:04Z",
"external_actor_id": "receiver_204",
"idempotency_key": "adjust-1",
"inventory_adjustment_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"damaged_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity_delta": 10,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0
}
],
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"reason": "received",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory adjustment#
/v1/inventory-adjustmentsKey requiredRequires scope commerce.inventory.write
Rate limit: write
Record a stock change by what happened: stock received, returned, sold, stolen, lost, or moved between conditions, or an absolute count or correction. Flint computes the change against the current level. Returns the adjustment, its movement IDs, and the resulting level for every level touched. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory adjustments with the same idempotency_key, or list inventory movements with that idempotency_key.
Request body
Send exactly one of these
The `loss` variant of `CreateInventoryAdjustmentRequest`. The `received` variant of `CreateInventoryAdjustmentRequest`. The `returned` variant of `CreateInventoryAdjustmentRequest`. The `sold` variant of `CreateInventoryAdjustmentRequest`. The `theft` variant of `CreateInventoryAdjustmentRequest`.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of objectRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
receivedreturnedsoldtheftloss
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
The `condition_changed` variant of `CreateInventoryAdjustmentRequest`.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of objectRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
condition_changed
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
The `counted` variant of `CreateInventoryAdjustmentRequest`.
Send at least one of these
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of any ofRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
counted
source_systemobjectRequiredSystem the change came from, such as a point-of-sale or warehouse system.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of objectRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
counted
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
The `correction` variant of `CreateInventoryAdjustmentRequest`.
Send at least one of these
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of any ofRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringRequiredFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
correction
source_systemobjectRequiredSystem the change came from, such as a point-of-sale or warehouse system.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of objectRequiredStock changes, one for each inventory item and Location, from 1 to 100 lines.
notestringRequiredFree-text note explaining the change. Required when `reason` is `correction`.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
reasonenumRequiredWhy the stock changed. It decides which fields each line takes.
correction
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-adjustments \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"lines": [
{
"expected_physical_version": 7,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 40
}
],
"reason": "counted"
}'Get inventory adjustment#
/v1/inventory-adjustments/{inventory_adjustment_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory adjustment and its lines by ID.
Path parameters
inventory_adjustment_idstringRequiredFlint inventory adjustment ID. Must be a valid ID with prefix invadj_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-adjustments/invadj_01KEZF7C00HFCAS32T4NVHX75M \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-07-21T14:18:04Z",
"external_actor_id": "receiver_204",
"idempotency_key": "adjust-1",
"inventory_adjustment_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"damaged_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity_delta": 10,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0
}
],
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"reason": "received",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}List inventory allocation policies#
/v1/inventory-allocation-policiesRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List allocation policies. Archived policies are excluded unless you filter by status archived. Default order: inventory_allocation_policy_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeinactivearchived
external_reference_idstringExact-match filter on the caller-owned external reference ID.
querystringSearch allocation policy ID, external reference ID, or name.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-allocation-policies \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
},
{
"group_priority": 2,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN"
}
],
"maximum_locations_per_assignment": 3,
"splitting_behavior": "split_when_required",
"within_group_order": "location_id_ascending"
},
"created_at": "2026-06-01T10:00:00Z",
"current_inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {},
"name": "US retail routing",
"status": "active",
"updated_at": "2026-06-01T10:00:00Z",
"version": 2
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory allocation policy#
/v1/inventory-allocation-policiesIdempotentRequires scope commerce.inventory.policies.write
Rate limit: write
Create an allocation policy with its routing configuration. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory allocation policies and identify the matching policy.
Request body
configurationobjectRequiredRouting rules: ranked groups of Locations, whether demand can be split, and the most Locations one assignment may use.
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringRequiredMerchant-facing policy name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
statusenumStatus the allocation policy starts in. Defaults to `active`.
activeinactive
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-allocation-policies \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"maximum_locations_per_assignment": 3,
"splitting_behavior": "split_when_required",
"within_group_order": "location_id_ascending"
},
"name": "US retail routing",
"status": "active"
}'Get inventory allocation policy#
/v1/inventory-allocation-policies/{inventory_allocation_policy_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an allocation policy by ID, including archived policies.
Path parameters
inventory_allocation_policy_idstringRequiredFlint inventory allocation policy ID. Must be a valid ID with prefix invp_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01KEZF7C0076BZX855WAGC5SQK \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
},
{
"group_priority": 2,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN"
}
],
"maximum_locations_per_assignment": 3,
"splitting_behavior": "split_when_required",
"within_group_order": "location_id_ascending"
},
"created_at": "2026-06-01T10:00:00Z",
"current_inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {},
"name": "US retail routing",
"status": "active",
"updated_at": "2026-06-01T10:00:00Z",
"version": 2
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory allocation policy#
/v1/inventory-allocation-policies/{inventory_allocation_policy_id}IdempotentRequires scope commerce.inventory.policies.write
Rate limit: write
Update policy fields, availability, or atomically replace its routing configuration. expected_version is optional and enforced when sent, and is required when replacing configuration. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory allocation policy by ID.
Path parameters
inventory_allocation_policy_idstringRequiredFlint inventory allocation policy ID. Must be a valid ID with prefix invp_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
configurationobjectRequires expected_version.
expected_versionintegerRequired when any of these fields is present: configuration.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
metadatamap of string or nullCaller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringMerchant-facing policy name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
statusenumNew status for the allocation policy. Omit it to leave the status unchanged.
activeinactive
curl -X PATCH https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01KEZF7C0076BZX855WAGC5SQK \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
},
{
"group_priority": 2,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN"
}
],
"maximum_locations_per_assignment": 3,
"splitting_behavior": "split_when_required",
"within_group_order": "location_id_ascending"
},
"expected_version": 2
}'Retire inventory allocation policy#
/v1/inventory-allocation-policies/{inventory_allocation_policy_id}IdempotentRequires scope commerce.inventory.policies.write
Rate limit: write
Retire an allocation policy. The policy is archived: it stays readable by ID and appears in lists only when you filter by status archived.
Path parameters
inventory_allocation_policy_idstringRequiredFlint inventory allocation policy ID. Must be a valid ID with prefix invp_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expected_versionintegerCurrent resource version used as a concurrency fence.
curl -X DELETE https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01KEZF7C0076BZX855WAGC5SQK \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"List inventory allocation policy revisions#
/v1/inventory-allocation-policies/{inventory_allocation_policy_id}/revisionsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List immutable revisions of an allocation policy, newest first by default. Default order: inventory_allocation_policy_revision_id descending; this key uniquely orders the results.
Path parameters
inventory_allocation_policy_idstringRequiredFlint inventory allocation policy ID. Must be a valid ID with prefix invp_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
sort_directionenumSort direction. Defaults to desc.
ascdesc
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01KEZF7C0076BZX855WAGC5SQK/revisions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}
],
"splitting_behavior": "single_location"
},
"created_at": "2026-08-02T16:00:00Z",
"inventory_allocation_policy_id": "invp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"inventory_allocation_policy_revision_id": "invpv_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "page_2",
"request_id": "req_01KWM6AASYFSEP53E9W34N8J33"
}Get inventory allocation policy revision#
/v1/inventory-allocation-policies/{inventory_allocation_policy_id}/revisions/{inventory_allocation_policy_revision_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve the immutable routing configuration captured by one allocation policy revision.
Path parameters
inventory_allocation_policy_idstringRequiredFlint inventory allocation policy ID. Must be a valid ID with prefix invp_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
inventory_allocation_policy_revision_idstringRequiredFlint inventory allocation policy revision ID. Must be a valid ID with prefix invpv_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01KEZF7C0076BZX855WAGC5SQK/revisions/invpv_01KEZF7C00JSFTTBKC1JY614JJ \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"configuration": {
"location_groups": [
{
"group_priority": 1,
"location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}
],
"splitting_behavior": "single_location"
},
"created_at": "2026-08-02T16:00:00Z",
"inventory_allocation_policy_id": "invp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"inventory_allocation_policy_revision_id": "invpv_01K1P6G4M7H2N8Q9R3S5T6V7WX"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6AASYFSEP53E9W34N8J33"
}List inventory counts#
/v1/inventory-countsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory counts. Default order: inventory_count_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by a counted inventory item.
location_idstringFilter by Location.
statusarray of enumFilter by count status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
draftappliedcanceled
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
applied_afterstringInclusive lower bound on applied_at.
applied_beforestringExclusive upper bound on applied_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-counts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-07-21T14:00:00Z",
"idempotency_key": "count-1",
"inventory_count_id": "invc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"captured_physical_version": 9,
"counted_damaged_quantity": 2,
"counted_on_hand_quantity": 47,
"counted_quality_control_quantity": 1,
"counted_quarantined_quantity": 0,
"expected_damaged_quantity": 2,
"expected_on_hand_quantity": 48,
"expected_quality_control_quantity": 0,
"expected_quarantined_quantity": 0,
"inventory_count_line_id": "invcln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"physical_version": 9,
"source_observation_sequence": 1842
}
],
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"observation_provenance": {
"external_actor_id": "counter_204",
"occurred_at": "2026-07-21T14:16:00Z",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
},
"status": "draft",
"supported_actions": [
"apply",
"cancel"
],
"updated_at": "2026-07-21T14:16:04Z",
"version": 2
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory count#
/v1/inventory-countsIdempotentRequires scope commerce.inventory.write
Rate limit: write
Open a physical count for selected inventory items at one Location. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory counts with the same idempotency_key.
Request body
inventory_item_idsarray of stringRequiredIDs of the inventory items to count at the Location, from 1 to 100.
location_idstringRequiredID of the Location whose stock is counted.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-counts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"inventory_item_ids": [
"invi_01K1P6G4M7H2N8Q9R3S5T6V7WX"
],
"location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}'Get inventory count#
/v1/inventory-counts/{inventory_count_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory count and its saved observations by ID.
Path parameters
inventory_count_idstringRequiredFlint inventory count ID. Must be a valid ID with prefix invc_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl https://api.withflintpay.com/v1/inventory-counts/invc_01KEZF7C00B47NXRE3ET37QQ59 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-07-21T14:00:00Z",
"idempotency_key": "count-1",
"inventory_count_id": "invc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"captured_physical_version": 9,
"counted_damaged_quantity": 2,
"counted_on_hand_quantity": 47,
"counted_quality_control_quantity": 1,
"counted_quarantined_quantity": 0,
"expected_damaged_quantity": 2,
"expected_on_hand_quantity": 48,
"expected_quality_control_quantity": 0,
"expected_quarantined_quantity": 0,
"inventory_count_line_id": "invcln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"physical_version": 9,
"source_observation_sequence": 1842
}
],
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"observation_provenance": {
"external_actor_id": "counter_204",
"occurred_at": "2026-07-21T14:16:00Z",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
},
"status": "draft",
"supported_actions": [
"apply",
"cancel"
],
"updated_at": "2026-07-21T14:16:04Z",
"version": 2
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory count#
/v1/inventory-counts/{inventory_count_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Replace a count's complete observation set atomically. expected_version is required when replacing observations. Send every item exactly once with the count's current expected_version and each observation's required expected_physical_version. Read the level before physically counting; zero is valid for a missing level. Every assertion must match locked current stock or the whole save is refused. Preserve saved quantities and fences for unchanged lines. Recount affected items before supplying fresh fences, even when quantities are unchanged. Omitted condition quantities retain the matching level snapshot's values. occurred_at records provenance and does not reconstruct historical stock. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory count by ID.
Path parameters
inventory_count_idstringRequiredFlint inventory count ID. Must be a valid ID with prefix invc_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerRequiredVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
observationsarray of objectRequiredComplete replacement containing every count item exactly once. Every physical version must match current stock or the entire save is refused. Recount affected items before submitting fresh fences.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
curl -X PATCH https://api.withflintpay.com/v1/inventory-counts/invc_01KEZF7C00B47NXRE3ET37QQ59 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"observations": [
{
"counted_damaged_quantity": 0,
"counted_on_hand_quantity": 12,
"counted_quality_control_quantity": 0,
"counted_quarantined_quantity": 0,
"expected_physical_version": 9,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"source_system": {
"type": "manual"
}
}'Apply inventory count#
/v1/inventory-counts/{inventory_count_id}/applyIdempotentRequires scope commerce.inventory.write
Rate limit: write
Sets inventory levels to the counted quantities of an open physical count. Every line needs an observation. VERSION_CONFLICT also covers a stale saved physical observation with no corresponding field in this request; these details omit param. Recount affected items and save the complete observations before applying again. Physical changes after observation require recounts, including at a trading location; holds and commitments alone do not invalidate observations. Call it only when apply is in supported_actions. Returns a result with inventory_count as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory count by ID.
Path parameters
inventory_count_idstringRequiredFlint inventory count ID. Must be a valid ID with prefix invc_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional resource version the caller last read. Enforced when sent.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-counts/invc_01KEZF7C00B47NXRE3ET37QQ59/apply \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2
}'Cancel inventory count#
/v1/inventory-counts/{inventory_count_id}/cancelIdempotentRequires scope commerce.inventory.write
Rate limit: write
Closes an open physical count without changing stock. Call it only when cancel is in supported_actions. Returns a result with inventory_count as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory count by ID.
Path parameters
inventory_count_idstringRequiredFlint inventory count ID. Must be a valid ID with prefix invc_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional resource version the caller last read. Enforced when sent.
curl -X POST https://api.withflintpay.com/v1/inventory-counts/invc_01KEZF7C00B47NXRE3ET37QQ59/cancel \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2
}'List inventory items#
/v1/inventory-itemsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory items. Archived items are excluded unless you filter by status archived. Default order: inventory_item_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeinactivearchived
skustringFilter by exact SKU.
barcodestringFilter by exact barcode.
external_reference_idstringExact-match filter on the caller-owned external reference ID.
querystringSearch inventory item ID, external reference ID, name, SKU, or barcode.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-items \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"backorder": {
"enabled": false,
"expected_ship_date": null,
"limit_quantity": null
},
"barcode": "0781234567890",
"created_at": "2026-05-02T11:04:00Z",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"supplier": "northwind"
},
"name": "Ceramic mug, 12oz",
"sku": "mug-12-white",
"status": "active",
"updated_at": "2026-07-14T09:12:00Z",
"version": 3
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory item#
/v1/inventory-itemsIdempotentRequires scope commerce.inventory.write
Rate limit: write
Create an inventory item. SKU and barcode are searchable attributes, not identity: they are not required to be unique. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory items by the external_reference_id, sku, or barcode you supplied, then read the matching item.
Request body
backorderobjectBackorder settings to apply to this inventory item.
barcodestringOptional searchable barcode.
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringRequiredMerchant-facing inventory item name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
skustringOptional searchable stock-keeping unit.
statusenumStatus the inventory item starts in. Defaults to `active`.
activeinactive
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-items \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"barcode": "0781234567890",
"name": "Ceramic mug, 12oz",
"sku": "mug-12-white",
"status": "active"
}'Get inventory item#
/v1/inventory-items/{inventory_item_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory item by ID, including archived items.
Path parameters
inventory_item_idstringRequiredFlint inventory item ID. Must be a valid ID with prefix invi_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl https://api.withflintpay.com/v1/inventory-items/invi_01KEZF7C00A6YEM25MTHW2MPZY \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"backorder": {
"enabled": false,
"expected_ship_date": null,
"limit_quantity": null
},
"barcode": "0781234567890",
"created_at": "2026-05-02T11:04:00Z",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"supplier": "northwind"
},
"name": "Ceramic mug, 12oz",
"sku": "mug-12-white",
"status": "active",
"updated_at": "2026-07-14T09:12:00Z",
"version": 3
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory item#
/v1/inventory-items/{inventory_item_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Update an inventory item. Accepts status active or inactive. Send sku or barcode as null to clear. expected_version is optional and enforced when sent. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory item by ID.
Path parameters
inventory_item_idstringRequiredFlint inventory item ID. Must be a valid ID with prefix invi_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
backorderobjectBackorder settings to apply to this inventory item.
barcodestring or nullSend null to clear it.
expected_versionintegerVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
metadatamap of string or nullCaller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringMerchant-facing inventory item name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
skustring or nullSend null to clear it.
statusenumNew status for the inventory item. Omit it to leave the status unchanged.
activeinactive
curl -X PATCH https://api.withflintpay.com/v1/inventory-items/invi_01KEZF7C00A6YEM25MTHW2MPZY \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"barcode": null,
"expected_version": 3,
"name": "Ceramic mug, 12oz (white)"
}'Retire inventory item#
/v1/inventory-items/{inventory_item_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Retire an inventory item. The item is archived: it stays readable by ID and appears in lists only when you filter by status archived.
Path parameters
inventory_item_idstringRequiredFlint inventory item ID. Must be a valid ID with prefix invi_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expected_versionintegerCurrent resource version used as a concurrency fence.
curl -X DELETE https://api.withflintpay.com/v1/inventory-items/invi_01KEZF7C00A6YEM25MTHW2MPZY \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"List inventory levels#
/v1/inventory-levelsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory levels. Send expand=inventory_item to render each level's inventory item inline, so a stock table needs no read per row. Filter by inventory_item_status to see only the levels behind items that can be sold. Levels are strongly consistent individually, but pages may reflect different committed instants. Default order: inventory_level_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by inventory item.
product_idstringFilter by inventory items linked to the product's non-deleted variants. An item shared by several variants returns one level per Location.
location_idstringFilter by Location.
inventory_item_statusarray of enumFilter by the status of the inventory item the level belongs to. Only active items can be routed or reserved. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeinactivearchived
has_available_quantitybooleanTrue selects levels with available quantity; false selects levels with zero available quantity. Omit for all levels.
has_unavailable_conditionbooleanTrue selects levels with unavailable physical stock; false selects levels with none. Omit for all levels.
has_shortagebooleanTrue selects levels with a shortage; false selects levels with none. Omit for all levels.
querystringSearch inventory item ID, name, SKU, or barcode. Case-insensitive substring match.
min_available_quantityintegerInclusive lower bound on available_quantity.
max_available_quantityintegerInclusive upper bound on available_quantity.
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
expandarray of enumInclude related objects in the response. Supported expansions: inventory_item. The expansion resolves with one batched lookup per page. Expansion requires commerce.inventory.read. Limits: at most 10 unique expand paths per request.
inventory_item
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-levels \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Get inventory level#
/v1/inventory-levels/{inventory_level_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory level's current quantities and version by ID.
Path parameters
inventory_level_idstringRequiredFlint inventory level ID. Must be a valid ID with prefix invl_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expandarray of enumInclude related objects in the response. Supported expansions: inventory_item. Include the full inventory item with expand=inventory_item. Requires commerce.inventory.read. Limits: at most 10 unique expand paths per request.
inventory_item
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-levels/invl_01KEZF7C00H201XZXKRX5KMDDE \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory level#
/v1/inventory-levels/{inventory_level_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Set one inventory level's safety_stock_quantity. expected_version is optional and enforced when sent. The version changes on every quantity or claim change, including holds and commits, so read the level immediately before a PATCH. Returns the updated inventory level. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory level by ID.
Path parameters
inventory_level_idstringRequiredFlint inventory level ID. Must be a valid ID with prefix invl_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
safety_stock_quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
curl -X PATCH https://api.withflintpay.com/v1/inventory-levels/invl_01KEZF7C00H201XZXKRX5KMDDE \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 4,
"safety_stock_quantity": 5
}'List inventory movements#
/v1/inventory-movementsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory movements, oldest recorded first. Send expand=inventory_item to render each movement's inventory item inline, so a history table needs no read per row. Filter by idempotency_key to recover the movements a command produced. Send sort_direction=desc to read the newest movements first. Default order: created_at ascending, then inventory_movement_id ascending.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by inventory item.
location_idstringFilter by Location.
typearray of enumFilter by movement type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
adjustmentcount_appliedreservation_consumedreservation_committedreservation_commitment_releasedreservation_expiredreservation_heldreservation_hold_releasedreservation_reallocated_inreservation_reallocated_outreturn_receivedsafety_stock_changetransfer_departedtransfer_receivedtransfer_returnedtransfer_lost
reasonarray of enumFilter adjustment movements by the adjustment reason. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
receivedreturnedsoldtheftlosscondition_changedcountedcorrection
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
return_idstringFilter by the customer Return that produced the movement.
return_disposition_idstringFilter by the Return disposition that produced the movement.
sort_directionenumSort direction. Defaults to asc.
ascdesc
expandarray of enumInclude related objects in the response. Supported expansions: inventory_item. The expansion resolves with one batched lookup per page. Expansion requires commerce.inventory.read. Limits: at most 10 unique expand paths per request.
inventory_item
source_system_typearray of enumFilter by source-system type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
manualposwmserpflintother
external_source_idstringFilter by external source ID.
external_actor_idstringFilter by external actor ID.
occurred_afterstringInclusive lower bound on occurred_at.
occurred_beforestringExclusive upper bound on occurred_at.
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
source_reference_typearray of enumFilter by source_reference.resource_type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
fulfillmentinventory_adjustmentinventory_countinventory_levelinventory_receiptinventory_reservationinventory_transfer
source_reference_idstringFilter by source_reference.resource_id.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-movements \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"backordered_quantity_delta": 0,
"committed_quantity_delta": 0,
"created_at": "2026-07-21T14:18:04Z",
"created_by": {
"resource_id": "usr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "user"
},
"damaged_quantity_delta": 0,
"external_actor_id": "receiver_204",
"held_quantity_delta": 0,
"idempotency_key": "adjust-1",
"incoming_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_claim_version": 7,
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_physical_version": 9,
"inventory_level_version": 18,
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"on_hand_quantity_delta": 25,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0,
"reason": "received",
"resulting_inventory_level": {
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
},
"safety_stock_quantity_delta": 0,
"source_reference": {
"resource_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "inventory_adjustment"
},
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
},
"type": "adjustment"
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Get inventory movement#
/v1/inventory-movements/{inventory_movement_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory movement and its stock changes by ID.
Path parameters
inventory_movement_idstringRequiredFlint inventory movement ID. Must be a valid ID with prefix invm_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expandarray of enumInclude related objects in the response. Supported expansions: inventory_item. Include the full inventory item with expand=inventory_item. Requires commerce.inventory.read. Limits: at most 10 unique expand paths per request.
inventory_item
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-movements/invm_01KEZF7C00DYPFT9PS0NZY805Z \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"backordered_quantity_delta": 0,
"committed_quantity_delta": 0,
"created_at": "2026-07-21T14:18:04Z",
"created_by": {
"resource_id": "usr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "user"
},
"damaged_quantity_delta": 0,
"external_actor_id": "receiver_204",
"held_quantity_delta": 0,
"idempotency_key": "adjust-1",
"incoming_quantity_delta": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_claim_version": 7,
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_physical_version": 9,
"inventory_level_version": 18,
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"note": "Receiving record 1842",
"occurred_at": "2026-07-21T14:18:00Z",
"on_hand_quantity_delta": 25,
"quality_control_quantity_delta": 0,
"quarantined_quantity_delta": 0,
"reason": "received",
"resulting_inventory_level": {
"available_quantity": 31,
"backordered_quantity": 0,
"claim_version": 7,
"committed_quantity": 6,
"created_at": "2026-05-02T11:04:00Z",
"damaged_quantity": 2,
"held_quantity": 4,
"incoming_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"on_hand_quantity": 48,
"physical_version": 9,
"quality_control_quantity": 0,
"quarantined_quantity": 0,
"safety_stock_quantity": 5,
"shortage_quantity": 0,
"unavailable_on_hand_quantity": 2,
"updated_at": "2026-07-21T14:18:00Z",
"version": 18
},
"safety_stock_quantity_delta": 0,
"source_reference": {
"resource_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"resource_type": "inventory_adjustment"
},
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
},
"type": "adjustment"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}List inventory receipts#
/v1/inventory-receiptsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List completed inventory receipt effects. Use typed Return filters for reconciliation when the receipt was created by Returns. Default order: inventory_receipt_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by inventory item.
receiving_location_idstringFilter by receiving Location.
inventory_reservation_idstringFilter by source reservation.
return_idstringFilter by the customer Return that produced the receipt.
return_disposition_idstringFilter by the Return disposition that produced the receipt.
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
source_system_typearray of enumFilter by source-system type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
manualposwmserpflintother
external_source_idstringFilter by external source ID.
external_actor_idstringFilter by external actor ID.
occurred_afterstringInclusive lower bound on occurred_at.
occurred_beforestringExclusive upper bound on occurred_at.
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-receipts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-07-21T14:18:04Z",
"idempotency_key": "return-1",
"inventory_receipt_id": "invrec_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"disposition": "sellable",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_receipt_line_id": "invrecln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"quantity": 1,
"receiving_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_line_item_id": "retli_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"occurred_at": "2026-07-21T14:18:00Z",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"source_system": {
"type": "flint"
}
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory receipt#
/v1/inventory-receiptsKey requiredRequires scope commerce.inventory.write
Rate limit: write
Record returned units against a consumed inventory reservation and their disposition. For supplier deliveries, use POST /v1/inventory-adjustments with reason: received. This is a downstream stock effect, not the customer Return lifecycle. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory receipts with the same idempotency_key, or list inventory movements with that idempotency_key.
Request body
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
linesarray of objectRequiredReceived lines, each with the item, receiving Location, quantity, and disposition.
occurred_atstringWhen the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.
source_systemobjectSystem the change came from, such as a point-of-sale or warehouse system.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-receipts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"external_actor_id": "receiver_204",
"lines": [
{
"disposition": "sellable",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_reservation_id": "invr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"quantity": 1,
"receiving_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"occurred_at": "2026-07-21T14:18:00Z",
"source_system": {
"external_source_id": "east-coast-wms",
"type": "wms"
}
}'Get inventory receipt#
/v1/inventory-receipts/{inventory_receipt_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve a completed inventory receipt and its disposition lines by ID.
Path parameters
inventory_receipt_idstringRequiredFlint inventory receipt ID. Must be a valid ID with prefix invrec_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-receipts/invrec_01KEZF7C00JXXCYA06SH8RCM2N \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-07-21T14:18:04Z",
"idempotency_key": "return-1",
"inventory_receipt_id": "invrec_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"disposition": "sellable",
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_movement_id": "invm_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_receipt_line_id": "invrecln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"quantity": 1,
"receiving_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_line_item_id": "retli_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}
],
"occurred_at": "2026-07-21T14:18:00Z",
"return_disposition_id": "retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"return_id": "ret_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"source_system": {
"type": "flint"
}
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}List inventory reservations#
/v1/inventory-reservationsRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory reservations in ascending inventory_reservation_id order. Omit owner_type to include merchant and order owners. owner_key matches merchant owners only. Default order: inventory_reservation_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by an inventory item on a reservation line.
location_idstringFilter by a location on a reservation line. Combined with inventory_item_id, the same line must match both.
order_idstringFilter by the reservation's resolved owner order.
statusarray of enumFilter by reservation status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeclosed
owner_typearray of enumFilter by merchant or order ownership. Omit to return every owner type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
merchantorder
owner_keystringFilter merchant-owned reservations by exact owner key. Combined with owner_type=order, returns an empty page.
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
has_at_risk_quantitybooleanTrue selects reservations with at-risk quantity; false selects reservations with none on any line. Omit for all reservations.
closed_reasonarray of enumFilter by how the reservation ended. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
consumedreleasedexpiredreallocatedmixedadopted
expires_afterstringInclusive lower bound on expires_at.
expires_beforestringExclusive upper bound on expires_at.
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-reservations \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-07-21T14:18:00Z",
"expires_at": "2026-07-21T14:33:00Z",
"idempotency_key": "cart-1842-hold",
"inventory_reservation_id": "invr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_routing_source": {
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"type": "policy_revision"
},
"lines": [
{
"allocated_quantity": 3,
"at_risk_committed_quantity": 0,
"at_risk_held_quantity": 0,
"backordered_quantity": 0,
"committed_quantity": 2,
"consumed_quantity": 0,
"demand_key": "cart_line_1",
"held_quantity": 1,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"reallocated_quantity": 0,
"released_from_backordered_quantity": 0,
"released_from_committed_quantity": 0,
"released_from_held_quantity": 0
}
],
"owner": {
"key": "cart_1842",
"type": "merchant"
},
"status": "active",
"supported_actions": [
"commit",
"consume",
"release"
],
"updated_at": "2026-07-21T14:21:00Z",
"version": 4
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory reservation#
/v1/inventory-reservationsKey requiredRequires scope commerce.inventory.write
Rate limit: write
Route standalone merchant demand and hold stock in one atomic command. A hold defaults to 15 minutes and can last up to 24 hours. Set expires_at when creating it or PATCH the reservation to change its deadline. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, list inventory reservations with the same idempotency_key.
Request body
demandsarray of objectRequiredItems and quantities to reserve.
expires_atstringHold deadline, after now and at most 24 hours from now. Defaults to 15 minutes after creation.
inventory_routing_sourceone ofHow Flint chooses the Locations that serve the reservation: one fixed Location, an allocation policy, or a specific policy revision. When omitted, the reservation uses and stores `settings.inventory.default_routing_source`; without that default the request returns `400 INVALID_REQUEST` at `inventory_routing_source`.
ownerobjectRequiredWho holds the reservation: a `key` you choose, or an order Flint holds the stock for.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-reservations \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"demands": [
{
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"quantity": 2
}
],
"inventory_routing_source": {
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"type": "policy"
},
"owner": {
"key": "cart_1842"
}
}'Get inventory reservation#
/v1/inventory-reservations/{inventory_reservation_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory reservation and its lines by ID, including merchant and order owners.
Path parameters
inventory_reservation_idstringRequiredFlint inventory reservation ID. Must be a valid ID with prefix invr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-reservations/invr_01KEZF7C0041ENRR0C2NF3AP12 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-07-21T14:18:00Z",
"expires_at": "2026-07-21T14:33:00Z",
"idempotency_key": "cart-1842-hold",
"inventory_reservation_id": "invr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_routing_source": {
"inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_allocation_policy_revision_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"type": "policy_revision"
},
"lines": [
{
"allocated_quantity": 3,
"at_risk_committed_quantity": 0,
"at_risk_held_quantity": 0,
"backordered_quantity": 0,
"committed_quantity": 2,
"consumed_quantity": 0,
"demand_key": "cart_line_1",
"held_quantity": 1,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"reallocated_quantity": 0,
"released_from_backordered_quantity": 0,
"released_from_committed_quantity": 0,
"released_from_held_quantity": 0
}
],
"owner": {
"key": "cart_1842",
"type": "merchant"
},
"status": "active",
"supported_actions": [
"commit",
"consume",
"release"
],
"updated_at": "2026-07-21T14:21:00Z",
"version": 4
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory reservation#
/v1/inventory-reservations/{inventory_reservation_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Change the hold deadline of a reservation you created. The new expires_at must be after now and at most 24 hours from now, and can be earlier or later than the current one. A lapsed hold cannot be extended, and reservations Flint holds for orders cannot be changed. Committed and consumed quantity never expire.
Path parameters
inventory_reservation_idstringRequiredFlint inventory reservation ID. Must be a valid ID with prefix invr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
expires_atstringRequiredNew hold deadline: after now and at most 24 hours from now. It can be earlier or later than the current deadline.
curl -X PATCH https://api.withflintpay.com/v1/inventory-reservations/invr_01KEZF7C0041ENRR0C2NF3AP12 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"expires_at": "2026-07-22T12:00:00Z"
}'Commit inventory reservation#
/v1/inventory-reservations/{inventory_reservation_id}/commitIdempotentRequires scope commerce.inventory.write
Rate limit: write
Commits held quantity, usually once the buyer pays. Commit before expires_at: after the deadline, commit returns 409 ACTION_NOT_ALLOWED with reason terminal_status. Call it only when commit is in supported_actions. Lines carry cumulative targets: resending targets already applied succeeds even after the reservation closes. Returns a result with inventory_reservation as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory reservation by ID.
Path parameters
inventory_reservation_idstringRequiredFlint inventory reservation ID. Must be a valid ID with prefix invr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional resource version the caller last read. Enforced when sent.
linesarray of objectRequiredReservation lines this action changes, each with a cumulative target. 1 to 100 lines.
curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01KEZF7C0041ENRR0C2NF3AP12/commit \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 3,
"lines": [
{
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_committed_quantity": 2
}
]
}'Consume inventory reservation#
/v1/inventory-reservations/{inventory_reservation_id}/consumeIdempotentRequires scope commerce.inventory.write
Rate limit: write
Consumes committed quantity when you hand the goods off, removing it from on-hand stock. Accepts provenance describing the handoff. Call it only when consume is in supported_actions. Lines carry cumulative targets: resending targets already applied succeeds even after the reservation closes. Returns a result with inventory_reservation as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory reservation by ID.
Path parameters
inventory_reservation_idstringRequiredFlint inventory reservation ID. Must be a valid ID with prefix invr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional resource version the caller last read. Enforced when sent.
linesarray of objectRequiredReservation lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the physical handoff happened. When omitted, occurred_at is the command receipt time and source_system is null.
curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01KEZF7C0041ENRR0C2NF3AP12/consume \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 4,
"lines": [
{
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_consumed_quantity": 2
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Release inventory reservation#
/v1/inventory-reservations/{inventory_reservation_id}/releaseIdempotentRequires scope commerce.inventory.write
Rate limit: write
Releases held or committed quantity back to available stock, for example when the buyer leaves or you cancel after payment. Call it only when release is in supported_actions. Lines carry cumulative targets: resending targets already applied succeeds even after the reservation closes. Returns a result with inventory_reservation as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory reservation by ID.
Path parameters
inventory_reservation_idstringRequiredFlint inventory reservation ID. Must be a valid ID with prefix invr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional resource version the caller last read. Enforced when sent.
linesarray of any ofRequiredReservation lines this action changes, each with a cumulative target. 1 to 100 lines.
curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01KEZF7C0041ENRR0C2NF3AP12/release \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"lines": [
{
"inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_released_from_held_quantity": 2
}
]
}'List inventory transfers#
/v1/inventory-transfersRequires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
List inventory transfers. Default order: inventory_transfer_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
inventory_item_idstringFilter by inventory item.
origin_location_idstringFilter by origin Location.
destination_location_idstringFilter by destination Location.
statusarray of enumFilter by transfer status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
draftin_transitpartially_resolvedclosed
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
external_reference_idstringExact, case-sensitive match on the caller-owned external reference ID. Must contain 1 to 255 characters.
querystringSearch by inventory_transfer_id, external_reference_id, or note.
closed_reasonarray of enumFilter by how the transfer ended. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
receivedcanceledreceived_with_cancellationreturnedlostmixed
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
departed_afterstringInclusive lower bound on departed_at.
departed_beforestringExclusive upper bound on departed_at.
received_afterstringInclusive lower bound on received_at.
received_beforestringExclusive upper bound on received_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/inventory-transfers \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-07-21T14:00:00Z",
"destination_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN",
"external_reference_id": "wms-transfer-1842",
"idempotency_key": "move-1",
"inventory_transfer_id": "invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"canceled_quantity": 0,
"condition": "sellable",
"departed_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lost_quantity": 0,
"received_damaged_quantity": 0,
"received_quality_control_quantity": 0,
"received_quantity": 0,
"received_quarantined_quantity": 0,
"received_sellable_quantity": 0,
"requested_quantity": 12,
"returned_quantity": 0
}
],
"note": "Rebalance mug stock",
"origin_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"status": "draft",
"supported_actions": [
"depart",
"cancel"
],
"updated_at": "2026-07-21T14:00:00Z",
"version": 2
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create inventory transfer#
/v1/inventory-transfersIdempotentRequires scope commerce.inventory.write
Rate limit: write
Create a planned stock transfer between two Locations. Creates a draft and moves no stock, so an idempotency key is optional: each request without a key creates a separate draft. With a key, a retry must send the same request body, and idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. To recover a keyed create after a lost response, list inventory transfers with idempotency_key.
Request body
destination_location_idstringRequiredID of the Location the stock goes to.
external_reference_idstringCaller-owned identifier for this resource in an external system.
linesarray of objectRequiredItems to transfer, from 1 to 100 lines.
notestringFree-text note about the transfer.
origin_location_idstringRequiredID of the Location the stock leaves.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"destination_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"lines": [
{
"inventory_item_id": "invi_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"requested_quantity": 1
}
],
"origin_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}'Get inventory transfer#
/v1/inventory-transfers/{inventory_transfer_id}Requires scope commerce.inventory.read or commerce.inventory.write
Rate limit: read
Retrieve an inventory transfer, its lines, and supported_actions by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-07-21T14:00:00Z",
"destination_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN",
"external_reference_id": "wms-transfer-1842",
"idempotency_key": "move-1",
"inventory_transfer_id": "invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lines": [
{
"canceled_quantity": 0,
"condition": "sellable",
"departed_quantity": 0,
"inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"lost_quantity": 0,
"received_damaged_quantity": 0,
"received_quality_control_quantity": 0,
"received_quantity": 0,
"received_quarantined_quantity": 0,
"received_sellable_quantity": 0,
"requested_quantity": 12,
"returned_quantity": 0
}
],
"note": "Rebalance mug stock",
"origin_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"status": "draft",
"supported_actions": [
"depart",
"cancel"
],
"updated_at": "2026-07-21T14:00:00Z",
"version": 2
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update inventory transfer#
/v1/inventory-transfers/{inventory_transfer_id}IdempotentRequires scope commerce.inventory.write
Rate limit: write
Update an open transfer's planning details. Sending lines replaces the owned collection atomically and requires expected_version. For metadata-only edits, expected_version is optional and enforced when sent. Omitted fields stay unchanged. Send external_reference_id: null to clear it.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerRequired when any of these fields is present: lines.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
linesarray of objectReplace the transfer's owned lines collection atomically. Lines have no lifecycle outside this transfer. Include every line to keep, with its inventory_transfer_line_id; omit it to remove it. Lines with departed or canceled quantity must remain. Requires expected_version when present.
notestring or nullSend null to clear it.
curl -X PATCH https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"note": "Restock the downtown store."
}'Cancel inventory transfer#
/v1/inventory-transfers/{inventory_transfer_id}/cancelIdempotentRequires scope commerce.inventory.write
Rate limit: write
Cancels requested quantity that hasn't departed. Call it only when cancel is in supported_actions. Lines carry cumulative targets, not deltas. Returns a result with inventory_transfer as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory transfer by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerTransfer version the caller last read.
linesarray of objectRequiredTransfer lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the stock moved. Optional; when omitted, the movements record the time Flint received the command as occurred_at and a null source_system.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
metaobjectAdditional information about this response.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP/cancel \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"lines": [
{
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_canceled_quantity": 4
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Depart inventory transfer#
/v1/inventory-transfers/{inventory_transfer_id}/departIdempotentRequires scope commerce.inventory.write
Rate limit: write
Takes stock off the origin location and puts it in transit. Call it only when depart is in supported_actions. Lines carry cumulative targets, not deltas. Returns a result with inventory_transfer as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory transfer by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerTransfer version the caller last read.
linesarray of objectRequiredTransfer lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the stock moved. Optional; when omitted, the movements record the time Flint received the command as occurred_at and a null source_system.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP/depart \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"lines": [
{
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_departed_quantity": 4
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Receive inventory transfer#
/v1/inventory-transfers/{inventory_transfer_id}/receiveIdempotentRequires scope commerce.inventory.write
Rate limit: write
Adds in-transit stock to the destination location. Optional condition targets split the received quantity by condition. Call it only when receive is in supported_actions. Lines carry cumulative targets, not deltas. Returns a result with inventory_transfer as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory transfer by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerTransfer version the caller last read.
linesarray of objectRequiredTransfer lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the stock moved. Optional; when omitted, the movements record the time Flint received the command as occurred_at and a null source_system.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP/receive \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"lines": [
{
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_received_quantity": 4
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Report inventory transfer loss#
/v1/inventory-transfers/{inventory_transfer_id}/report-lossIdempotentRequires scope commerce.inventory.write
Rate limit: write
Records in-transit stock as lost. Call it only when report_loss is in supported_actions. Lines carry cumulative targets, not deltas. Returns a result with inventory_transfer as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory transfer by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerTransfer version the caller last read.
linesarray of objectRequiredTransfer lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the stock moved. Optional; when omitted, the movements record the time Flint received the command as occurred_at and a null source_system.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP/report-loss \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"lines": [
{
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_lost_quantity": 4
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Return inventory transfer to origin#
/v1/inventory-transfers/{inventory_transfer_id}/return-to-originIdempotentRequires scope commerce.inventory.write
Rate limit: write
Puts in-transit stock back at the origin location. Call it only when return_to_origin is in supported_actions. Lines carry cumulative targets, not deltas. Returns a result with inventory_transfer as its primary resource and inventory_levels for the levels changed. Idempotency is scoped to the authenticated merchant, environment, caller namespace, and operation. Its fingerprint includes the canonical request body. To recover the command's effects after a lost response, read the inventory transfer by ID.
Path parameters
inventory_transfer_idstringRequiredFlint inventory transfer ID. Must be a valid ID with prefix invtr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerTransfer version the caller last read.
linesarray of objectRequiredTransfer lines this action changes, each with a cumulative target. 1 to 100 lines.
provenanceobjectWhen and where the stock moved. Optional; when omitted, the movements record the time Flint received the command as occurred_at and a null source_system.
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP/return-to-origin \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 2,
"lines": [
{
"inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"target_returned_quantity": 4
}
],
"provenance": {
"source_system": {
"type": "manual"
}
}
}'Was this helpful?