Ok, here we go. You can use the new REST API.
What your dealer must do
- Enable the REST API in the WooCommerce settings.
- Create a new user for you.
- Generate API keys (Read/Write) in the user profile for that user.
That’s pretty much it for the dealer side.
What you must do
I can’t give you any specific details since I don’t know what platform you are running. But the steps are pretty much the same on any platform.
- Find the most logical way to send a REST request when a product is updated.
- Write code that collects the new product data and send it to the REST API.
And that’s pretty much it for you.
The most logical way to send the request depends on the platform and the code behind. If you would be using WordPress you could add a hook and send the request with AJAX to your custom script when updating the product.
Another way could be a button in the products list. When clicking on the button it fires an AJAX request to you custom script.
Your custom script should get the product data (based on product id) from your database, process it, and then send it to your dealers REST API.
If you’re running a PHP based store you should take a look at the REST client for WooCommerce by Gerhard Potgieter. It’s missing the end point you need (edit_product) but the base is there and it’s a good starting point.
What platform are you running?