A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi everybody,
I'm trying to update productVariant "inventory_quantity" via php-shopify but my request always fall
my code is the following:
$shopifySdk->InventoryItem(42110942281867)->get()
and the response i get is
array:12 [
"id" => 42110942281867
"sku" => "304SWY0_903_L"
"created_at" => "2022-03-08T07:41:18-05:00"
"updated_at" => "2022-03-16T06:49:22-04:00"
"requires_shipping" => true
"cost" => "12946.00"
"country_code_of_origin" => null
"province_code_of_origin" => null
"harmonized_system_code" => null
"tracked" => true
"country_harmonized_system_codes" => []
"admin_graphql_api_id" => "gid://shopify/InventoryItem/42110942281867"
]
I don't seeying any field with quantity.
Please help.
Thank you
Solved! Go to the solution
This is an accepted solution.
Hello everyone,
I found a solution to update the quantities of the variant products.
My first approach was not the right one because to update a variant product you have to retrieve a location, instance of inventory level or inventory service and also can use a barcode.
That it's a lot of sub-requests with provided data i got but I'll see to optimize in a second time.
Solved 🙂
This is an accepted solution.
Hello everyone,
I found a solution to update the quantities of the variant products.
My first approach was not the right one because to update a variant product you have to retrieve a location, instance of inventory level or inventory service and also can use a barcode.
That it's a lot of sub-requests with provided data i got but I'll see to optimize in a second time.
Solved 🙂