What's your biggest current challenge? Have your say in Community Polls along the right column.

Api : products.json (Post Request) Not working

Api : products.json (Post Request) Not working

farmkart
Visitor
1 0 0

 

Hey,

I am trying to add a product using the API endpoint /products.json with a POST request. However, instead of returning the product details along with the productId, the response is a jsonArray of all the products I already have.

Could you please help me understand why I am unable to add a product using the suggested API?

Details:

URL:
https://{ShopName}.myshopify.com/admin/api/2023-04/products.json

Request Type:
POST

Headers:

  • Content-Type: application/json
  • X-Shopify-Access-Token: shpa*_4******************e149fa2

Payload:

json
{ "product": { "title": "Sample Product", "body_html": "<strong>Good product</strong>", "vendor": "Farmkart", "product_type": "Sample", "variants": [ { "option1": "Default Title", "price": "19.99", "sku": "123" } ] } }
Replies 0 (0)