Inventory

Inventory tracks how much of a thing you have, where it is, and what is already promised to someone else.

Two resources carry the state. An inventory item is the thing you stock; a catalog variant points at one rather than carrying its own counter, so the same physical stock can back several sellable products. An inventory level is one inventory item at one Location, and it carries the quantities. Every other resource here either changes a level or explains a change.

New to this surface? The Inventory guide walks one item from first stock through a paid, fulfilled order.

Quantity states#

A level does not have a single count. It has physical stock, claims against that stock, and a derived number you can still sell.

QuantityMeaning
on_hand_quantityPhysically present, in any condition
quality_control_quantity, damaged_quantity, quarantined_quantityPresent but not sellable
held_quantityClaimed by an open reservation, not yet paid
committed_quantityClaimed and confirmed, not yet shipped
safety_stock_quantityDeliberately withheld from sale
available_quantityDerived: what you can still sell
shortage_quantityDerived: claims exceeding sellable stock

available_quantity and shortage_quantity are computed, never written. You change stock by recording what happened, and Flint derives the rest.

Committed stock is still physically present. It leaves on_hand_quantity only when fulfillment consumes it, which is why canceling before shipment restores availability without any physical movement.

The three write semantics#

Every command that changes a quantity uses exactly one semantic, and its field names tell you which:

  • Relative delta (*_quantity_delta) for adjustments. "Twenty-five more arrived."
  • Absolute value (safety_stock_quantity) for safety stock. "Keep five units unavailable for sale."
  • Cumulative target (target_*_quantity) for reservation and transfer transitions. "Two of these should be committed or received by now."

Cumulative targets converge: resending a target you already applied succeeds and changes nothing. A bare quantity field never appears on a converging transition, so a target can't be mistaken for a delta.

What a quantity command returns#

Every command that changes a quantity returns an operation-specific result object with the same effect fields: the echoed idempotency_key, the inventory_movement_ids it produced, and resulting_inventory_levels, a complete post-commit projection of every level it touched. Commands backed by a resource also include that created or updated resource under its documented field. You do not need a follow-up read to learn where the numbers landed, and a replay returns the levels as of the original command rather than whatever they are now.

Inventory list page_token values are opaque and bound to the route and filters that produced them. Reuse the token unchanged with the same filters; changing a filter requires starting from the first page. Scalar filters accept one value, not repeated or comma-joined alternatives.

Durable inventory commands require idempotency#

Inventory commands that create durable workflow state or can change a quantity reject a request with no Idempotency-Key, returning 400 IDEMPOTENCY_KEY_REQUIRED. This includes quantity commands, the full count workflow, and transfer creation and transitions. Flint will not generate a key for you, because a key created after the request arrives cannot protect a retry when the first response never reached you.

Keys are scoped to the authenticated merchant, environment, and endpoint. The request fingerprint includes the canonical request body. Reusing a key with identical input returns the original response, including the original level projections rather than current quantities. Reusing it with different input is a conflict. Flint retains the key for at least as long as the command's inventory effects. The response returns the key, and the relevant resource or movement list provides the recovery path after an unacknowledged request.

Concurrency#

Inventory PATCH requests require expected_version and reject a stale version rather than overwriting a concurrent change. Count apply and cancel requests and transfer transitions accept expected_version optionally and enforce it when present. Read an item or allocation policy by ID, or another inventory resource from its list operation, and send the version when you need the command to fail if the resource changed.

Reserving stock#

Creating, committing, consuming, and releasing inventory reservations requires commerce.inventory.write. Managing a Location's inventory settings requires commerce.inventory_locations.write, so you can grant stock operations without permission to change where orders ship from or buyers pick up.

POST /v1/inventory-reservations routes demand and holds stock in one atomic operation. You give it demand, a routing source, and an owner; it decides which Locations serve the demand and holds the quantity there. It is all or nothing: if the whole request cannot be satisfied, nothing is held and the response says what fell short.

The owner names what holds the stock (key, your own cart or session identifier) and when the claim lapses (expires_at, required, at most 15 minutes out). One active reservation is allowed per key. When the deadline passes, the remaining hold is released while committed and consumed quantity survive.

Held quantity moves forward through commit, then consume, and can leave through release. Consumed and released quantities are terminal; nothing returns to held. release names the bucket it drains (target_released_from_held_quantity or target_released_from_committed_quantity), so no priority rule decides for you.

Orders and checkout#

Selling through a Flint order does not require calling any of this yourself. Set inventory_routing_source on the order and Flint holds stock when payment begins, commits it when payment succeeds, releases it when payment fails, and consumes it when fulfillment hands the goods off. The order carries inventory_reservation_id for the claim.

An order with tracked line items and no routing source cannot hold stock: paying it returns INVENTORY_ROUTING_SOURCE_REQUIRED. If no location can serve the demand, payment fails with INVENTORY_UNAVAILABLE before money moves.

When payment succeeds but stock cannot be committed, the order reports inventory_exception_status: "paid_inventory_failed" and emits order.inventory_exception.created. Resolve it with POST /v1/orders/{order_id}/inventory-exception/resolve, or set post_payment_inventory_failure_action to auto_refund in settings to have Flint refund instead.

Reserve directly only when the cart lives outside Flint: your own storefront, a POS, or a system that holds stock before an order exists.

Routing across locations#

The routing source decides which Locations can serve demand, and every request that creates tracked demand carries exactly one:

  • {"type": "fixed_location", "location_id": "loc_..."} sends everything to one Location. Single-site merchants never need a policy.
  • {"type": "policy", "inventory_allocation_policy_id": "invp_..."} resolves the policy's current configuration when the request is made.
  • {"type": "policy_version", "inventory_allocation_policy_version_id": "invpv_..."} pins an immutable configuration snapshot already named by Flint evidence.

An allocation policy's configuration ranks Locations into priority groups. Send it when creating the policy or replace it with PATCH /v1/inventory-allocation-policies/{inventory_allocation_policy_id}. PATCH requires the current expected_version and commits the policy fields and configuration together.

Routing is deterministic and prefers to keep an order together:

  1. Eligible Locations are ordered by ascending group priority, then ascending location ID.
  2. If any single eligible Location can satisfy the whole request, it takes all of it.
  3. Otherwise, if splitting_behavior is split_when_required, Flint walks that same order and takes as much as each Location can serve, up to maximum_locations_per_assignment.

single_location fails instead of splitting. Per-demand and fulfillment constraints can narrow this further but never widen it: the effective rule is the intersection, so a line that must ship whole stays whole even under split_when_required.

Changing policy configuration affects future routing. Existing reservations and quotes keep the immutable snapshot they pinned.

When stock is promised but missing#

A loss, damage adjustment, or other physical correction can leave more claims than sellable stock. Flint does not pretend otherwise. It protects claims deterministically (committed before held, oldest first) and reports the remainder as at_risk_held_quantity and at_risk_committed_quantity on the reservation lines, alongside inventory.shortage.detected and inventory.reservation.at_risk events.

At-risk quantity cannot be consumed. The reservation exposes an inventory_action_required object naming the affected lines, and payment dispatch refuses to start against an at-risk hold rather than taking money it cannot honor. Replenish with an adjustment or release the affected claim before retrying commerce.

Operations#

Inventory items are managed with POST /v1/inventory-items, GET /v1/inventory-items, GET /v1/inventory-items/{inventory_item_id}, PATCH /v1/inventory-items/{inventory_item_id}, and DELETE /v1/inventory-items/{inventory_item_id}. These operations create, list, retrieve, update, and archive stock identities.

Inventory levels use GET /v1/inventory-levels to list current quantities and versions. Send expand=inventory_item to render each level's inventory item beside inventory_item_id, so a stock table does not need a read per row; the whole page resolves in one lookup. Filter the list with query, a case-insensitive substring match on the inventory item's name, SKU, and barcode that also matches an inventory item ID from its start (invi_01M2); with min_available_quantity and max_available_quantity, which are inclusive bounds on available_quantity; and with inventory_item_status, which accepts active, inactive, or archived. Only stock behind an active item can be routed or reserved, so inventory_item_status=active is the list of what you can sell. PATCH /v1/inventory-levels/{inventory_level_id} changes one level's safety stock using expected_version and safety_stock_quantity.

The ledger uses GET /v1/inventory-movements to list immutable quantity changes, oldest recorded first; send order=desc to read the newest first. It accepts the same expand=inventory_item the level list accepts, so a history table does not need a read per row. Adjustments use POST /v1/inventory-adjustments to record a physical correction and GET /v1/inventory-adjustments to list those commands.

Allocation policies use POST /v1/inventory-allocation-policies, GET /v1/inventory-allocation-policies, GET /v1/inventory-allocation-policies/{inventory_allocation_policy_id}, PATCH /v1/inventory-allocation-policies/{inventory_allocation_policy_id}, and DELETE /v1/inventory-allocation-policies/{inventory_allocation_policy_id} to create, list, retrieve, update, and archive routing rules.

Reservations use POST /v1/inventory-reservations to route and hold stock and GET /v1/inventory-reservations to list current and past claims. POST /v1/inventory-reservations/{inventory_reservation_id}/commit, POST /v1/inventory-reservations/{inventory_reservation_id}/consume, and POST /v1/inventory-reservations/{inventory_reservation_id}/release advance cumulative line targets.

Receipts use POST /v1/inventory-receipts to record returned stock and GET /v1/inventory-receipts to list receipt history.

Counts use POST /v1/inventory-counts to start a count and GET /v1/inventory-counts to list counts. PATCH /v1/inventory-counts/{inventory_count_id} atomically replaces the observation set using expected_version. POST /v1/inventory-counts/{inventory_count_id}/apply turns the differences into movements, while POST /v1/inventory-counts/{inventory_count_id}/cancel closes the count without changing stock. While a count is unapplied, every line carries expected_on_hand_quantity, expected_quality_control_quantity, expected_damaged_quantity, and expected_quarantined_quantity: the quantities Flint holds for that item at that location right now, so a counting screen can show what it expects before anyone writes a number down. Applying the count sets the level to the counted quantities, and the apply is rejected if the level changed since the line was captured. An applied line drops the expected quantities and reports on_hand_variance, quality_control_variance, damaged_variance, and quarantined_variance: the difference the apply made. A canceled count reports neither.

Transfers use POST /v1/inventory-transfers to create a transfer, GET /v1/inventory-transfers to list transfers, and PATCH /v1/inventory-transfers/{inventory_transfer_id} to edit an open transfer. POST /v1/inventory-transfers/{inventory_transfer_id}/transitions accepts one of the actions in the transfer's supported_actions: depart, receive, return_to_origin, report_loss, or cancel. Each line sends a cumulative target for the selected action. An unavailable action returns 409 INVENTORY_TRANSFER_ACTION_NOT_ALLOWED with the current transfer status, version, and supported actions.

Retrieve items and allocation policies#

Use GET /v1/inventory-items/{inventory_item_id} when you have an item ID from a catalog variant or past inventory operation. Use GET /v1/inventory-allocation-policies/{inventory_allocation_policy_id} to read a policy's current routing configuration and version before editing it. Both return the resource in data, with status and version, including when it is inactive or archived. An unknown ID or an ID belonging to another merchant or environment returns 404.

cURL
curl "https://api.withflintpay.com/v1/inventory-items/invi_01K0P7W6A4N9F3J2T8Q5R1C6XM" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl "https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01K0P7W6A4N9F3J2T8Q5R1C6XM" \
  -H "Authorization: Bearer YOUR_API_KEY"

DELETE archives an item or allocation policy. You can still retrieve it by ID, but the default list includes only active and inactive resources. Send status=archived to list archived resources:

cURL
curl "https://api.withflintpay.com/v1/inventory-items?status=archived" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl "https://api.withflintpay.com/v1/inventory-allocation-policies?status=archived" \
  -H "Authorization: Bearer YOUR_API_KEY"

Everything else is an explanation#

Adjustments and reservation transitions ensure that every change to a level has a durable reason attached. Each one produces inventory movements, an append-only record of what changed and what the level looked like afterward. When a number is wrong, the movement history is how you find out why, which is why physical commands carry occurred_at and source-system provenance: the moment stock moved, not the moment your system got around to telling us.

The Inventory object#

Every field on an inventory, as returned by retrieve and carried by the endpoints below.

Attributes

configurationobjectRequired
created_atstringRequired

RFC3339 timestamp.

external_reference_idstring

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

inventory_allocation_policy_idstringRequired
metadatamap of stringRequired
namestringRequired
statusenumRequired
  • active
  • inactive
  • archived
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired
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",
  "inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
  "metadata": {},
  "name": "US retail routing",
  "status": "active",
  "updated_at": "2026-06-01T10:00:00Z",
  "version": 2
}

List inventory adjustments#

GET/v1/inventory-adjustments

Requires scope commerce.inventory.read or commerce.inventory.write

List inventory adjustments.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

inventory_item_idstring

Filter by inventory item.

location_idstring

Filter by Location.

reasonenum

Filter by adjustment reason.

  • received_stock
  • damage
  • condition_changed
  • theft
  • loss
  • manual_correction
  • other
idempotency_keystring

Recover an adjustment by idempotency key.

source_system_typeenum

Filter by source-system type.

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

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Lower bound for occurred_at.

occurred_beforestring

Upper bound for occurred_at.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-adjustments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-07-21T14:18:04Z",
      "external_actor_id": "receiver_204",
      "idempotency_key": "adjust-1",
      "inventory_adjustment_id": "invadj_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "lines": [
        {
          "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "on_hand_quantity_delta": 25
        }
      ],
      "note": "Receiving record 1842",
      "occurred_at": "2026-07-21T14:18:00Z",
      "reason": "received_stock",
      "source_system": {
        "external_source_id": "east-coast-wms",
        "type": "wms"
      }
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory adjustment#

POST/v1/inventory-adjustmentsIdempotent

Requires scope commerce.inventory.write

Record a physical stock change as signed deltas. Returns the created adjustment, its movement IDs, and the resulting level for every level touched.

Request body

external_actor_idstring
linesarray of objectRequired
notestring
occurred_atstring

RFC3339 timestamp.

reasonenumRequired
  • received_stock
  • damage
  • condition_changed
  • theft
  • loss
  • manual_correction
  • other
source_systemobject

Response · 201

dataobjectRequired
metaobject
request_idstring
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 '{
    "external_actor_id": "receiver_204",
    "lines": [
      {
        "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "on_hand_quantity_delta": 25
      }
    ],
    "note": "Receiving record 1842",
    "occurred_at": "2026-07-21T14:18:00Z",
    "reason": "received_stock",
    "source_system": {
      "external_source_id": "east-coast-wms",
      "type": "wms"
    }
  }'

List inventory allocation policies#

GET/v1/inventory-allocation-policies

Requires scope commerce.inventory.read or commerce.inventory.write

List allocation policies. Archived policies are excluded unless you filter by status archived.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

statusenum

Filter by policy status. Archived policies are excluded when omitted.

  • 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

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-allocation-policies \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
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",
      "inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "metadata": {},
      "name": "US retail routing",
      "status": "active",
      "updated_at": "2026-06-01T10:00:00Z",
      "version": 2
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory allocation policy#

POST/v1/inventory-allocation-policiesIdempotent

Requires scope commerce.inventory_policies.write

Create an allocation policy with its routing configuration.

Request body

configurationobjectRequired
external_reference_idstring

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

metadatamap of string
namestringRequired
statusenum
  • active
  • inactive

Response · 201

dataobjectRequired

Named, version-fenced rules that decide which Locations serve demand and in what order.

metaobject
request_idstring
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"
  }'
curl https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
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",
    "inventory_allocation_policy_id": "invp_01K0P7W6A4N9F3J2T8Q5R1C6XM",
    "metadata": {},
    "name": "US retail routing",
    "status": "active",
    "updated_at": "2026-06-01T10:00:00Z",
    "version": 2
  },
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Update inventory allocation policy#

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

Requires scope commerce.inventory_policies.write

Update policy fields, availability, or atomically replace its routing configuration. Send expected_version to reject concurrent changes.

Path parameters

inventory_allocation_policy_idstringRequired

Flint inventory allocation policy ID.

Request body

configurationobject
expected_versioninteger
external_reference_idstring or null

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

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 metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

namestring
statusenum
  • active
  • inactive

Response · 200

Same response as Create inventory allocation policy.

curl -X PATCH https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -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

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.

Query parameters

expected_versioninteger

Current resource version used as a concurrency fence.

Response · 200

Same response as Create inventory allocation policy.

curl -X DELETE https://api.withflintpay.com/v1/inventory-allocation-policies/invp_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

List inventory counts#

GET/v1/inventory-counts

Requires scope commerce.inventory.read or commerce.inventory.write

List inventory counts.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

inventory_item_idstring

Filter by a counted inventory item.

location_idstring

Filter by Location.

statusenum

Filter by count status.

  • draft
  • applied
  • canceled
idempotency_keystring

Recover a count by idempotency key.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

applied_afterstring

Lower bound for applied_at.

applied_beforestring

Upper bound for applied_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-counts \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-07-21T14:00:00Z",
      "idempotency_key": "count-1",
      "inventory_count_id": "invc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "lines": [
        {
          "captured_physical_revision": 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",
          "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",
      "updated_at": "2026-07-21T14:16:04Z",
      "version": 2
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory count#

POST/v1/inventory-countsIdempotent

Requires scope commerce.inventory.write

Open a physical count for selected inventory items at one Location.

Request body

inventory_item_idsarray of stringRequired
location_idstringRequired

Response · 201

dataobjectRequired
metaobject
request_idstring
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": [
      "example"
    ],
    "location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX"
  }'

Update inventory count#

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

Requires scope commerce.inventory.write

Replace a count's observations atomically. Send expected_version to reject concurrent changes.

Path parameters

inventory_count_idstringRequired

Flint inventory count ID.

Request body

expected_versioninteger
external_actor_idstring
observationsarray of objectRequired
occurred_atstring

RFC3339 timestamp.

source_systemobject

Response · 200

Same response as Create inventory count.

curl -X PATCH https://api.withflintpay.com/v1/inventory-counts/invc_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -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,
        "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

Apply a completed physical count to inventory levels.

Path parameters

inventory_count_idstringRequired

Flint inventory count ID.

Request body

expected_versioninteger

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/inventory-counts/invc_01K0P7W6A4N9F3J2T8Q5R1C6XM/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 '{}'
curl -X POST https://api.withflintpay.com/v1/inventory-counts/invc_01K0P7W6A4N9F3J2T8Q5R1C6XM/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 '{}'

List inventory items#

GET/v1/inventory-items

Requires scope commerce.inventory.read or commerce.inventory.write

List inventory items. Archived items are excluded unless you filter by status archived.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

statusenum

Filter by inventory item status. Archived items are excluded when omitted.

  • 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

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-items \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "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
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory item#

POST/v1/inventory-itemsIdempotent

Requires scope commerce.inventory.write

Create an inventory item. SKU and barcode are searchable attributes, not identity: they are not required to be unique.

Request body

barcodestring
external_reference_idstring

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

metadatamap of string
namestringRequired
skustring
statusenum
  • active
  • inactive

Response · 201

dataobjectRequired

A stock-keeping unit that inventory quantities are tracked against. Catalog variants reference an inventory item rather than carrying their own counter.

metaobject
request_idstring
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"
  }'
curl https://api.withflintpay.com/v1/inventory-items/invi_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "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
  },
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Update inventory item#

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

Requires scope commerce.inventory.write

Update an inventory item. Accepts status active or inactive. Send sku or barcode as null to clear.

Path parameters

inventory_item_idstringRequired

Flint inventory item ID.

Request body

barcodestring or null
expected_versioninteger
external_reference_idstring or null

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

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 metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

namestring
skustring or null
statusenum
  • active
  • inactive

Response · 200

Same response as Create inventory item.

curl -X PATCH https://api.withflintpay.com/v1/inventory-items/invi_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -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)"
  }'
curl -X DELETE https://api.withflintpay.com/v1/inventory-items/invi_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -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

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.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

inventory_item_idstring

Filter by inventory item.

location_idstring

Filter by Location.

inventory_item_statusenum

Filter by the status of the inventory item the level belongs to. Only active items can be routed or reserved.

  • active
  • inactive
  • archived
has_available_quantityboolean

Only include levels with available quantity.

has_unavailable_conditionboolean

Only include levels with unavailable physical stock.

has_shortageboolean

Only include levels with a shortage.

querystring

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

min_available_quantityinteger

Inclusive lower bound for available_quantity.

max_available_quantityinteger

Inclusive upper bound for available_quantity.

updated_afterstring

Lower bound for updated_at.

updated_beforestring

Upper bound for updated_at.

expandarray of enum

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; path depth at most 2. Repeat expand, for example expand=inventory_item&expand=inventory_item, or pass one comma-separated value.

  • inventory_item

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-levels \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "available_quantity": 31,
      "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_claim_revision": 7,
      "inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "inventory_level_physical_revision": 9,
      "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "on_hand_quantity": 48,
      "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
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Update inventory level#

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

Requires scope commerce.inventory.write

Set one inventory level's safety_stock_quantity. Returns the updated level with durable command evidence.

Path parameters

inventory_level_idstringRequired

Flint inventory level ID.

Request body

expected_versioninteger
safety_stock_quantityintegerRequired

Whole-number quantity; fractional quantities are not supported.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X PATCH https://api.withflintpay.com/v1/inventory-levels/invl_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -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

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 order=desc to read the newest movements first.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

inventory_item_idstring

Filter by inventory item.

location_idstring

Filter by Location.

typestring

Filter by movement type.

reasonstring

Filter by movement reason.

idempotency_keystring

Recover movements by command idempotency key.

return_idstring

Filter by the customer Return that produced the movement.

return_disposition_idstring

Filter by the Return disposition that produced the movement.

orderenum

Order by when the movement was recorded, oldest first by default.

  • asc
  • desc
expandarray of enum

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; path depth at most 2. Repeat expand, for example expand=inventory_item&expand=inventory_item, or pass one comma-separated value.

  • inventory_item
source_system_typeenum

Filter by source-system type.

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

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Lower bound for occurred_at.

occurred_beforestring

Upper bound for occurred_at.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

source_reference_typestring

Filter by source-reference type.

source_reference_idstring

Filter by source-reference ID.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-movements \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-07-21T14:18:04Z",
      "created_by": "usr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "external_actor_id": "receiver_204",
      "idempotency_key": "adjust-1",
      "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "inventory_level_claim_revision": 7,
      "inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "inventory_level_physical_revision": 9,
      "inventory_level_revision": 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,
      "reason": "received_stock",
      "resulting_inventory_level": {
        "available_quantity": 31,
        "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_claim_revision": 7,
        "inventory_level_id": "invl_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "inventory_level_physical_revision": 9,
        "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "on_hand_quantity": 48,
        "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
      },
      "source_system": {
        "external_source_id": "east-coast-wms",
        "type": "wms"
      },
      "type": "adjustment"
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

List inventory receipts#

GET/v1/inventory-receipts

Requires scope commerce.inventory.read or commerce.inventory.write

List completed inventory receipt effects. Use typed Return filters for reconciliation when the receipt was created by Returns.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

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

Recover a receipt by command idempotency key.

source_system_typeenum

Filter by source-system type.

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

Filter by external source ID.

external_actor_idstring

Filter by external actor ID.

occurred_afterstring

Lower bound for occurred_at.

occurred_beforestring

Upper bound for occurred_at.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-receipts \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
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_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"
      }
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory receipt#

POST/v1/inventory-receiptsIdempotent

Requires scope commerce.inventory.write

Record a completed inventory receipt and disposition. This is a downstream stock effect, not the customer Return lifecycle.

Request body

external_actor_idstring
linesarray of objectRequired
occurred_atstring

RFC3339 timestamp.

source_systemobject

Response · 201

dataobjectRequired
metaobject
request_idstring
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",
        "quantity": 1,
        "receiving_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM"
      }
    ],
    "occurred_at": "2026-07-21T14:18:00Z",
    "source_system": {
      "external_source_id": "east-coast-wms",
      "type": "wms"
    }
  }'

List inventory reservations#

GET/v1/inventory-reservations

Requires scope commerce.inventory.read or commerce.inventory.write

List inventory reservations.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

statusenum

Filter by reservation status.

  • active
  • closed
owner_typeenum

Filter by owner type.

  • merchant
owner_keystring

Filter by exact owner key.

idempotency_keystring

Recover a reservation by idempotency key.

has_at_risk_quantityboolean

Only include reservations with at-risk quantity.

closed_reasonenum

Filter by how the reservation ended.

  • consumed
  • released
  • expired
  • reallocated
  • mixed
owner_expires_afterstring

Lower bound for the owner deadline.

owner_expires_beforestring

Upper bound for the owner deadline.

created_afterstring

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

updated_afterstring

Lower bound for updated_at.

updated_beforestring

Upper bound for updated_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-reservations \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-07-21T14:18:00Z",
      "idempotency_key": "cart-1842-hold",
      "inventory_reservation_id": "invr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "inventory_routing_source": {
        "inventory_allocation_policy_version_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "type": "policy_version"
      },
      "lines": [
        {
          "allocated_quantity": 3,
          "at_risk_committed_quantity": 0,
          "at_risk_held_quantity": 0,
          "committed_quantity": 2,
          "consumed_quantity": 0,
          "demand_key": "cart_line_1",
          "geography_revision": 2,
          "held_quantity": 1,
          "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "reallocated_quantity": 0,
          "released_from_committed_quantity": 0,
          "released_from_held_quantity": 0
        }
      ],
      "owner": {
        "expires_at": "2026-07-21T14:33:00Z",
        "key": "cart_1842",
        "type": "merchant"
      },
      "status": "active",
      "updated_at": "2026-07-21T14:21:00Z",
      "version": 4
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory reservation#

POST/v1/inventory-reservationsIdempotent

Requires scope commerce.inventory.write

Route standalone merchant demand and hold stock in one atomic command. A provisional hold lasts at most 15 minutes.

Request body

assignmentsarray of object
demandsarray of objectRequired
destination_fingerprintstring
inventory_routing_sourceone ofRequired
ownerobjectRequired

Response · 201

dataobjectRequired
metaobject
request_idstring
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": [
      {
        "demand_key": "cart_line_1",
        "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "quantity": 2,
        "splitting_behavior": "single_location"
      }
    ],
    "inventory_routing_source": {
      "inventory_allocation_policy_version_id": "invpv_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "type": "policy_version"
    },
    "owner": {
      "expires_at": "2026-07-21T14:33:00Z",
      "key": "cart_1842",
      "type": "merchant"
    }
  }'

Commit inventory reservation#

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

Requires scope commerce.inventory.write

Move held quantity to committed. Lines carry cumulative targets, so resending an applied target is a successful no-op.

Path parameters

inventory_reservation_idstringRequired

Flint inventory reservation ID.

Request body

expected_versioninteger

Reservation version the caller last read.

linesarray of objectRequired

Response · 200

Same response as Create inventory reservation.

curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01K0P7W6A4N9F3J2T8Q5R1C6XM/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

Consume committed quantity, permanently removing it from stock. Cumulative targets; consumed quantity is terminal.

Path parameters

inventory_reservation_idstringRequired

Flint inventory reservation ID.

Request body

expected_versioninteger

Reservation version the caller last read.

linesarray of objectRequired
provenanceobjectRequired

When and where the physical handoff happened. Required on consume, rejected on commit and release.

Response · 200

Same response as Create inventory reservation.

curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01K0P7W6A4N9F3J2T8Q5R1C6XM/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": 5,
    "lines": [
      {
        "inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "target_consumed_quantity": 2
      }
    ],
    "provenance": {
      "occurred_at": "2026-07-21T15:40:00Z",
      "source_system": {
        "external_source_id": "east-coast-wms",
        "type": "wms"
      }
    }
  }'

Release inventory reservation#

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

Requires scope commerce.inventory.write

Release held or committed quantity back to available. Cumulative targets; released quantity is terminal.

Path parameters

inventory_reservation_idstringRequired

Flint inventory reservation ID.

Request body

expected_versioninteger

Reservation version the caller last read.

linesarray of objectRequired

Response · 200

Same response as Create inventory reservation.

curl -X POST https://api.withflintpay.com/v1/inventory-reservations/invr_01K0P7W6A4N9F3J2T8Q5R1C6XM/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 '{
    "expected_version": 4,
    "lines": [
      {
        "inventory_reservation_line_id": "invrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "target_released_from_held_quantity": 1
      }
    ]
  }'

List inventory transfers#

GET/v1/inventory-transfers

Requires scope commerce.inventory.read or commerce.inventory.write

List inventory transfers.

Query parameters

page_sizeinteger

Number of resources to return.

page_tokenstring

Stable cursor returned by the previous page.

inventory_item_idstring

Filter by inventory item.

origin_location_idstring

Filter by origin Location.

destination_location_idstring

Filter by destination Location.

statusenum

Filter by transfer status.

  • draft
  • in_transit
  • partially_resolved
  • closed
idempotency_keystring

Recover a transfer by idempotency key.

external_referencestring

Filter by caller-owned external reference.

querystring

Search by inventory transfer ID, external reference, or note.

closed_reasonenum

Filter by how the transfer ended.

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

Lower bound for created_at.

created_beforestring

Upper bound for created_at.

departed_afterstring

Lower bound for departed_at.

departed_beforestring

Upper bound for departed_at.

received_afterstring

Lower bound for received_at.

received_beforestring

Upper bound for received_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/inventory-transfers \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-07-21T14:00:00Z",
      "destination_location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6YN",
      "external_reference": "wms-transfer-1842",
      "idempotency_key": "move-1",
      "inventory_transfer_id": "invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM",
      "lines": [
        {
          "canceled_quantity": 0,
          "departed_quantity": 0,
          "inventory_item_id": "invi_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
          "lost_quantity": 0,
          "physical_condition": "sellable",
          "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
    }
  ],
  "next_page_token": "",
  "request_id": "req_01K0P7W6A4N9F3J2T8Q5R1C6XM"
}

Create inventory transfer#

POST/v1/inventory-transfersIdempotent

Requires scope commerce.inventory.write

Create a planned stock transfer between two Locations.

Request body

destination_location_idstringRequired
external_referencestring
linesarray of objectRequired
notestring
origin_location_idstringRequired

Response · 201

dataobjectRequired
metaobject
request_idstring
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": "example",
    "lines": [
      {
        "inventory_item_id": "example",
        "requested_quantity": 1
      }
    ],
    "origin_location_id": "example"
  }'

Update inventory transfer#

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

Requires scope commerce.inventory.write

Update an open transfer's planning details.

Path parameters

inventory_transfer_idstringRequired

Flint inventory transfer ID.

Request body

expected_versioninteger
external_referencestring or null
line_changesarray of one of
notestring or null

Response · 200

Same response as Create inventory transfer.

curl -X PATCH https://api.withflintpay.com/v1/inventory-transfers/invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{}'

Transition inventory transfer#

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

Requires scope commerce.inventory.write

Run one action from supported_actions using cumulative line targets. Send expected_version to reject the request if the transfer changed after you read it. The response includes the updated transfer and its inventory effects.

Path parameters

inventory_transfer_idstringRequired

Flint inventory transfer ID.

Request body

Send exactly one of these

actionenumRequired
  • depart
expected_versioninteger

Transfer version the caller last read.

linesarray of objectRequired
provenanceobjectRequired

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/inventory-transfers/invtr_01K0P7W6A4N9F3J2T8Q5R1C6XM/transitions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "action": "depart",
    "expected_version": 2,
    "lines": [
      {
        "inventory_transfer_line_id": "invtrln_01K0P7W6A4N9F3J2T8Q5R1C6XM",
        "target_departed_quantity": 4
      }
    ],
    "provenance": {
      "source_system": {
        "type": "manual"
      }
    }
  }'

Was this helpful?