Recommendations for Developers
1. 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.
2. 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.
3. You may sometimes see the request code = 12 in the API Logs section of your API2Cart account. It only appears there and means that the request has been queued or is running. After it has been completed, the server will return the data needed, and the code will disappear.
4. It is mandatory to handle errors according to the API2Cart documentation that describes all the errors that API2Cart returns. It does not return any other error codes.
Be advised that the error #107 may appear because of two reasons, either when a client adds a store built on a shopping cart that API2Cart does not support, or when the platform itself returns the error. In this case, it will be the default error text sent by the shopping cart.
5. It is necessary that you log all API requests. The log record must contain the following:
6. We recommend to extract data in smaller chunks (4-50 items per request), but not in the maximum number allowed by the platform, to ensure that all the data returned is returned faster and correctly. Larger quantities take more time to return, which especially applies to API-based platforms such as Shopify and Volusion.
7. When working with bridge-based platforms like Magento or OpenCart, consider that some stores may be slower or faster because installed on different hostings. You can see how fast stores are by either using the speed statistic found in your API2Cart account or contacting our support team.
8. If you find that API2Cart does not return a field that you need, contact us with either a suggestion or a request to add it. Unless the shopping cart does not support the field, we will add it shortly.
Please note that these fields will not be standardized by API2Cart, so you may find that this field will differ in the name if compared to other platforms, but not in the meaning. The developer working on the application takes full responsibility for dealing with such fields.
9. API2Cart is currently not supporting high-level data operations like tax calculation or order prices for particular customers. It provides unified access to data from stores built on different shopping carts. To get the data that can only be returned as a result of the operation, develop an appropriate business logic or contact us for help.