Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hello! Help me please with method POST products. I send json like:
{
"product": {
"title": "TEST GMS PRODUCT",
"vendor": "Alaska Outerwear Company",
"product_type": "Hat",
"status": "draft",
"published": false,
"variants": [{
"price": "0.00",
"sku": "361",
"option1": "2XL",
"barcode": ""
}, {
"price": "0.00",
"sku": "362",
"option1": "M",
"barcode": ""
}
]
}
}
After sending this request I got an error in response:
{"errors":{"product":"Required parameter missing or invalid"}}
In the header of my request I indicate the parameters: Privat app name, Content-type: application/json; charset=UTF-8, X-Shopify-Access-Token.
I send the request using "curl".
What am I doing wrong?
I was able to POST that json array using postman, and create the product successfully, so I suspect that your curl is not sending the json correctly. All the required fields are present in the json array itself.
CS | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
User | RANK |
---|---|
6 | |
5 | |
4 | |
3 | |
3 |