Create a stock adjustment
mutation {
CreateStockAdjustment(
input: {
id: null,
label: "SA00000001",
notes: null,
total_units: null,
status: "active",
dated_at: null,
to_location: {
id: 100007,
label: "eligendi"
},
line_items: [
{
temporary_id: 1705673189792,
is_kit: false,
quantity: 2,
cost: 668.7955,
weight: 0,
description: "",
location: {
id: 100006,
label: "assumenda"
},
variant: {
id: 100110,
label: "Amazeballs Humbro Sneakers"
}
},
{
temporary_id: 1705677189792,
is_kit: false,
quantity: 20,
cost: 668.7955,
weight: 0,
description: "",
location: {
id: 100006,
label: "Rio"
},
variant: {
id: 100220,
label: "Jalapenos
}
batch_numbers:[
{
batch_number:{
id:189000
}
quantity:12
},
{
batch_number:{
id:189666
}
quantity:8
}
]
}
]
}
) {
id
}
}
{
"data": {
"CreateStockAdjustment": {
"id": 100010
}
}
}
Update a stock adjustment
id - ID |
---|
Id of the stock adjustment |
mutation UpdateStockAdjustment($id: ID!, $input: StockAdjustmentInput!) {
UpdateStockAdjustment(id: $id, input: $input) {
id
}
}
{
"id": 100010,
"input": {
"notes": "<p>Adjustment of warehouse stock level</p>"
}
}
{
"data": {
"UpdateStockAdjustment": {
"id": 100010,
}
}
}
Delete a stock adjustment
id - ID |
---|
Id of the stock adjustment |
mutation DeleteStockAdjustment($id: ID!) {
DeleteStockAdjustment(id: $id)
}
{
"data": {
"DeleteStockAdjustment": true
}
}
id - Int |
---|
Unique identifier of the stock adjustment |
label - String |
---|
Title of the stock adjustment |
notes - String |
---|
Notes attached to the stock adjustment |
total_units - Float |
---|
Total units of the stock adjustment |
status - Enum |
---|
Status of the stock adjustment (enum values : active, cancelled, completed, unpublished). |
dated_at - Date |
---|
Date of the stock adjustment |
to_location - LocationInput - Subquery |
---|
Destination location if products are moved from a location to an other |
line_items - Array of LineItemInput - Subquery |
---|
List of the line items of the order. |