All things Shopify and commerce
I hope to be able to modify inventory data in batches by sku, only modifying the inventory without changing other data. Which part of the API documentation can achieve this function? Thank you
Solved! Go to the solution
This is an accepted solution.
Hi @Thomas_Li
You cannot directly modify it through SKU. You need to first obtain the InventoryItemId based on SKU, and then modify it based on InventoryItemId
{
"input": {
"name":"available",
"reason":"correction",
"changes": [
{
"inventoryItemId": "gid://shopify/InventoryItem/51676333768979",
"delta": 10,
"locationId": "gid://shopify/Location/85112553747"
}
]
}
}
{
"input": {
"name":"available",
"reason":"correction",
"ignoreCompareQuantity":true,
"quantities": [
{
"inventoryItemId": "gid://shopify/InventoryItem/51676333768979",
"quantity": 10,
"locationId": "gid://shopify/Location/85112553747"
}
]
}
}
This is an accepted solution.
Hi @Thomas_Li
You cannot directly modify it through SKU. You need to first obtain the InventoryItemId based on SKU, and then modify it based on InventoryItemId
{
"input": {
"name":"available",
"reason":"correction",
"changes": [
{
"inventoryItemId": "gid://shopify/InventoryItem/51676333768979",
"delta": 10,
"locationId": "gid://shopify/Location/85112553747"
}
]
}
}
{
"input": {
"name":"available",
"reason":"correction",
"ignoreCompareQuantity":true,
"quantities": [
{
"inventoryItemId": "gid://shopify/InventoryItem/51676333768979",
"quantity": 10,
"locationId": "gid://shopify/Location/85112553747"
}
]
}
}
Thank you very much for your reply. These two APIs (AdjustQuantities/inventorySetQuantities) can be batch operated, right? Is there any difference in updating inventory? Thank you!
adjustQuantities: 20(old)+10(adjust)=30(new),
setQuantities: 20(old) => 10(set) => 10(new)
Unfortunately, they do not support batch operations.
Thank you for your reply. Do these two APIs (AdjustQuantities/inventorySetQuantities) not support batch operations? Is there an API that can batch update inventory operations?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024