Support

createInventoryAdjustments

View as Markdown

Create multiple inventory adjustments in a single operation.

mutation

Requires commerce.product:write.

Create multiple inventory adjustments in a single operation.

Required headers

HeaderRequiredDescription
x-store-idYesID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED".

Go to Authentication for credential setup.

Arguments

  • input [CreateInventoryAdjustmentInput!]! required
    • delta Int! required — The change in inventory quantity. Positive for additions, negative for removals.
    • locationId String! required
    • skuId String! required
    • type String! required — The type of inventory adjustment, one of AVAILABLE, COMMITTED, BACKORDERED.
    • metafields [CreateMetafieldInput!] optional
      • key String! required
      • namespace String! required
      • type String! required — Metafield value type. Live catalog validation accepts lowercase values such as boolean, string, stringMultiLine, number, numberDecimal, date, dateTime, json, measurement, url, reference, money, list.string, list.number, list.numberDecimal. Uppercase STRING is rejected.
      • value String! required
    • occurredAt DateTime optional — The date and time when the inventory adjustment occurred.
    • reasonName String optional — The name of an inventory adjustment reason to associate with this adjustment. Use the exact reason name (e.g. "g-damage" for global presets, or a store-scoped name).
    • references [CreateReferenceInput!] optional
      • origin String! required
      • value String! required

Possible returns

  • InventoryAdjustment [InventoryAdjustment!] — An immutable entity that represents a change in state of a quantity of SKU at a particular time and location.

Last updated on

How is this guide?