I am trying to upload product through rest api, return status is 200 but product is not uploaded

BatraSagar
Visitor
2 0 0


My Payload :
{
"product": {
"title": "Sample Product",
"body_html": "<p>This is a sample product description.</p>",
"vendor": "curtina",
"product_type": "test"
}
}


returning

{
"products": []
}

 

Replies 2 (2)

chetancrao
Shopify Partner
40 5 6

Hi @BatraSagar,

 

Thank you for reaching out to the Shopify community.

 

Please confirm if you have followed these steps to perform the product create operation at Shopify using REST.

 

ENDPOINT : https://{your-shopify-domain}/admin/api/2023-01/products.json
REQUEST METHOD : POST

PAYLOAD : 

{
    "product": {
        "title": "Sample Product",
        "body_html": "<p>This is a sample product description.</p>",
        "vendor": "curtina",
        "product_type": "test"
    }
}

 HEADER :

- If your app is custom then please use the app key and secret in the basic authentication, or in the endpoint itself like: https://{your-app-key}:{your-app-secret}@{your-shopify-domain}/admin/api/2023-01/products.json

- If your app is public, then pass X-Shopify-Access-Token: {your-app-access-token}

 

Document reference : https://shopify.dev/docs/api/admin-rest/2023-07/resources/product#post-products

 

If you find any difficulty while creating the product as explained above, please do not hesitate to reach back.

 

Thanks,

Cheetos || Recurpay Subscriptions

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
BatraSagar
Visitor
2 0 0

Yss, My app is public and I have already defined the header, attached snapshot

problem is still there