Recommendations for Developers


1. Postman allows you to quickly send and capture requests to the API2Cart API and serves as a useful tool for getting started with the API2Cart.

If you haven’t been using the Postman app yet, be sure to download it from here

We’ve created a Postman collection to make your life easier as an API2Cart user, letting you test out our API in no time. It includes the majority of the requests from our API.

For those of you who are already up and running with API2cart, this overall collection can be super useful as a reference or quick start.

To import the collection, press the button:

2. Each API2Cart client has a restricted amount of parallel (concurrent) requests. If this amount is exceeded, the server returns the error #7 (“Too many requests to store”). To fix this, reset the connection count by completing all requests running to the store and execute the cart.disconnect API method. You can see the request count in the store grid in your API2Cart account home page.


3. Make sure the software waits for all the requests to API2Cart to complete. Stores work with different speed so the speed of API requests will differ too. Set an infinite waiting time for a response from the server (CURL option CURLOPT_CONNECTTIMEOUT = 0).  With this done, you can be sure that the response is correct. It will contain either data or an error message.

WooCommerce plugin for Webhooks for Basket updates

This plugin was developed for API2Cart users to improve integration with WooCommerce.


WooCommerce shopping cart doesn’t provide the ability to get webhook notifications for basket updates, and API2Cart developed this functionality itself.


With this plugin, you can get webhook notifications for shopping cart updates, for example when the new item is added or deleted.


N.B. This plugin works only with WooCommerce plugin.

 

Download plugin