Inventories

Apply a signed, relative stock movement to one (variant, outlet) tuple

Applies a signed delta to the on-hand quantity of a single (variantId, outletId) tuple scoped to the API-key company. Negative deltas are booked as an EXTERNAL_SALE, positive as an EXTERNAL_RESTOCK; neither rejects on insufficient stock. idempotencyKey is required — a retry with the same key is a safe no-op. Returns the post-adjustment inventory state; advance your sync watermark from quantity. This is a routed sync-lane operation: it is only available when inventory writes are routed to the inventory service, and responds 501 Not Implemented otherwise.

post/v1/inventories/adjust

Request

  • Base URL: https://api.finalpos.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.finalpos.com/v1/inventories/adjust
  • Auth: API key in header x-api-key

Request body

variantIdstring required

Variant ID

outletIdstring required

Outlet ID

deltanumber required

Signed, non-zero stock movement. Negative decrements (booked as an EXTERNAL_SALE), positive increments (booked as an EXTERNAL_RESTOCK). Must be a non-zero integer.

idempotencyKeystring required

Caller-supplied idempotency key. REQUIRED: this endpoint exists for sync lanes, where a retry without a key would double-apply. The same key applied twice is a safe no-op on hub-api. Keys prefixed sarnia: are reserved for the FinalPOS sync lane.

Example request

{
  "variantId": "6650a1f77bcf86cd79943012",
  "outletId": "6650a1f77bcf86cd79943013",
  "delta": -3,
  "idempotencyKey": "sarnia:square:txn:abc123"
}

Response

variantIdstring required

Variant ID

outletIdstring required

Outlet ID

quantitynumber required

On-hand quantity after the adjustment

Example response

{
  "variantId": "6650a1f77bcf86cd79943012",
  "outletId": "6650a1f77bcf86cd79943013",
  "quantity": 7
}

Changes

No recorded changes to this operation across all 1 revision of this API.