We have released the API v1.1. We will support API2Cart v1.0 API until the end of 2018.
What has changed in API v1.1:
I. Optimised Response Structure
The old response structure (in API2Cart v1.0)
New response structure (in API2Cart v1.1)
Now to get info about entities on the particular store you specify the store_id parameter. Let’s say you need to get product info on the store with id=2. This is how your request has to look like:
Field values in response (e.g. name, description, price, etc.) are displayed exactly as they are on the store.
To get info about the particular category, call the category.info method with specified category_id parameter. To get the list of category ids use either product.list or product.info methods.
To get info about the particular tax class, call the tax.class.info method with specified tax_class_id parameter. To get the list of tax class ids use either product.list, product.child_item.list or product.info methods.
Use product.child_items.list to get info about child elements (bundle items or variants). Learn more in the following paragraph.
We have added product.child_item.list method for getting info about child items of the product. For configurable products, this method returns the list of variants, for bundles it returns the list of items the bundle consists of. Product.child_item.list returns the number of all bundle items or variants so that you can set up the pagination, because our API returns up to 250 elements in one request.
Working with prices:
Please note that you need to specify either product_id or product_ids parameter for this method (separate the IDs with commas). You can identify the parent item of the child item by checking the parent_id parameter.
III. Output format XML is not supported anymore
When switching to v1.1, the first thing to do is to adjust your integration to the new response structure. Thanks to reduced nesting level, a new response will be much easier to parse. Also, pay attention to the fields excluded from the new response.
Finally, make sure your integration work properly with dates. If you use XML format, you better switch to the more convenient and effective JSON format.
The partial switch is also possible. You can call both API versions via one integration. Do note that v1.0 will not be supported, though will stay live as-is, starting from January 1, 2019. All feature requests will be added for v.1.1 solely.