createInventoryAdjustment
View as MarkdownCreate a new inventory adjustment.
mutation
Requires commerce.product:write.
Create a new inventory adjustment.
Use
CreateInventoryAdjustmentInput with string locationId and skuId.Required headers
| Header | Required | Description |
|---|---|---|
x-store-id | Yes | ID 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
inputCreateInventoryAdjustmentInput!requireddeltaInt!required — The change in inventory quantity. Positive for additions, negative for removals.locationIdString!requiredskuIdString!requiredtypeString!required — The type of inventory adjustment, one ofAVAILABLE,COMMITTED,BACKORDERED.metafields[CreateMetafieldInput!]optionalkeyString!requirednamespaceString!requiredtypeString!required — Metafield value type. Live catalog validation accepts lowercase values such asboolean,string,stringMultiLine,number,numberDecimal,date,dateTime,json,measurement,url,reference,money,list.string,list.number,list.numberDecimal. UppercaseSTRINGis rejected.valueString!required
occurredAtDateTimeoptional — The date and time when the inventory adjustment occurred.reasonNameStringoptional — 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!]optionaloriginString!requiredvalueString!required
Possible returns
InventoryAdjustmentInventoryAdjustment— 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?