Hi,
Sorry for what might seem a basic question. We have the task of programatically integrating a client on premises ERP system with Magento. Following devdocs is like navigating a maze. However we have found the REST APIs for the JSON structures to create/modify Customers and Addresses.
What I can't find are the APIs to create/modify products and pricing.
Any pointers in the right direction would be super helpful.
Thank very much
Solved! Go to Solution.
@mike_hatfieldOn the below URL you can see different tutorials. You can look into product related tutorials. For all the product related updates you can use the similar Payload (structure).
https://devdocs.magento.com/guides/v2.3/rest/tutorials/index.html
Copy button on previous link of last response does not do other than copy the highlighted text.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
@mike_hatfieldBoth has their own pros and con. If you go CSV route then their can be some delay as you may not be creating CSV whole day long. It may be once or twice a day and so the updates in Magento. You can use default Magento import for this and trigger it using custom script on need basis.
API route can be instant. Make the updates in ERP, call API, make updates in Magento and you are all set!
Hope this help!
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Hello,
you can use
yourdomain.com/swagger url for that info
Hope it will help you.
Hi,
Thanks for the response.
I did use swagger to get the customer API JSON but although the product tables are named I can't find or see the JSON structures.
Perhaps I'm not looking in the right place
Thanks
@mike_hatfieldLook at the below URL. You may find what you are looking for. Look for 'Catalog' and endpoints under it. Other URL will help you on how to Add/Edit product.
https://devdocs.magento.com/guides/v2.3/rest/list.html
https://magento.stackexchange.com/questions/164278/update-product-using-rest-api-in-magento-2
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
The second link is very useful. Thank you.
The first link
I must be dumb.
I see the list of table but where do I find the structures in the table?
What does the 'Copy' button do except highlight the group of tables?
I found the Customer structures at
http://<mydomain>/swagger#!/customerAccountManagementV1/customerAccountManagementV1CreateAccountPost
I cant find the equivalent for products.
Thanks
@mike_hatfieldOn the below URL you can see different tutorials. You can look into product related tutorials. For all the product related updates you can use the similar Payload (structure).
https://devdocs.magento.com/guides/v2.3/rest/tutorials/index.html
Copy button on previous link of last response does not do other than copy the highlighted text.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
The references are very helpful.
Thank you.
After reading more of the documentation I am considering writing some programs to generate CSV files from the ERP system and using those in schedules to carryout repetitive processes. The aim is to automate as much as is possible. Do you think this is a valid way to maintain customers, products, pricing images etc?
Thanks
@mike_hatfieldBoth has their own pros and con. If you go CSV route then their can be some delay as you may not be creating CSV whole day long. It may be once or twice a day and so the updates in Magento. You can use default Magento import for this and trigger it using custom script on need basis.
API route can be instant. Make the updates in ERP, call API, make updates in Magento and you are all set!
Hope this help!
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.