Skip to content

Move unavailable

POST/admin/v1/stores/{store_id}/inventory/unavailable
  • Idempotency-Key supported

Hold units back from sale (damaged, waiting for a quality check, safety stock), or put held units back on sale. They stay on the books; nobody can buy them.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • variant_idstringrequired

    TypeID with the var prefix.

  • location_idstringrequired

    TypeID with the loc prefix.

  • reasonenumrequired
    • damaged
    • quality_control
    • safety_stock
    • other
  • quantityintegerrequired

    Units to hold back; below zero puts held units back on sale.

  • notestring · or null

Returns

200 The variant's units held back now.

Errors

  • 403forbiddenMissing permission, or a branch the caller doesn't work at.
  • 404not_foundNo such variant or location.
  • 409Stock isn't tracked.
  • 422validation_failedMore than is available, or than is held for that reason.