Hi @Kyle_liu
Thank you for your help.
Unfortunatelly we continue to struggle with the update of the products.
We are using mutation operation.
- We make the input like this :
{
"input": {
"id": "gid://shopify/Product/1484647465002",
"title": "SANIFLOR HOUTSNIPPERS ROOD 60L",
"descriptionHtml": "Deze rode, afkomstig uit Zuid-Europese pijnboombossen, is van een uitstekende kwaliteit en creƫert een verzorgde look rondom uw planten. U hoeft geen onkruid meer te wieden of giftige onkruidverdelgers te gebruiken. Dankzij hun progressief degradatieproces geven ze ook nog eens belangrijke voedingselementen mee aan uw planten. Nog voordelen? Natuurlijk! Minder sproeibeurten doordat ze de grond langer vochtig houden. De wortels van uw planten worden beter beschermd tegen de vrieskou en warmte. Gaan bodemverdichting tegen. Alleen maar voordelen voor uw tuin!",
"tags": "btw6, premium, Tuinaanleg, Tuinverzorging en beplanting_Bodembedekking",
"published": true,
"vendor": "F/603/",
"productType": "Tuinaanleg",
"variants": [
{
"id": "gid://shopify/ProductVariant/12972178374698",
"sku": "ISR00014",
"price": "9.95",
"barcode": "",
"requiresShipping": true,
"weight": 10,
"inventoryManagement": "SHOPIFY"
}
]
}
}
- We create a stage to upload our json file. The Url used to create de stage is https://SHOPNAME.myshopify.com/admin/api/2024-07/graphql.json
mutation { stagedUploadsCreate(input:{ resource: BULK_MUTATION_VARIABLES, filename:"XXX02093214211130364.jsonl", mimeType:"text/jsonl", httpMethod: POST }){ userErrors{ field, message }, stagedTargets{ url, resourceUrl, parameters { name, value } } } }
- We receive the authentication token that we use to execute the stage :
mutation { bulkOperationRunMutation( mutation:"mutation call($input: ProductInput!) { productUpdate(input: $input) { product {id variants(first: 3) {edges {node {id title inventoryQuantity }}}} userErrors { message field }}}", stagedUploadPath:"tmp/26475552/bulk/3c8d9545-fb5e-4a8d-9ad6-ae5edda9bbf3/XXX02093214211130364.jsonl") { bulkOperation { id url status } userErrors { message field } } }
- After this, we receive an error like this :
{
"data": {
"bulkOperationRunMutation": {
"bulkOperation": null,
"userErrors": [
{
"message": "Invalid Bulk Mutation Field - Variable $input of type ProductInput! was provided invalid value for variants (Field is not defined on ProductInput)",
"field": null
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1990,
"restoreRate": 100.0
}
}
}
}
We donāt understand the problem ?
At which step should we use your previous reply ?
Thank you.
Kind regards.
Damien.