Skip to content

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:

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#

RecordID prefixWhat it is
Inventory iteminvi_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 levelinvl_One item at one Location. It carries the quantities, and you never write them directly.
Inventory movementinvm_One immutable change to a level, naming the record that caused it.
Adjustmentinvadj_A physical event you report: stock received, returned, sold, lost, changed condition, counted, or corrected.
Receiptinvrec_Units a Flint reservation consumed, put back on the shelf.
Reservationinvr_A claim on stock, with one line (invrln_) for each item and Location it claims.
Allocation policyinvp_Ranked Locations that route demand. Each configuration is an immutable revision (invpv_).
Countinvc_A stocktake of selected items at one Location, applied in one step.
Transferinvtr_Stock moving from one Location to another, with one line (invtrln_) for each item and condition.

Items and allocation policies share one status lifecycle:

Inventory item and allocation policy statusFinal
  • 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.

KindFields
Physicalon_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.
Claimsheld_quantity for open reservations, such as a buyer who is paying, and committed_quantity for accepted orders.
Backorderedbackordered_quantity, units waiting for stock. It is separate from held_quantity and committed_quantity, and neither formula below uses it. See Backorders.
Withheldsafety_stock_quantity, kept back from sale on purpose.
Inboundincoming_quantity, departed on a transfer to this Location and not yet received. It doesn't count toward availability.
Derivedavailable_quantity and shortage_quantity, never below 0 and never written.
Text
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.

FieldRule
enabledfalse unless you set it.
limit_quantityThe 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_dateA 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
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_quantity is separate from held and committed quantity. It doesn't change available_quantity or shortage_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_at stays 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_quantity 0. 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_source uses the merchant's settings.inventory.default_routing_source and 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 returns 400 INVALID_REQUEST with detail REQUIRED at inventory_routing_source. On an existing order without one, adding a tracked line uses the default or the same fallback Location and otherwise returns 409 ACTION_NOT_ALLOWED with reason configuration_required. Paying such an order doesn't read the default: it returns 409 ACTION_NOT_ALLOWED with reason configuration_required until you set the order's inventory_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_INSUFFICIENT before creating an attempt. If another buyer takes the stock after preflight and an attempt already exists, Flint returns 200 with the attempt in status: "failed" and status_reason: "inventory_unavailable". Neither outcome charges the buyer. When the item has backorder.enabled, an order claims the units stock can't cover as backordered units, up to the item's backorder.limit_quantity. When the limit blocks a route, the preflight error uses reason backorder_limit_reached. The detail identifies the inventory_item_id, its limit, and the current_count already backordered across all locations. available_quantity counts sellable stock. The remaining backorder room is max(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's unassigned_quantity minus its backordered_quantity; see Backordered and pre-ordered lines.
  • Some demands never backorder. Bundle components and reservations you create return 409 INVENTORY_INSUFFICIENT when stock falls short. A subscription renewal that stock can't cover keeps waiting in inventory_wait.
  • A paid order whose stock can't be committed reports an exception. The order sets inventory_exception_status to paid_inventory_failed and sends order.inventory_exception_created. Resolve it with POST /v1/orders/{order_id}/resolve-inventory-exception, or set post_payment_inventory_failure_action to auto_refund in an origin_policies entry 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 happenedCallMovement type
New stock arrived from a supplierPOST /v1/inventory-adjustments with reason: receivedadjustment
Stock moved between your LocationsPOST /v1/inventory-transfers, then its lifecycle actionstransfer_*
A buyer returned units a Flint order or reservation consumedA Return disposition, or POST /v1/inventory-receipts naming the reservation linereturn_received
A customer returned units sold outside FlintPOST /v1/inventory-adjustments with reason: returnedadjustment
A sale already happened outside Flint, such as at a POSPOST /v1/inventory-adjustments with reason: sold, which doesn't check claimsadjustment
A cart needs stock held before paymentPOST /v1/inventory-reservations, then commit, consume, or releasereservation_*
Stock was stolen, lost, or discardedPOST /v1/inventory-adjustments with reason: theft or lossadjustment
Units changed conditionPOST /v1/inventory-adjustments with reason: condition_changedadjustment
Another system reports what is on handPOST /v1/inventory-adjustments with reason: countedadjustment
A recorded number is wrongPOST /v1/inventory-adjustments with reason: correction and a noteadjustment
A stocktake across many itemsPOST /v1/inventory-counts, save observations, then applycount_applied
Withhold stock from salePATCH /v1/inventory-levels/{inventory_level_id} with safety_stock_quantitysafety_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:

FormFieldsUsed byReads as
Quantityquantityreceived, returned, sold, theft, loss, and condition_changed adjustments; receipt lines"Twenty-five arrived."
Absolute valueon_hand_quantity and the condition quantities, counted_*_quantity, safety_stock_quantitycounted and correction adjustments, count observations, the level PATCH"Forty are on hand." Quantities you leave out stay unchanged.
Cumulative targettarget_*_quantityReservation 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.

Response
{
  "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.

CommandResult schemaSubject member
Create an adjustmentInventoryAdjustmentResultinventory_adjustment
Create a receiptInventoryReceiptResultinventory_receipt
Create a reservation or run one of its actionsInventoryReservationResultinventory_reservation
Run a transfer actionInventoryTransferResultinventory_transfer
Apply or cancel a countInventoryCountResultinventory_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.

JSON
{
  "demands": [
    { "inventory_item_id": "invi_1kmn0aExample", "quantity": 2 }
  ],
  "inventory_routing_source": { "type": "fixed_location", "location_id": "loc_1kmn0aExample" },
  "owner": { "key": "cart_1842" }
}
FieldRule
demands1 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.keyYour 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_atThe 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.typeResponse shapeWho 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.

Where a reservation line's quantity goesStartFinal
  • 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:

ActionLine targetListed while
committarget_committed_quantityA line holds quantity and expires_at hasn't passed
consumetarget_consumed_quantityA line has committed quantity that isn't at risk
releasetarget_released_from_held_quantity or target_released_from_committed_quantityA 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 reservation
Final values do not change again
  • active
    A line still holds, has committed, or has backordered quantity.
  • closedFinal
    No line holds, has committed, or has backordered quantity. closed_reason says how it ended: consumed, released, expired, reallocated, or mixed when 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:

typeSendRoutes with
fixed_locationlocation_idOne Location. A single-site merchant never needs a policy.
policyinventory_allocation_policy_idThe policy's current configuration when the request is made.
policy_revisioninventory_allocation_policy_revision_idOne 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:

  1. Eligible Locations are ordered by group_priority, lowest first, then by location ID.
  2. If one Location can serve the whole request, the first such Location takes all of it.
  3. Otherwise, with splitting_behavior: split_when_required, Flint walks the same order and takes what each Location can serve, using at most maximum_locations_per_assignment Locations. That limit defaults to 10; single_location always 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 versionRevision ID
ChangesOn every policy editNever; a new configuration gets a new ID
Use it toFence an edit with expected_versionPin 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_quantity shows the claims its sellable stock no longer covers, and Flint sends inventory_level.shortage_detected.
  • The affected reservation lines report at_risk_held_quantity and at_risk_committed_quantity, and Flint sends inventory_reservation.at_risk. List them with GET /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.reasonMeaning
inventory_shortagePhysical stock no longer covers the claim.
hold_expiredAn order's hold deadline passed while it still needs the stock.
payment_pendingThe payment outcome isn't known yet.
otherAnything 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-counts with a location_id and the inventory_item_ids to count. While the count is a draft, each line shows the expected_*_quantity values Flint holds for that item there right now.

  2. Read each level, then count#

    Read each draft count line's live physical_version alongside its expected quantities before you count that item's shelf. The version is 0 when no level exists and null after the count is applied or canceled. Creating a count captures no fence. captured_physical_version is null until an observation is saved for the line; saving captures the submitted expected_physical_version, including zero.

  3. Save the observations#

    PATCH /v1/inventory-counts/{inventory_count_id} with the count's current expected_version and the complete observation set: every item exactly once, each with counted_on_hand_quantity and the physical_version you read as expected_physical_version. Leave out a condition quantity you didn't count, and Flint keeps the expected one; send 0 only when you counted none.

  4. Apply or cancel#

    POST /v1/inventory-counts/{inventory_count_id}/apply sets the levels to the counted quantities. POST /v1/inventory-counts/{inventory_count_id}/cancel closes the count without changing stock.

status on inventory count
Final values do not change again
  • draft
    Open for observations. supported_actions lists cancel, and apply once every line has an observation.
  • appliedFinal
    The differences became count_applied movements. Each line reports on_hand_variance, quality_control_variance, damaged_variance, and quarantined_variance instead of the expected quantities.
  • canceledFinal
    Closed 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.

ProblemResponse
An observation's fence is stale when you save409 VERSION_CONFLICT with param observations[i].expected_physical_version. Nothing is saved.
A saved observation went stale before you apply409 VERSION_CONFLICT with no param. Nothing is applied, and the count stays a draft.
A stale count expected_version409 VERSION_CONFLICT with param expected_version and details[0].resource_type inventory_count.
apply before every line has an observation409 ACTION_NOT_ALLOWED with reason status_not_reached.
Any action on an applied or canceled count409 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:

ActionLine targetEffectListed while
departtarget_departed_quantityTakes stock off the origin and adds it to the destination's incoming_quantityA line has quantity not yet departed or canceled
receivetarget_received_quantityPuts in-transit stock on hand at the destinationA line has quantity in transit
return_to_origintarget_returned_quantityPuts in-transit stock back on hand at the originA line has quantity in transit
report_losstarget_lost_quantityRecords in-transit stock as lostA line has quantity in transit
canceltarget_canceled_quantityCancels quantity that hasn't departedA 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].

Transfer statusStartFinal
  • 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 transfer
Final values do not change again
  • draft
    Nothing has departed yet.
  • in_transit
    Some stock has departed, and none has been received, returned, or lost yet.
  • partially_resolved
    Some departed stock has been received, returned, or lost, and quantity is still in transit or not yet departed.
  • closedFinal
    Every requested unit was departed and resolved, or canceled. closed_reason is received, canceled, received_with_cancellation, returned, lost, or mixed.

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, stored condition, and the requested_quantity you 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.

ProblemResponse
A line with departed or canceled quantity left out409 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 changed409 ACTION_NOT_ALLOWED with reason field_locked at that indexed field
requested_quantity below the canceled quantity409 LIMIT_EXCEEDED at that indexed field, with minimum_quantity in the detail
A line's inventory_item_id or condition changed400 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_version400 INVALID_REQUEST
An inventory_transfer_line_id that isn't on this transfer404 RESOURCE_NOT_FOUND at lines[i].inventory_transfer_line_id
A closed transfer409 ACTION_NOT_ALLOWED

Retries and concurrency#

Idempotency keys#

RoutesIdempotency-Key
POST /v1/inventory-adjustments, POST /v1/inventory-receipts, POST /v1/inventory-reservationsRequired, because each run moves stock again. A request without the header returns 400 INVALID_REQUEST with details[0].param Idempotency-Key.
Every other inventory writeOptional. 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:

CounterAdvances whenUse it for
versionAny quantity or claim changes, including each hold, commit, and releaseexpected_version on the level PATCH
physical_versionOn-hand or a condition quantity changesexpected_physical_version on counted and correction adjustment lines and on count observations
claim_versionHeld, committed, or backordered quantity changesTelling 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:

Commandinactive Locationarchived Locationactive, with inventory_allocation_enabled: false
Physical: adjustments, counts, transfers, receipts, safety stockAcceptedunsupported_stateAccepted
Routing: reservations, allocation policies, fixed_location sourcesunsupported_stateunsupported_stateconfiguration_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 typesource_reference.resource_typeresource_id
adjustmentinventory_adjustmentThe adjustment
count_appliedinventory_countThe count
return_receivedinventory_receiptThe receipt, not one of its lines
transfer_departed, transfer_received, transfer_returned, transfer_lostinventory_transferThe transfer
safety_stock_changeinventory_levelThe level
reservation_held, reservation_committed, reservation_consumed, reservation_hold_released, reservation_commitment_released, reservation_expired, reservation_reallocated_in, reservation_reallocated_outinventory_reservationThe reservation whose claim changed
reservation_consumed and reservation_commitment_released, when a fulfillment handed off or canceled the goodsfulfillmentThe 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
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 requestcreated_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 dispositionsnull

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.

FieldRule
source_system.typemanual, pos, wms, erp, or other. Events Flint records itself return flint, which requests can't send.
source_system.external_source_idRequired for pos, wms, erp, and other; not allowed for manual. At most 255 Unicode code points.
occurred_atRequired 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_idOptional. 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:

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:

FactMeaning
demand_keyAn opaque key for the demand. Don't parse it to find a line or item.
inventory_item_idThe item whose stock is short. Omitted for buyer credentials.
requested_quantityThe quantity the demand needs.
available_quantityThe quantity eligible stock can supply.
shortage_quantityThe part of the requested quantity eligible stock can't supply.
order_idThe order that owns order_line_item_id.
order_line_item_idThe order line, when the demand belongs to one.
bundle_component_idThe bundle component, when the demand belongs to one.
inventory_reservation_line_idThe 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.

  • HTTP 409
    Stock can't cover the demand, or a command would take a quantity below zero. details[0].reason location_ineligible or location_limit names a routing constraint. Replenish, release a claim, widen the routing, or reduce the quantity.
  • HTTP 409
    The resource's state or setup refuses the request. Branch on details[0].reason: configuration_required (set a routing source, or turn on inventory_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 from supported_actions, or the Location or policy status refuses it), or field_locked (a transfer line with history can't change).
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    An expected_version, expected_physical_version, or source_observation_sequence is stale, named in param, or a persistence race happened, with no param. Re-read, then rebuild the request with a new Idempotency-Key. For a stale sequence, drop the observation.
  • HTTP 409
    CONCURRENT_MODIFICATIONRetry the same request
    Other writes kept changing the same stock and nothing changed. Send the same request again with the same Idempotency-Key.
  • HTTP 409
    The owner.key already has an active reservation, named in details[0].current_resource.
  • HTTP 409
    A quantity is outside what the resource allows, such as a transfer line below its canceled quantity. param names the field, with available_quantity or minimum_quantity in the detail.
  • HTTP 409
    An item or policy still has stock, claims, or open records, so it can't become inactive or archived.
  • HTTP 403
    The reservation belongs to an order, with details[0].reason owner_workflow_required. Only the order's payment and fulfillment change it.
  • HTTP 400
    The request is malformed, such as a missing Idempotency-Key on a stock command, another action's target, or a broken provenance rule. param names the field, and details[0].code says what's wrong.
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

backorderobjectRequired

Backorder settings shared by every variant using this inventory item.

barcodestring

Optional searchable barcode.

created_atstringRequired

Time the inventory item was created.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

inventory_item_idstringRequired

Stable inventory item ID.

metadatamap of stringRequired

Caller-owned metadata.

namestringRequired

Merchant-facing inventory item name.

skustring

Optional searchable stock-keeping unit.

statusenumRequired

Current inventory item lifecycle status.

  • active
  • inactive
  • archived
updated_atstringRequired

Time the inventory item last changed.

versionintegerRequired

Optimistic-concurrency version for item writes.

JSON
{
  "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_atstringRequired

RFC3339 timestamp.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

idempotency_keystring or nullRequired

The 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_idstringRequired

Unique identifier for this inventory adjustment, prefixed `invadj_`.

linesarray of objectRequired

Stock changes, one for each inventory item and Location, from 1 to 100 lines.

notestring

Free-text note explaining the change. Required when `reason` is `correction`.

occurred_atstringRequired

RFC3339 timestamp.

reasonenumRequired

Why the stock changed. It decides which fields each line takes.

  • received
  • returned
  • sold
  • theft
  • loss
  • condition_changed
  • counted
  • correction
source_systemobject or nullRequired

System the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.

JSON
{
  "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

configurationobjectRequired

Routing rules: ranked groups of Locations, whether demand can be split, and the most Locations one assignment may use.

created_atstringRequired

RFC3339 timestamp.

current_inventory_allocation_policy_revision_idstringRequired

The immutable revision containing this policy's current routing configuration. Replacing configuration publishes a new revision; other policy edits keep this ID.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

inventory_allocation_policy_idstringRequired

ID of the policy this revision belongs to.

metadatamap of stringRequired

Stored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.

namestringRequired

Merchant-facing policy name.

statusenumRequired

Current allocation policy status.

  • active
  • inactive
  • archived
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "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_atstring

RFC3339 timestamp.

created_atstringRequired

RFC3339 timestamp.

idempotency_keystring or nullRequired

The 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_idstringRequired

Unique identifier for this inventory count, prefixed `invc_`.

linesarray of objectRequired

Count lines, one for each inventory item being counted.

location_idstringRequired

ID of the Location whose stock is counted.

observation_provenanceobject

Source system, actor, and time reported with the count's observations.

statusenumRequired

Whether the count is still open. Applying or canceling a `draft` count ends it.

  • draft
  • applied
  • canceled
supported_actionsarray of enumRequired

Actions 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.

  • apply
  • cancel
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "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_quantityintegerRequired

Derived 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_quantityintegerRequired

Whole-number quantity; fractional quantities are not supported.

claim_versionintegerRequired

Advances only when held, committed, or backordered quantities change.

committed_quantityintegerRequired

Units promised to accepted orders. Still physically present until fulfillment consumes them. Whole-number quantity; fractional quantities are not supported.

created_atstringRequired

RFC3339 timestamp.

damaged_quantityintegerRequired

On-hand units known to be damaged. Not sellable. Whole-number quantity; fractional quantities are not supported.

held_quantityintegerRequired

Units claimed by an open reservation that has not been committed. Whole-number quantity; fractional quantities are not supported.

incoming_quantityintegerRequired

Units recorded as inbound but not yet on hand. Does not count toward availability. Whole-number quantity; fractional quantities are not supported.

inventory_itemobject

The inventory item this level belongs to. Present only when the list request asked for expand=inventory_item.

inventory_item_idstringRequired

ID of the inventory item the stock is for.

inventory_level_idstringRequired

Unique identifier for this inventory level, prefixed `invl_`.

location_idstringRequired

ID of the Location that holds the stock.

on_hand_quantityintegerRequired

Units physically present at the Location, in any condition. Whole-number quantity; fractional quantities are not supported.

physical_versionintegerRequired

Advances only when on-hand or condition quantities change.

quality_control_quantityintegerRequired

On-hand units awaiting inspection. Not sellable. Whole-number quantity; fractional quantities are not supported.

quarantined_quantityintegerRequired

On-hand units isolated for review. Not sellable. Whole-number quantity; fractional quantities are not supported.

safety_stock_quantityintegerRequired

Buffer withheld from allocation. Change it with PATCH /v1/inventory-levels/{inventory_level_id}. Whole-number quantity; fractional quantities are not supported.

shortage_quantityintegerRequired

Derived: 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_quantityintegerRequired

Derived: quality_control + damaged + quarantined. Whole-number quantity; fractional quantities are not supported.

updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Changes 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.

JSON
{
  "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_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

committed_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

created_atstringRequired

RFC3339 timestamp.

created_byobject or nullRequired

The credential that recorded this movement. `null` when Flint recorded it on its own, such as an expired hold or a fulfillment handoff.

damaged_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

held_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

idempotency_keystring or nullRequired

The 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_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

inventory_itemobject

The inventory item this movement is about. Present only when the list request asked for expand=inventory_item.

inventory_item_idstringRequired

ID of the inventory item the stock is for.

inventory_level_claim_versionintegerRequired

Claim version of the inventory level after this movement. Advances when held or committed quantities change.

inventory_level_idstringRequired

ID of the inventory level this movement changed.

inventory_level_physical_versionintegerRequired

Physical version of the inventory level after this movement. Advances when on-hand or condition quantities change.

inventory_level_versionintegerRequired

Version of the inventory level after this movement.

inventory_movement_idstringRequired

Unique identifier for this inventory movement, prefixed `invm_`.

location_idstringRequired

ID of the Location that holds the stock.

notestring

Note recorded with the command that wrote this movement. Absent when it had none.

occurred_atstringRequired

RFC3339 timestamp.

on_hand_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

quality_control_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

quarantined_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

reasonenum

The adjustment's reason. Present only on adjustment movements; other movement types already describe what happened.

  • received
  • returned
  • sold
  • theft
  • loss
  • condition_changed
  • counted
  • correction
resulting_inventory_levelobjectRequired

The inventory level as it stood after this movement.

return_disposition_idstring

ID of the Return disposition whose receipt wrote this movement. Absent on other movements.

return_idstring

ID of the Return whose receipt wrote this movement. Absent on other movements.

safety_stock_quantity_deltaintegerRequired

Whole-number quantity; fractional quantities are not supported.

source_observation_sequenceinteger

Sequence of the observation in your source system that wrote this movement. Absent when no sequence was sent.

source_referenceobjectRequired

The GET-able resource whose write recorded this movement.

source_systemobject or nullRequired

System the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.

typeenumRequired

What caused this movement.

  • adjustment
  • count_applied
  • reservation_consumed
  • reservation_committed
  • reservation_commitment_released
  • reservation_expired
  • reservation_held
  • reservation_hold_released
  • reservation_reallocated_in
  • reservation_reallocated_out
  • return_received
  • safety_stock_change
  • transfer_departed
  • transfer_received
  • transfer_returned
  • transfer_lost
JSON
{
  "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_atstringRequired

RFC3339 timestamp.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

idempotency_keystring or nullRequired

The 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_idstringRequired

Unique identifier for this inventory receipt, prefixed `invrec_`.

linesarray of objectRequired

Received lines, each with the item, receiving Location, quantity, and disposition.

occurred_atstringRequired

RFC3339 timestamp.

return_disposition_idstring

ID of the Return disposition this receipt records. Absent when the receipt isn't linked to a Return.

return_idstring

ID of the Return these units came back on. Absent when the receipt isn't linked to a Return.

source_systemobject or nullRequired

System the change came from, such as a point-of-sale or warehouse system. `null` when the request named no source system.

JSON
{
  "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 null

How 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.

  • consumed
  • released
  • expired
  • reallocated
  • adopted
  • mixed
  • null
created_atstringRequired

RFC3339 timestamp.

expires_atstring or nullRequired

Deadline 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 nullRequired

The 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_requiredobject

Present when the claim needs a merchant action before commerce can continue.

inventory_reservation_idstringRequired

Unique identifier for this inventory reservation, prefixed `invr_`.

inventory_routing_sourceobjectRequired

How Flint chooses the Locations that serve the reservation: one fixed Location, an allocation policy, or a specific policy revision.

linesarray of objectRequired

Allocations of the reserved stock, one for each item and Location.

ownerone ofRequired

Who holds the reservation: a `key` you choose, or an order Flint holds the stock for.

replacement_inventory_reservation_idstring

Set 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_idstring

Set 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.

statusenumRequired

active while any held, committed, or backordered quantity remains; closed once none does.

  • active
  • closed
supported_actionsarray of enumRequired

Actions 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.

  • commit
  • consume
  • release
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

The reservation version. Send it as expected_version to reject a write if the reservation changed.

JSON
{
  "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_atstring

RFC3339 timestamp.

closed_reasonenum or null

How the transfer ended. `null` when the transfer isn't closed.

  • received
  • canceled
  • received_with_cancellation
  • returned
  • lost
  • mixed
  • null
created_atstringRequired

RFC3339 timestamp.

departed_atstring

RFC3339 timestamp.

destination_location_idstringRequired

ID of the Location the stock goes to.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

idempotency_keystring or nullRequired

The 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_idstringRequired

Unique identifier for this inventory transfer, prefixed `invtr_`.

linesarray of objectRequired

Owned collection of transfer lines. Lines have no lifecycle outside this transfer; PATCH replaces the full collection.

notestring

Free-text note about the transfer.

origin_location_idstringRequired

ID of the Location the stock leaves.

received_atstring

RFC3339 timestamp.

statusenumRequired

Where the transfer stands, worked out from the quantities that have left the origin and have since been received, returned, or reported lost.

  • draft
  • in_transit
  • partially_resolved
  • closed
supported_actionsarray of enumRequired

Actions 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.

  • depart
  • receive
  • return_to_origin
  • report_loss
  • cancel
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "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#

GET/v1/inventory-adjustments

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by inventory item.

location_idstring

Filter by Location.

reasonarray of enum

Filter 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.

  • received
  • returned
  • sold
  • theft
  • loss
  • condition_changed
  • counted
  • correction
idempotency_keystring

Filter 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 enum

Filter 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.

  • manual
  • pos
  • wms
  • erp
  • flint
  • other
external_source_idstring

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Inclusive lower bound on occurred_at.

occurred_beforestring

Exclusive upper bound on occurred_at.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-adjustmentsKey required

Requires 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_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

linesarray of objectRequired

Stock changes, one for each inventory item and Location, from 1 to 100 lines.

notestring

Free-text note explaining the change. Required when `reason` is `correction`.

occurred_atstring

When the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.

reasonenumRequired

Why the stock changed. It decides which fields each line takes.

  • received
  • returned
  • sold
  • theft
  • loss
source_systemobject

System the change came from, such as a point-of-sale or warehouse system.

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/v1/inventory-allocation-policies

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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 enum

Filter 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.

  • active
  • inactive
  • archived
external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search allocation policy ID, external reference ID, or name.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-allocation-policiesIdempotent

Requires 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

configurationobjectRequired

Routing rules: ranked groups of Locations, whether demand can be split, and the most Locations one assignment may use.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

metadatamap of string

Caller-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.

namestringRequired

Merchant-facing policy name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

statusenum

Status the allocation policy starts in. Defaults to `active`.

  • active
  • inactive

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

Response · 200

Successful response.

Same response as Create inventory allocation policy.

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.

JSON
{
  "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#

PATCH/v1/inventory-allocation-policies/{inventory_allocation_policy_id}Idempotent

Requires 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_idstringRequired

Flint 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

configurationobject

Requires expected_version.

expected_versioninteger

Required when any of these fields is present: configuration.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Send null to clear it.

metadatamap of string or null

Caller-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.

namestring

Merchant-facing policy name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

statusenum

New status for the allocation policy. Omit it to leave the status unchanged.

  • active
  • inactive

Response · 200

Successful response.

Same response as Create inventory allocation policy.

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#

DELETE/v1/inventory-allocation-policies/{inventory_allocation_policy_id}Idempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Current resource version used as a concurrency fence.

Response · 200

Successful response.

Same response as Create inventory allocation policy.

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#

GET/v1/inventory-allocation-policies/{inventory_allocation_policy_id}/revisions

Requires 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_idstringRequired

Flint 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/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_idstringRequired

Flint 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_idstringRequired

Flint 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/v1/inventory-counts

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by a counted inventory item.

location_idstring

Filter by Location.

statusarray of enum

Filter 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.

  • draft
  • applied
  • canceled
idempotency_keystring

Filter 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_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

applied_afterstring

Inclusive lower bound on applied_at.

applied_beforestring

Exclusive upper bound on applied_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-countsIdempotent

Requires 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 stringRequired

IDs of the inventory items to count at the Location, from 1 to 100.

location_idstringRequired

ID of the Location whose stock is counted.

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

Response · 200

Successful response.

Same response as Create inventory count.

curl https://api.withflintpay.com/v1/inventory-counts/invc_01KEZF7C00B47NXRE3ET37QQ59 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Successful response.

JSON
{
  "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#

PATCH/v1/inventory-counts/{inventory_count_id}Idempotent

Requires 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_idstringRequired

Flint 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_versionintegerRequired

Version 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_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

observationsarray of objectRequired

Complete 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_atstring

When the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.

source_systemobject

System the change came from, such as a point-of-sale or warehouse system.

Response · 200

Successful response.

Same response as Create inventory count.

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#

POST/v1/inventory-counts/{inventory_count_id}/applyIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Optional resource version the caller last read. Enforced when sent.

Response · 200

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

POST/v1/inventory-counts/{inventory_count_id}/cancelIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Optional resource version the caller last read. Enforced when sent.

Response · 200

Successful response.

Same response as Apply inventory count.

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#

GET/v1/inventory-items

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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 enum

Filter 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.

  • active
  • inactive
  • archived
skustring

Filter by exact SKU.

barcodestring

Filter by exact barcode.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search inventory item ID, external reference ID, name, SKU, or barcode.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-itemsIdempotent

Requires 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

backorderobject

Backorder settings to apply to this inventory item.

barcodestring

Optional searchable barcode.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

metadatamap of string

Caller-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.

namestringRequired

Merchant-facing inventory item name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

skustring

Optional searchable stock-keeping unit.

statusenum

Status the inventory item starts in. Defaults to `active`.

  • active
  • inactive

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

Response · 200

Successful response.

Same response as Create inventory item.

curl https://api.withflintpay.com/v1/inventory-items/invi_01KEZF7C00A6YEM25MTHW2MPZY \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Successful response.

JSON
{
  "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#

PATCH/v1/inventory-items/{inventory_item_id}Idempotent

Requires 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_idstringRequired

Flint 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

backorderobject

Backorder settings to apply to this inventory item.

barcodestring or null

Send null to clear it.

expected_versioninteger

Version 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 null

Caller-owned identifier for this resource in an external system. Send null to clear it.

metadatamap of string or null

Caller-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.

namestring

Merchant-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 null

Send null to clear it.

statusenum

New status for the inventory item. Omit it to leave the status unchanged.

  • active
  • inactive

Response · 200

Successful response.

Same response as Create inventory item.

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#

DELETE/v1/inventory-items/{inventory_item_id}Idempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Current resource version used as a concurrency fence.

Response · 200

Successful response.

Same response as Create inventory item.

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#

GET/v1/inventory-levels

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by inventory item.

product_idstring

Filter by inventory items linked to the product's non-deleted variants. An item shared by several variants returns one level per Location.

location_idstring

Filter by Location.

inventory_item_statusarray of enum

Filter 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.

  • active
  • inactive
  • archived
has_available_quantityboolean

True selects levels with available quantity; false selects levels with zero available quantity. Omit for all levels.

has_unavailable_conditionboolean

True selects levels with unavailable physical stock; false selects levels with none. Omit for all levels.

has_shortageboolean

True selects levels with a shortage; false selects levels with none. Omit for all levels.

querystring

Search inventory item ID, name, SKU, or barcode. Case-insensitive substring match.

min_available_quantityinteger

Inclusive lower bound on available_quantity.

max_available_quantityinteger

Inclusive upper bound on available_quantity.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

expandarray of enum

Include 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 objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/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_idstringRequired

Flint 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 enum

Include 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

PATCH/v1/inventory-levels/{inventory_level_id}Idempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Version 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_quantityintegerRequired

Whole-number quantity; fractional quantities are not supported.

Response · 200

Successful response.

Same response as Get inventory level.

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#

GET/v1/inventory-movements

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by inventory item.

location_idstring

Filter by Location.

typearray of enum

Filter 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.

  • adjustment
  • count_applied
  • reservation_consumed
  • reservation_committed
  • reservation_commitment_released
  • reservation_expired
  • reservation_held
  • reservation_hold_released
  • reservation_reallocated_in
  • reservation_reallocated_out
  • return_received
  • safety_stock_change
  • transfer_departed
  • transfer_received
  • transfer_returned
  • transfer_lost
reasonarray of enum

Filter 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.

  • received
  • returned
  • sold
  • theft
  • loss
  • condition_changed
  • counted
  • correction
idempotency_keystring

Filter 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_idstring

Filter by the customer Return that produced the movement.

return_disposition_idstring

Filter by the Return disposition that produced the movement.

sort_directionenum

Sort direction. Defaults to asc.

  • asc
  • desc
expandarray of enum

Include 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 enum

Filter 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.

  • manual
  • pos
  • wms
  • erp
  • flint
  • other
external_source_idstring

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Inclusive lower bound on occurred_at.

occurred_beforestring

Exclusive upper bound on occurred_at.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

source_reference_typearray of enum

Filter 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.

  • fulfillment
  • inventory_adjustment
  • inventory_count
  • inventory_level
  • inventory_receipt
  • inventory_reservation
  • inventory_transfer
source_reference_idstring

Filter by source_reference.resource_id.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/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_idstringRequired

Flint 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 enum

Include 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/v1/inventory-receipts

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by inventory item.

receiving_location_idstring

Filter by receiving Location.

inventory_reservation_idstring

Filter by source reservation.

return_idstring

Filter by the customer Return that produced the receipt.

return_disposition_idstring

Filter by the Return disposition that produced the receipt.

idempotency_keystring

Filter 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 enum

Filter 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.

  • manual
  • pos
  • wms
  • erp
  • flint
  • other
external_source_idstring

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Inclusive lower bound on occurred_at.

occurred_beforestring

Exclusive upper bound on occurred_at.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-receiptsKey required

Requires 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_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

linesarray of objectRequired

Received lines, each with the item, receiving Location, quantity, and disposition.

occurred_atstring

When the event occurred, at most 5 minutes in the future. Required when source_system.type is pos, wms, erp, or other.

source_systemobject

System the change came from, such as a point-of-sale or warehouse system.

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/v1/inventory-reservations

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by an inventory item on a reservation line.

location_idstring

Filter by a location on a reservation line. Combined with inventory_item_id, the same line must match both.

order_idstring

Filter by the reservation's resolved owner order.

statusarray of enum

Filter 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.

  • active
  • closed
owner_typearray of enum

Filter 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.

  • merchant
  • order
owner_keystring

Filter merchant-owned reservations by exact owner key. Combined with owner_type=order, returns an empty page.

idempotency_keystring

Filter 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_quantityboolean

True selects reservations with at-risk quantity; false selects reservations with none on any line. Omit for all reservations.

closed_reasonarray of enum

Filter 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.

  • consumed
  • released
  • expired
  • reallocated
  • mixed
  • adopted
expires_afterstring

Inclusive lower bound on expires_at.

expires_beforestring

Exclusive upper bound on expires_at.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-reservationsKey required

Requires 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 objectRequired

Items and quantities to reserve.

expires_atstring

Hold deadline, after now and at most 24 hours from now. Defaults to 15 minutes after creation.

inventory_routing_sourceone of

How 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`.

ownerobjectRequired

Who holds the reservation: a `key` you choose, or an order Flint holds the stock for.

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

PATCH/v1/inventory-reservations/{inventory_reservation_id}Idempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Version 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_atstringRequired

New hold deadline: after now and at most 24 hours from now. It can be earlier or later than the current deadline.

Response · 200

Successful response.

Same response as Get inventory reservation.

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#

POST/v1/inventory-reservations/{inventory_reservation_id}/commitIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Optional resource version the caller last read. Enforced when sent.

linesarray of objectRequired

Reservation lines this action changes, each with a cumulative target. 1 to 100 lines.

Response · 200

Successful response.

Same response as Create inventory reservation.

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#

POST/v1/inventory-reservations/{inventory_reservation_id}/consumeIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Optional resource version the caller last read. Enforced when sent.

linesarray of objectRequired

Reservation lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When and where the physical handoff happened. When omitted, occurred_at is the command receipt time and source_system is null.

Response · 200

Successful response.

Same response as Create inventory reservation.

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#

POST/v1/inventory-reservations/{inventory_reservation_id}/releaseIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Optional resource version the caller last read. Enforced when sent.

linesarray of any ofRequired

Reservation lines this action changes, each with a cumulative target. 1 to 100 lines.

Response · 200

Successful response.

Same response as Create inventory reservation.

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#

GET/v1/inventory-transfers

Requires 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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_idstring

Filter by inventory item.

origin_location_idstring

Filter by origin Location.

destination_location_idstring

Filter by destination Location.

statusarray of enum

Filter 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.

  • draft
  • in_transit
  • partially_resolved
  • closed
idempotency_keystring

Filter 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_idstring

Exact, case-sensitive match on the caller-owned external reference ID. Must contain 1 to 255 characters.

querystring

Search by inventory_transfer_id, external_reference_id, or note.

closed_reasonarray of enum

Filter 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.

  • received
  • canceled
  • received_with_cancellation
  • returned
  • lost
  • mixed
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

departed_afterstring

Inclusive lower bound on departed_at.

departed_beforestring

Exclusive upper bound on departed_at.

received_afterstring

Inclusive lower bound on received_at.

received_beforestring

Exclusive upper bound on received_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/inventory-transfersIdempotent

Requires 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_idstringRequired

ID of the Location the stock goes to.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

linesarray of objectRequired

Items to transfer, from 1 to 100 lines.

notestring

Free-text note about the transfer.

origin_location_idstringRequired

ID of the Location the stock leaves.

Response · 201

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

GET/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_idstringRequired

Flint 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.

Response · 200

Successful response.

Same response as Create inventory transfer.

curl https://api.withflintpay.com/v1/inventory-transfers/invtr_01KEZF7C00HKPTX1QRZ8Y1M6BP \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Successful response.

JSON
{
  "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#

PATCH/v1/inventory-transfers/{inventory_transfer_id}Idempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Required when any of these fields is present: lines.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Send null to clear it.

linesarray of object

Replace 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 null

Send null to clear it.

Response · 200

Successful response.

Same response as Create inventory transfer.

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#

POST/v1/inventory-transfers/{inventory_transfer_id}/cancelIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Transfer version the caller last read.

linesarray of objectRequired

Transfer lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When 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.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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#

POST/v1/inventory-transfers/{inventory_transfer_id}/departIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Transfer version the caller last read.

linesarray of objectRequired

Transfer lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When 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.

Same response as Cancel inventory transfer.

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#

POST/v1/inventory-transfers/{inventory_transfer_id}/receiveIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Transfer version the caller last read.

linesarray of objectRequired

Transfer lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When 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.

Same response as Cancel inventory transfer.

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#

POST/v1/inventory-transfers/{inventory_transfer_id}/report-lossIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Transfer version the caller last read.

linesarray of objectRequired

Transfer lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When 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.

Same response as Cancel inventory transfer.

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#

POST/v1/inventory-transfers/{inventory_transfer_id}/return-to-originIdempotent

Requires 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_idstringRequired

Flint 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_versioninteger

Transfer version the caller last read.

linesarray of objectRequired

Transfer lines this action changes, each with a cumulative target. 1 to 100 lines.

provenanceobject

When 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.

Same response as Cancel inventory transfer.

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?