Documentation

Inventory sync

Master inventory, channel push, channel pull, and conflict resolution.

Inventory in Sales Channel has one source of truth — the master inventory in Storefront — and many copies, one per connected channel. The sync is bidirectional: pushes from master to channel keep listings accurate, pulls from channel to master detect off-platform changes, and reservations protect against overselling during a sale.

Master inventory

The master is keyed by SKU. Read and update it through the inventory sub-controller.

GET/sales-channel/inventory/:skuJWT
Get master inventory for a SKU.

curl https://appengine.appmint.io/sales-channel/inventory/SKU-100 \
  -H "Authorization: Bearer $JWT" -H "orgid: $ORG"

PUT/sales-channel/inventory/:skuJWT
Update master quantity.

curl -X PUT https://appengine.appmint.io/sales-channel/inventory/SKU-100 \
  -H "Authorization: Bearer $JWT" -H "orgid: $ORG" \
  -d '{"quantity": 42, "syncToChannels": true, "reason": "warehouse count"}'
FieldTypeDescription
quantity*number

The new on-hand quantity.

syncToChannelsboolean

If true, fan out to every connected channel after updating the master.

reasonstring

Audit string recorded in inventory history.

PUT/sales-channel/inventory/bulk/updateJWT
Bulk update many SKUs in one call.

Push to channels

POST/sales-channel/inventory/sync/:channelIdJWT

Push specific SKUs (or all of them) to one channel.

curl -X POST https://appengine.appmint.io/sales-channel/inventory/sync/shopify \
  -H "Authorization: Bearer $JWT" -H "orgid: $ORG" \
  -d '{"items": [{"sku": "SKU-100", "quantity": 42}]}'

POST/sales-channel/inventory/syncJWT
Push to all connected channels.

The provider for each channel translates SKU → channel listing identifier (Amazon ASIN, Shopify variant ID, eBay item number) using the channel mapping table. If a SKU isn't mapped on a channel, the sync skips it and records a mapping_missing warning.

Pull from channels

POST/sales-channel/inventory/pull/:channelIdJWT

Read inventory back from the channel and reconcile against master. Useful when the channel is the operational source of truth for a sub-catalog (e.g. an Amazon FBA SKU you don't ship yourself).

Reservations

When a customer adds items to a cart and starts checkout, reserve the stock so concurrent buyers don't oversell. Reservations have three terminal states: released (cart abandoned), committed (order placed), or expired (TTL hit).

POST/sales-channel/inventory/reserveJWT
curl -X POST https://appengine.appmint.io/sales-channel/inventory/reserve \
  -H "Authorization: Bearer $JWT" -H "orgid: $ORG" \
  -d '{
    "items": [{"sku": "SKU-100", "quantity": 2}],
    "orderId": "ord-abc"
  }'

POST/sales-channel/inventory/reservation/:reservationId/releaseJWT
Free the stock back to available.

POST/sales-channel/inventory/reservation/:reservationId/commitJWT
Commit on order placement — decrements master and queues channel-side decrements.

View across channels

GET/sales-channel/inventory/:sku/channelsJWT

Returns the SKU's quantity on every channel plus master, in one payload. Use this to spot drift.

{
  "sku": "SKU-100",
  "master": 42,
  "channels": {
    "amazon": { "quantity": 41, "lastSync": "2026-04-25T...", "status": "ok" },
    "shopify": { "quantity": 42, "lastSync": "2026-04-25T...", "status": "ok" },
    "ebay": { "quantity": 38, "lastSync": "2026-04-23T...", "status": "stale" }
  }
}

Low-stock alerts

GET/sales-channel/inventory/alerts/low-stockJWT

Returns SKUs whose master quantity has fallen below the per-product low-stock threshold. Pair with an automation trigger to send purchasing alerts.

Conflict resolution

When master and channel disagree (e.g. a channel reports a sale you don't have a corresponding order for), the sync uses configurable strategies:

StrategyBehaviorWhen to use
master_wins (default)Push master to channel.Storefront is the only sales surface that decrements.
channel_winsAdopt channel value into master.Channel-fulfilled SKUs (Amazon FBA).
lower_winsTake the smaller of the two.Conservative — protects against overselling.
manualFlag the conflict, do not sync.Investigation needed.

Set the strategy per SKU in the channel mapping or per channel in enableChannel config.

{
  "syncInventory": true,
  "conflictStrategy": "lower_wins"
}

Conflicts that land in manual are surfaced via GET /sales-channel/sync/history?operation=inventory_conflict.

Webhook lag

Channel webhooks (especially Shopify and Amazon SP-API notifications) can lag the actual inventory state by seconds-to-minutes. Don't rely solely on webhook-driven decrements to prevent overselling on high-velocity SKUs — combine with reservations during checkout.