Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Inventory__adjust Stock

Requires a signed-in staff user. Needs the `inventory__Stock` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONinventory__adjustStock(input: AdjustStockInput!): InventoryStock!

Requires a signed-in staff user. Needs the inventory__Stock update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

input*

Returns

  1. inventory__adjustStock
_id*ID!
allowBackorder*Boolean!
archivedAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

available*Int!
createdAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

lifecycleStatus*InventoryStockLifecycleStatus!
Value inACTIVEARCHIVED
lowStockThreshold*Int!
onHand*Int!
productId*ID!
reserved*Int!
sku?String
status*InventoryStockStatus!
Value inBACKORDERIN_STOCKLOW_STOCKNOT_TRACKEDOUT_OF_STOCK
tenant*String!
trackInventory*Boolean!
updatedAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

variantKey?String
Example Request
mutation Inventory__adjustStock($input: AdjustStockInput!) {  inventory__adjustStock(input: $input) {    _id    allowBackorder    archivedAt    available    createdAt    lifecycleStatus    lowStockThreshold    onHand  }}
Variables
{  "input": {    "productId": "1",    "quantity": 10  }}
Example Response
{  "data": {    "inventory__adjustStock": {      "_id": "1",      "allowBackorder": true,      "archivedAt": "<DateTime>",      "available": 10,      "createdAt": "<DateTime>",      "lifecycleStatus": "ACTIVE",      "lowStockThreshold": 10,      "onHand": 10    }  }}