Your browser is out-of-date!

Update your browser to view this website correctly

×

How to add an online store to API2Cart account?

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. (Read our FAQ on how to get API Key and Token from your API based shopping cart)
  2. By calling cart.create 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'    => 'http://example.com',
    'verify'       => 'false',//set this param=false for test only
    'store_key'    => 'ab37fc230bc5df63a5be1b11220949be',//for self-hosted cart only
    'AdminAccount' => 'admin',
    'ApiPath'      => 'http://example.com/api/v1',
    'ApiKey'       => '6b89704cd75738cb0f9f6468d5462aba',
  );

  return $api->request('cart.create', $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 cart.create method and paste previously generated store_url.

Posted in: Getting Started

Need help or advice?

Schedule a call