Get Products using third party API in shopify

Highlighted
Tourist
3 0 0

Hello

 

As with shopify we can create our own products from admin section but how to load our products data from any custom 3rd party API. I need to create an e-commerce store with shopify as platform using third party API calls. 

 

Can anyone suggest how this is possible, using an API url-->parsing it to get the response--> displaying the response data as products on our shopify store?

 

Thanks in Advance

0 Likes
Highlighted
Shopify Expert
552 38 116

You can make POST requests to programmatically create the products in Shopify.

 

Reference: https://shopify.dev/docs/admin-api/rest/reference/products/product

 

Likewise if you're wanting to update products you do the same thing using a PUT request.

Founder of Speed Boostr (Shopify optimization and dev agency).
Creator of Theme Scientist (A/B testing app).
Creator of Order Automator (app that auto tags + fulfills orders, send emails).
Creator of Shopify Analyzer (free performance analysis tool).
I also build custom apps and automated solutions.
Enjoy the adventure!
1 Like
Highlighted
Tourist
3 0 0

Hi JoesIdeas

Thanks for the reply.

 

I had tried to post a default product JSON value and successfully created a product with that request using postman.

Can you please suggest, is there any option in shopify from where I can make these requests programmatically?

 

Thanks in advance

0 Likes
Shopify Expert
552 38 116

You can make that request in whatever language you prefer. I like using Rails and use the shopify_api gem but you can just make REST requests with any language.

Founder of Speed Boostr (Shopify optimization and dev agency).
Creator of Theme Scientist (A/B testing app).
Creator of Order Automator (app that auto tags + fulfills orders, send emails).
Creator of Shopify Analyzer (free performance analysis tool).
I also build custom apps and automated solutions.
Enjoy the adventure!
1 Like
Highlighted
Tourist
3 0 0

- Based on my client requirement, I would prefer to use cURL request in php. GET and POST are working fine for me but the problem creator is PUT method for product update. I am using following API:

 

PUT /admin/api/2020-01/products/#{product_id}.json
{
"product": {
"id": product_id,
"title": "New product title"
}

}

 

PS: I have also used file_get_contents() as an alternative to cURL but unable to update my product. Could you help me on this one.

 

- Is there a way to add variant images through API?

 

Thanks in Advance

0 Likes