How to Integrate Product Feed API in Woocommerce
-
Hi all , Currently i am working in a WordPress site with Wocommerce .
I want to integrate an API for automatically import products from a 3rd party.
I have the API for that . API documentation says as follows.,
We update inventory every 24 hours!
The API request must be in the following form:
https://boatexportusa.com/wp-content/plugins/api/api.php?apikey=myAPIkeyHere
The API response is a JSON string containing all the listings (>55.000)
You can set the optional variable debug=1 when you are testing, this will force that the response from the API contain only 50 listings and you have unlimited daily requests.The only request method available is GET
Example: API Request (with CURL)
`$ch = curl_init(‘https://boatexportusa.com/wp-content/plugins/api/api.php?apikey=myAPIkeyHere’)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);`Example: API Response (JSON)
{ "status":"SUCCESS", "message":"Results have been extracted", "results":[{ "post_title":"1984 AQUASPORT 222 FT W96 YAMAHA", "post_name":"1984-aquasport-22-2-ft-w96-ya", "post_content":"Nice boat 1984 aquasport 22.2 ft c.c 1996 yamaha 200 hp runs good.", "post_category":"By Owner", "price":"52000", "location":"Miami, FL", "stock":"952481", "year":"2007", "images":[ "http:\/\/boatexportusa.com\/wp-content\/plugins\/api\/get-image.php?src=fakesrc\/00o0o_7TGyKJXFMp9_600x450.jpg", "http:\/\/boatexportusa.com\/wp-content\/plugins\/api\/get-image.php?src=fakesrc\/00o0o_7TGyKJXFMp9_600x450.jpg" ], "cond":"new", "size":"27'", "make":"SeaRay", "model":"S300", "hours":"330", "propulsion":"Power", "addedtime":"2015-03-23" }] }
I am blind stuck on how to proceed
How should i integrate this API with the Wocommerce Products to automatically get synced
- The topic ‘How to Integrate Product Feed API in Woocommerce’ is closed to new replies.