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. By default, you are provided with 10 parallel API calls per account and you can do a max of 5 simultaneous API calls to 1 store. Please make sure that you do not send more API requests at the same time. If you still hit the limit and receive the error message please wait for at least one request to be completed. After it has been completed, you can run the next requests.

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.

4. 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. 

5. 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.

6. It is necessary that you log all API requests. The log record must contain the following:

  • request status ­ (numeric code)
  • request text ­ (if code = 0, then text = Ok)
  • request time in the YYYY­-mm-­dd H:m:i format (accurate time)
  • request accompanied by, for instance:
    • store URL
    • API_KEY
    • params
    • start (if required by the API method)
    • count (if required by the API method)

7. 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.

8. 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. 

9. 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.

10. Currently, API2Cart doesn’t support stores’ high-level data operations (e.g., taxes calculation, order prices for some particular customer, etc.). API2Cart just provides unified access for different shopping carts. You can develop business logic on your own or you can contact us for help.