Have questions? Leave your message here or Schedule a quick call with our manager now

Getting Started

You can use the parameter verify=false to skip the validation.
You need to specify store admin username and password, no API key is required.
To install SDK, download an SDK file for programing language you need.
To install SDK for PHP language, download the file, and run "composer install" command from it.
We don’t have composer packages.

To upload the bridge to Magento Commerce cloud stores and make it available on the URL, the store developer should do the following steps:

1) Add the bridge folder to the project root directory via GIT:

2) Edit the file .magento.app.yaml:

Add the following configurations:

"/bridge2cart":

root: "/"

passthru: "/bridge.php"

index:

bridge.php

expires: -1

scripts: true

allow: true

3) Push changes to the repository and merge them to master.

WooCommerce Plugin Installation

To add a plugin or an extension on WooCommerce:
  1. Go to your admin panel and click on ‘Plugins” menu -> "Add New"
  2. Choose API2Cart Connector and click “Install Now” button.
  3. After downloading the plugin, click “Activate Plugin” to get it rolling.
The plugin tab should now appear on your admin panel.


Magento Plugin Installation

To add a plugin or an extension on Magento 1:
  1. Go to the Magento admin panel and navigate System -> Magento connect -> Magento connect manager.
  2. Login with the same credentials you use to access your admin panel.
  3. Then under Direct package file upload you can Upload package file. Click the Choose File button, select the extension .tgz file, and click Upload. To ensure the plugin is installed correctly, use the PHP version that matches the Magento version requirements.
  4. If the version of PHP conflicts with the version of Magento in use, we suggest that you should install it using the following instructions:
    • Unzip the archive and upload the files to the server.
    • Clear the Magento cache by going into System-> Cache Management, selecting all in the list, choosing the Refresh option in the dropdown menu, and finally clicking Submit.
  5. Go to System-> Configuration and find API2CART Bridge in the menu on the left.

The installation process will begin and show a message when it’s finished. You can optionally click on “Refresh” button to see whether the extension is installed or not.


PrestaShop Plugin Installation

To perform the installation:
  1. Login into your Prestashop admin panel.
  2. Go to the module tab and click “Add a module from my computer”
  3. In “Module file” box click “Browse” button.
  4. Select module *.zip file from your computer.
  5. Complete the process by pressing “Upload this module” button.

The page will reload, and you should see the new module in a list of your modules.


Cs-Cart Plugin Installation

To perform the installation:
  1. Login into your Cs-Cart admin panel.
  2. Click on the navigation "Add-ons" -> "Manage Add-ons".
  3. Click on the "+" button to upload the plugin.
  4. In the dialog box that appears, click on the "Local" option to download the plug-in *.zip file
  5. Click the "Upload & install" to upload the installation.

After a successful installation, in the "Add-ons" page you will see the API2Cart plugin.


OpenCart Plugin Installation


Note: After any of these plugins is successfully installed, the store owner needs to give the information on his unique store key to B2B provider for the proper work through the API.

First, you must ensure that the WooCommerce REST API is working. The following conditions must be met:



Next, you need to create API keys:



The following fields must be filled in:



In the User field, you need to specify a user who has the Administrator role. The Permissions field must be Read/Write


As a result, we will get Consumer key and Consumer secret, which are needed to add a store to the API2Cart:



To add a store in the API2Cart admin panel, fill in the fields as follows:



Troubleshooting

If you receive the following message while adding a store:


First of all, you need to check whether you have specified the correct store_url, wc_consumer_key and wc_consumer_secret.


If all the fields are correct, another reason can be that your server may be configured in such a way that it does not accept authorization tokens in request headers. You need to add the following line to the .htaccess file in the folder with the woocommerce project:


RewriteRule ^index\.php$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


You can find additional information in the Woocommerce guide.


https://github.com/woocommerce/woocommerce/wiki/Getting-started-with-the-REST-API

Parameters supported in the product.add method for Amazon SP-API

  • sku - Required. A unique identifier for the product in the seller's catalog.
  • price - Required
  • quantity - Required
  • asin, ean, gtin, upc - One of these is required. one of them is transferred.
  • category_id
  • store_id
  • product_type
  • marketplace_item_properties

asin, ean, gtin, upc parameters are identifiers that identify a product in the Amazon catalog. Every product that is in the Amazon catalog has a unique asin.

Adding a product that already exists in the Amazon catalog

To add a product that already exists in the Amazon catalog, you only need to provide the SKU, the product identifier, and the price and quantity. The quantity can be zero. Only integer values are supported. After a while, the product will appear in the seller's catalog and will have the properties of the product that was assigned to the identifier (name, description, attributes, images, etc.) as well as the seller's offer (offer), which is determined by the price and quantity.

Adding a product that does not exist in the Amazon catalog

Adding a new product that does not exist in the Amazon catalog is a more complex process, as Amazon requires filling out a large number of attributes to create a new product with an indication of the category in which the product will be placed.

Therefore, when creating a product through product.add, if the product identifier that does not yet exist in the Amazon catalog is specified, one of the parameters must be specified: category_id or product_type

To work with Amazon categories, we have added support for the category.count\list\info\find methods.

In the response of the category.list\info methods, the product_types field is displayed in additional_fields. If it contains any data, the ID of this category can be passed in the category_id parameter. Instead of the category_id parameter, you can use the product_type parameter, specifying the value of the additional_fields.product_types field (if the additional_fields.product_types field contains several values, separated by commas, then one of them).

Once one of the category_id or product_type parameters has been defined, you need to pass the attributes of the new product that is being created in the Amazon catalog. For a list of mandatory requirements for a certain product type (product_type) in Amazon, there is a JSON-schema. This JSON-schema is displayed in the category.info method in the additional_fields.category_options field (category.list this field is not displayed to save requests to Amazon).

As you can see from the image, the additional_fields.category_options object contains a WASHER object with the corresponding JSON-schema. If additional_fields.product_types contains multiple values, then JSON-schemas for all product types will be displayed.

The data from the JSON-schema fields is passed in the marketplace_item_properties parameter. This parameter is validated both on the Api2Cart side

and on the Amazon side.

The corresponding errors that will be displayed in an unsuccessful attempt of the product.add method.

If all the required properties for a certain product type are passed, the product will be created in the Amazon catalog.

Possible nuances:

Even if we received a response with return_code: 0 for the product.add method on Amazon SP-API, this does not mean that Amazon will immediately place the product in its catalog and the seller's catalog among its offers. This product may require additional adjustments in the seller's admin panel. Such products are located in the Catalog > Complete Your Drafts menu section.

which will contain product drafts and Amazon's appropriate troubleshooting guidelines for their listing of these products.

In order to see all additional parameters that are unique for your shopping cart, call product.list API method with the params=force_all parameter. Or set the necessary fields separated by comma in parameter "params" (params=length,depth).

This parameter is generated automatically for hosted carts (Shopify, Bigcommerce, Volusion, etc.). If you are working with self-hosted carts (Magento, WooCommerce, OpenCart, etc.) follow these steps:
  • Call cart_bridge method from which you could get store_key.
  • Call bridge_download method and pass store_key which was generated in cart_bridge.
  • Upload the bridge to the root ftp server folder.
  • Call cart_create method and paste previously generated store_url.
All described above is concerned to manual way of bridge upload.
To start working with the service you have to register an account, sign in and connect store by providing the required information (store’s URL, API credentials, etc). Also, you need to install the plugin if you have to work with open-source platforms. Quick Demo tour will provide you with more detailed information on how to start working with the service.

In most cases the system automatically defines the prefix of specific shopping cart and uses it. However if you have several shopping carts of one type, the automatic defining will not work. In this case you should use the method account.cart.add and define the prefix of your shopping cart with a parameter db_tables_prefix.

Shift4Shop (3dcart)

You need to retrieve API Key from your Shift4Shop (3DCart) admin account.
  1. Log in to your admin panel and go to Settings -> General -> Store modules.
  2. Go to section API XML Web Service Integration.
  3. Click on Enable Advanced API if it isn't enabled yet. Then copy API User Key.

BigCommerce

You need to enable the API for a user and API Key.
  1. Log in to store's admin panel and go to Users section.
  2. Edit user for whom you wish to enable the API.
  3. Scroll down to the bottom of the page, and check the box next to Yes, allow this user to use the API.
  4. After that you will get the API URL and Token for the user.
  5. Save the result.

MobiCart

You need to retrieve API Key from your MobiCart admin account.
  1. Sign in to your MobiCart account.
  2. Go to My Account > Accounts Settings.
  3. Select API tab.
  4. Generate API Key or modify existed.

Shopify

You need to provide an API Password from your Shopify admin account.
  1. Log in your store's admin area and go to Apps Menu. Then, click the Private apps button.
  2. Click on the button in the right top corner Create a private App.
  3. Enter the Title of the app and provide your Contact email (optionally). 
  4. Then, you need to grant the Private app with permissions to enable data interaction with your store. To do this, click on all drop-down menus and change permission status from “No access” to “Read and Write” .
  5. After that, click Save app.
  6. API Password will appear right after you save the app.

Volusion

Volusion requires API Key (URL) and Encrypted Password
  1. Login to the Admin Area of your Volusion store.
  2. Click the Inventory tab followed by the Import/Export link at the top, below the Inventory tab.
  3. In the Other Import/Export Features section, click the Volusion API link.
  4. Click the Instant Help link on the upper right hand corner of the page.
  5. Click the Volusion API Integration Help link at the bottom of the page.
  6. Select to view instructions for Generic Orders and expand the URL with Query Stringsection at the bottom. The Encrypted Password can be found in the URL displayed, between the Encrypted Password= and &API_Name.
Please note, you must have a Volusion Gold plan or higher in order to have API access for your store.

The process of connecting the store to API2Cart depends on the type of shopping cart. There are two major types: Hosted (3dcart, Volusion, Shopify) and Open-source (PrestaShop, WooCommerce, OpenCart, etc.) Get the type of carts here.

For Hosted Carts

You are able to add your stores in 2 ways:

  1. Through the interface in your account. Simply press ‘Add store button’, paste your store’s URL, select type, valid API key and API password.
  2. By calling account.cart.add method.  In order to add store correctly, provide all necessary parameters that are described in documentation.
public function apiCreate()
{
  $params = array(
    'cart_id'      => 'BigcommerceApi',
    'store_url'    => 'https://example.com',
    'verify'       => 'false',//set this param=false for test only
    'store_key'    => 'ab37fc230bc5df63a5be1b11220949be',//for self-hosted cart only
    'AdminAccount' => 'admin',
    'ApiPath'      => 'https://example.com/api/v1',
    'ApiKey'       => '6b89704cd75738cb0f9f6468d5462aba',
  );

  return $api->request('account.cart.add', $params);
}

Note: Store key is generated automatically for hosted carts (Shopify, Bigcommerce, Volusion, etc.)

For Open-source Carts.

When talking about Open-source platforms, it’s worth mentioning that API2Cart connects to such type of solutions through connection bridge.

You are able to add your stores in 2 ways:

  1. Through the interface in your account. Simply press ‘Add store button’, paste your store’s URL, select type, download bridge and paste it to your store’s root folder via FTP client. (Read our FAQ on what is the connection bridge and why do you need it)
  2. By calling these methods:
  • Call cart.bridge method from which you could get store_key.
  • Call bridge.download method and pass store_key which was generated in cart_bridge.
  • Upload the bridge to the root ftp server folder.
  • Call account.cart.add method and paste previously generated store_url.

Product API methods allow you to manage products in the store. It is possible to:

  • Create - add products
  • Read - retrieve list, info, find
  • Update - update
  • Delete - delete

Run product.add method, in order to add new products to the store, and provide all necessary parameters.

public function apiAdd($params)
{
  $params = array(
    'name'        => 'Bag',
    'model'       => 'bag_01',
    'description' => 'This is new product',
    'price'       => 99.9,
    'quantity'    => 12,
    'manufacturer'=> 'Test',
  );

  return $api->request('product.add', $params);
}

Note: You may add image, tax, manufacturer, option, variant or other info to the product by calling these methods: product.image.add, product.variant.add, product.manufacturer.add, product.tax.add, product.option.add, product.option.value.add, product.option.assign, product.option.value.assign

For more methods jump into documentation.

If you want to update the product, call product.list method  to retrieve product id.

public function apiList($params)
{
  $params = array(
    'start'  => 0,
    'count'  => 50,
    'params' => 'id,name,price',
  );

  return $api->request('product.list', $params);
}

When you get product id, you are able to update price and inventory(quantity) for this product, simply calling product.update method.

public function apiUpdate($params)
{
  $params = array(
    'id' => 69,
    'price' => 89,
  );

  return $api->request('product.update', $params);
}

Note: You may update variant, image and product option value by calling the following methods: product.variant.update, product.image.update, product.option.value.update

For more API methods visit our documentation.

Order API methods allow you to manage orders in the store. It is possible to:

  • Create - add orders
  • Read - retrieve list, info, find
  • Update - update
  • Delete - delete

Run order.add method to add orders to the store, and provide all necessary parameters.

public function apiAdd($params)
{
  $params = array(
    'customer_email'         => '[email protected]',
    'order_status'           => 'Complete',
    'bill_first_name'        => 'Adam',
    'bill_last_name'         => 'Smith',
    'bill_address_1'         => 'Green str. 35',
    'bill_city'              => 'Chicago',
    'bill_postcode'          => '12345',
    'bill_state'             => 'IL',
    'bill_country'           => 'US',
    'total_price'            => '23.56',
    'order_item_id_1'        => 8,
    'order_item_name_1'      => 'Bag',
    'order_item_model_1'     => 'bag_01',
    'order_item_price_1'     => 89,
    'order_item_quantity_1'  => 3,
  );

  return = $api->request('order.add', $params);
}

If you want to update an order, call order.list method to get order id.

public function apiList($params)
{
  $params = array(
    'start'  => 0,
    'count'  => 5,
    'params' => 'id,customer,status'
  );

  return $api->request('order.list', $params);
}

When you get your order id, you are able to update comment and order status by calling  order.update method

public function apiUpdate($params)
{
  $params = array(
    'order_id'     => 11,
    'order_status' => 'Pending',
    'comment'      => 'Order comment'
  );

  return $api->request('order.update', $params);//returns the number of updated orders
}

Note: You are able to count orders in the store by calling order.count method.

For more methods jump into documentation.

Customer API methods allow you to manage customers in the store. It is possible to:

  • Create - add customers
  • Read - retrieve list, info, find
  • Update - update
  • Delete - delete

Run customer.add method, to add customers to the store, and provide all necessary parameters.

public function apiAdd($params)
{
  $params = array(
    'email'      => '[email protected]',
    'first_name' => 'John',
    'last_name'  => 'Smith',
  );

  return $api->request('customer.add', $params);
}

If you want to update the customer, call customer.list method  to retrieve customer id.

public function apiList($params)
{
  $params = array(
    'start' => 0,
    'count' => 5
  );

  return $api->request('customer.list', $params);
}

When you get your customer id, you are able to perform customer.update method.

public function apiUpdate($params)
{
  $params = array(
    'id'         => 11,
    'first_name' => 'Jack',
    'last_name'  => 'Smith',
  );    

  return $api->request('customer.update', $params);
}

For more methods jump into documentation.

Categories API methods allow you to manage categories in the store. It is possible to:

  • Create - add categories
  • Read - retrieve list, info, find
  • Update - update
  • Delete - delete

Run category.add method, to add customers to the store, and provide all necessary parameters.

public function apiAdd($params)
{
  $params = array(
    'name' => 'Shoes'
  );

  return $api->request('category.add', $params);
}

If you want to update the category, call category.list method to get category id.

public function apiList($params)
{
  $params = array(
    'start'  => 2,
    'count'  => 2,
  );
  
  return $api->request('category.list', $params);
}

When you get your category id, you are able to perform category.update method.

public function apiUpdate($params)
{
  $params = array(
    'id'         => 20,
    'avail'      => 'false',
    'meta_title' => 'meta title for category'
  );
    
  return $api->request('category.update', $params);
}

If you want to assign your product to some category, simply call product.list method and category.list method to get product id and category id.

After that, run category.assign method.

public function apiAssign($params)
{
  $params = array(
    'product_id'     => 69,
    'category_id'    => 20,
  );
    
  return $api->request('category.assign', $params);
}

For more methods jump into documentation.

When signing up for API2Cart account, you are asked to provide name, e-mail address, password.

When adding a new store, you are asked to provide API key and store URLs. You may also be asked to provide your direct database connection to speed up the process. We take appropriate security measures to protect your information. Find out more about our Privacy Policy.

API key is a code that consists of 32 characters and is generated by API2Cart for each user individually. In order to get it, you need to register your account first. After that service will automatically provide you with API key. You can find it on the page with your stores list.
 
API key is a code generated by API2Cart for each user individually. It provides you with access rights on the API. You will use your API key to establish connection between service and stores you are going to work with. Personal API Key helps us to identify users who perform API requests, allows to track and control API usage.
In order to integrate your client’s store with your business system via API2Cart you will have to:
    • provide API Key/Token and password if it is a hosted platform
    • or use bridge files to establish connection to other carts.

See the full list below (in alphabetic order):

 
3dcart API Key
Amazon MWS Auth Token, Seller ID, Marketplace IDs, Secret Key, Access Key ID
AceShop Bridge files uploaded to store folder
AspDotNetStorefront Admin User and Password
Bigcommerce Client ID, Access Token, Context
CS-Cart Bridge files uploaded to store folder / plugin
CubeCart Bridge files uploaded to store folder
Demandware API Client ID, API Password, User Name, User Password, Environment Type
Ebay App ID, Shared Secret, Refreshed Token, Environment, Global ID
Ecwid Store ID, Access Token
Etsy KeyString, Shared Secret, Access Token, Secret Token
Gambio Bridge files uploaded to store folder
Hybris Client ID, Client Secret, User Name, User Password
Interspire Bridge files uploaded to store folder
JooCart Bridge files uploaded to store folder
LightSpeed eCommerce API Key, API Secret
Loaded Commerce Bridge files uploaded to store folder
Magento Bridge files uploaded to store folder / plugin
MijoShop Bridge files uploaded to store folder
Neto API Key, User Name
OpenCart Bridge files uploaded to store folder
osCMax Bridge files uploaded to store folder
osCommerce Bridge files uploaded to store folder
Oxid Bridge files uploaded to store folder
Pinnacle Cart Bridge files uploaded to store folder
PrestaShop Bridge files uploaded to store folder / plugin
Shop-Script Premium Bridge files uploaded to store folder
Shopify API Key, API Password, Access Token, Shared Secret
Shopware Bridge files uploaded to store folder
Squarespace API Key
TomatoCart Bridge files uploaded to store folder
Ubercart Bridge files uploaded to store folder
VirtueMart Bridge files uploaded to store folder
Volusion Login and API Password
Walmart Client ID, Client Secret
WooCommerce Bridge files uploaded to store folder / plugin
WebAsyst Shop-Script Bridge files uploaded to store folder
WPEcommerce Bridge files uploaded to store folder
XCart Bridge files uploaded to store folder
Xtcommerce Bridge files uploaded to store folder
Xtcommerce Veyton Bridge files uploaded to store folder
Zencart Bridge files uploaded to store folder

For more information about how to get your API Key/Token follow this link.