Getting Started
Can I add the store using cart.create method and skip the validation as in Add Store form in client’s backend?
How do I connect AspDotNetStorefront to API2Cart?
How to connect Demandware to API2Cart?
First, go to the Account Manager page (https://account.demandware.com/dw/account/Home), generate dw_client_id (Client Id) and dw_api_pass (Api Password).

Then, add permissions for API2Cart API, so that our API could retrieve data from the store. Go to your Admin panel: Administration > Open Commerce API Setting > Select type: Shop & Data > Select context: Global


Then, specify client application-specific configurations:
Global permissions
{
"_v":"17.4",
"clients":[
{
"client_id":"YOUR_CLIENT_ID",
"allowed_origins": [
],
"resources":[
{
"resource_id":"/products/*/prices",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)",
"config":{
"product.prices.price_book_ids":"PRICE_BOOK_ID_1,PRICE_BOOK_ID_2,...,PRICE_BOOK_ID_N"
}
},
{
"resource_id":"/**",
"methods":[
"put",
"get",
"post",
"patch"
],
"read_attributes":"(**)",
"write_attributes":"(**)"
}
]
}
]
}
Or per resource permissions
{
"_v": "17.4",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"allowed_origins": [
],
"resources": [
{
"resource_id":"/baskets",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*",
"methods":["get","patch","delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/billing_address",
"methods":["put"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/coupons",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/coupons/*",
"methods":["delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/customer",
"methods":["put"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/gift_certificate_items",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/items",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/items/*",
"methods":["patch","delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/notes",
"methods":["post","get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/payment_instruments",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/payment_instruments/*",
"methods":["patch","delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/payment_methods",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/shipments",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/shipments/*",
"methods":["patch"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/shipments/*/shipping_address",
"methods":["put"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/shipments/*/shipping_method",
"methods":["put"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/shipments/*/shipping_methods",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/baskets/*/submit",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/auth",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/password_reset",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*",
"methods":["get","patch"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/addresses",
"methods":["get","post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/addresses/*",
"methods":["get","patch","delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/baskets",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/orders",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/password",
"methods":["put"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/payment_instruments",
"methods":["get","post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/customers/*/payment_instruments/*",
"methods":["get","delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/orders",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/orders/*",
"methods":["get","patch"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/orders/*/notes",
"methods":["get","post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/orders/*/payment_methods",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/orders/*/payment_instruments",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/order_search",
"methods":["post"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/products/*",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id": "/products/*/availability",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)",
"cache_time": 0
},
{
"resource_id": "/products/*/prices",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)",
"cache_time": 0
},
{
"resource_id":"/site",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/categories/*",
"methods":["get"],
"read_attributes":"(**)",
"write_attributes":"(**)"
}
]
}
]
}
Global permissions
{
"_v":"17.4",
"clients":[
{
"client_id":"YOUR_CLIENT_ID",
"resources":[
{
"resource_id":"/**",
"methods":[
"put",
"get",
"post",
"patch"
],
"read_attributes":"(**)",
"write_attributes":"(**)"
}
]
}
]
}
Or per resource permissions
{
"_v": "17.4",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/sites",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/**",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/catalog_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/product_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*",
"methods": [
"get",
"patch"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*/variant_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*/variations",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*/variation_attributes",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/customer_lists/**",
"methods": [
"get",
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists/*",
"methods": ["patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists/*/product_inventory_records/*",
"methods": ["patch", "put", "get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id":"/system_object_definitions/**",
"methods":["get", "put" , "patch", "post", "delete"],
"read_attributes":"(**)",
"write_attributes":"(**)"
}
]
}
]
}
How to install API2Cart SDK?
To install SDK for PHP language, download the file, and run "composer install" command from it.
We don’t have composer packages.
How to upload bridge to Magento Commerce Cloud stores?
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.
How to Install the API2Cart Plugin on different shopping platforms?
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.
Magento Plugin Installation
To add a plugin or an extension on Magento 2:- 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.
- If the version of PHP conflicts with the version of Magento in use, we suggest that you should install it using the following instructions:
- 1. Unzip the archive and upload the files to the server.
- 2. 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.
- 3. Go to System-> Configuration and find API2CART Bridge in the menu on the left.
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.
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.
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.
How to connect Walmart store to API2Cart?
1) First, make cart.create request:
https://api.api2cart.local/v1.0/cart.create.json
with the following parameters:
- api_key
- cart_id
- walmart_private_key
- walmart_channel_type
- walmart_consumer_id
where Api_key is your API key, cart_id is Walmart.
To find walmart_private_key, walmart_channel_type, and walmart_consumer_id go to your
store admin panel → Settings → Consumer IDs & Private Keys.
- 1. walmart_consumer_id
- 2. walmart_private_key
- 3. walmart_channel_type
Copy parameters values and make request:
https://api.api2cart.com/v1.0/cart.create.json?api_key=***&cart_id=Walmart&walmart_private_key=***&walmart_channel_type=***&walmart_consumer_id=***
How to connect Ebay to API2Cart?
-
- api_key = YOUR_API_KEY
- cart_id = EBay
- verify = true
- ebay_client_id
- ebay_client_secret
- ebay_refresh_token
- ebay_site_id
- ebay_environment = production

How to get parameters marked in red above:
- ebay_client_id - App ID
- ebay_client_secret - Cart ID

- ebay_refresh_token






Congrats!
After you press Send, eBay will give you access_token and refresh_token, which are necessary for connecting your eBay account to API2Cart. The instruction above is based on official eBay documentation: https://developer.ebay.com/api-docs/static/oauth-qref-auth-code-grant.htmlHow to connect Amazon to API2Cart?
0) Note: If you are trying to connect another marketplace (not Amazon.ca, Amazon.com, Amazon.com.mx) or you need to get customer's personal info (name, address etc.) you must register your developer:
- 1. Go to the User Permissions page in Seller Central and log into your Amazon seller account as the primary user.
- 2. In the Amazon MWS Developer Permissions section, click the Register as a developer button.
- 3. Fill out the Register as a developer form.
Be sure to click the Verify button to verify email addresses that you enter.
- 4. Click the Sign up button.
- 5. Your Developer ID appears.
- 6. Click Your developer credentials.
Your AWS Access Key ID and Secret Key appear. Use these credentials when adding store (amazon_access_key_id amazon_secret_key).
1) The seller goes to the User Permissions page in Seller Central and logs into their Amazon seller account as the primary user.

2) Go to Settings > User Permissions page in Seller Central.
NOTE: The owner of the Amazon account is the only one who will see the developer area on the User Permissions page. Not even a full access super-admin can see it, only the owner.
3) The seller clicks the Authorize a developer button. In the Developer name text box, the seller enters the name of the developer that they are authorizing. This doesn't need to be the exact name; it is merely for the seller's reference in the future. Example: API2Cart.
4) In the Developer ID text box, the seller enters the Developer ID: 0677-7064-4291 (or your Developer ID obtained in paragraph 0) and then clicks the Authorize developer button.

5) The seller's MWS Auth Token appears.

6) Add Amazon store in your API2Cart account using the credentials obtained in the previous steps.
amazon_access_token (MWS Auth Token)
amazon_seller_id (Seller ID)
amazon_marketplaces_ids (comma separated string of values specified in Marketplace ID)
If you were doing the paragraph 0, you need to insert the last two parameters
amazon_access_key_id
amazon_secret_key

How to connect Etsy to API2Cart?
To connect Etsy account to API2Cart you’ll need to either:
- - create an application with marketplace-wide access (needs to go through approval process by Etsy);
- - or create private application that will have access to a single store data only.
- Both could be done via link below:
https://www.etsy.com/developers/register
Once you register an account and you will receive following credentials for your app:
KEYSTRING
SHARED SECRET

- Perform GET request to https://openapi.etsy.com/v2/oauth/request_token Using Oauth 1.0 authorization
Consumer Key - KEYSTRING from step 1
Consumer Secret - SHARED SECRET from step 1

Response body will look like “login_url=URL”
You should urldecode URL and provide it to the account owner.
- Account owner follows URL, confirms application access to the account and receives VERIFICATION CODE.

- Perform GET request to https://openapi.etsy.com/v2/oauth/access_token?oauth_verifier=VERIFICATION CODE
Using Oauth 1.0 authorization
Consumer Key - KEYSTRING from step 1
Consumer Secret - SHARED SECRET from step 1
Access Token=(oauth_token from URL from step 2)
Token Secret=(oauth_token_secret from URL from step 2)
Verifier=(VERIFICATION CODE from step 2)
Response should look like
oauth_token=<ACCESS TOKEN>&oauth_token_secret=<TOKEN SECRET>

- Finally you can connect Etsy store in your API2Cart account using the following parameters: KeyString - KEYSTRING from step 1
Shared Secret - SHARED SECRET from step 1
Access Token - ACCESS TOKEN from step 4
Secret Token - TOKEN SECRET from step 4
How to connect Ecwid to API2Cart?
To connect Ecwid store via API2Cart, you need to register and list your branded External APP on Ecwid App Marketplace. It will only serve to receive OAuth Access Token which is later on used to add a store to the API2Cart system.
Find out what you need to register here.
During the registration process, you will need to specify OAuth Scopes - the resources that will be accessed through Ecwid API. That will directly affect which of our methods will work through the Access Token that your App receives.
Why do you need to register your App?
If API2Cart lists its App on the Ecwid marketplace, then the store owner will install the API2Cart App, not yours
Ecwid API works only on a paid subscription. For more details click here.
However, you can specify that you need such an account for testing and the Ecwid team will provide you with a paid account for free for development and testing purposes.
If you have an Ecwid store with a paid subscription, you can get an Access Token without waiting for the approval of your APP. To do this, you need to install the "Play with Ecwid API and Postman" App.
- 1. Install App by clicking on the link
- 2. After installation, click “Connect with Ecwid”
- 3. Next, you need to copy Postman collection url
- 4. Import collection
- 5. Copy the token from the request settings
- 6. Add a store to API2Cart. To do this, you need to specify:
- - Ecwid Store Id (where to get it you can find here)
- - Ecwid Access Token (value received in step 5)
- - Store Url (which can be found in the Ecwid Control Panel)
How to connect Squarespace to API2Cart?
To connect Squarespace store to API2Cart and start working with the data from it, you need to register a new account.
To add the store built on Squarespace, you will need to have the Store URL and squarespace_api_key.
To get squarespace_api_key, you have to go to Squarespace admin panel, click on Settings, choose the option Advanced in the menu, click on Developer Api Keys, and Generate Key.
How can I get additional field that is not specified in the documentation?
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
).
How can I get store key from my shopping cart?
- 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.
How do I start using the API2Cart on my site?
How to add several stores with different table prefixes on a single database?
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 cart.create and define the prefix of your shopping cart with a parameter db_tables_prefix.
How can I get API Key and Token from my API based shopping cart?
3dcart
You need to retrieve API Key from your 3DCart admin account.- Log in to your admin panel and go to Settings -> General -> Store modules.
- Go to section API XML Web Service Integration.
- 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.- Log in to store's admin panel and go to Users section.
- Edit user for whom you wish to enable the API.
- Scroll down to the bottom of the page, and check the box next to Yes, allow this user to use the API.
- After that you will get the API URL and Token for the user.
- Save the result.
MobiCart
You need to retrieve API Key from your MobiCart admin account.- Sign in to your MobiCart account.
- Go to My Account > Accounts Settings.
- Select API tab.
- Generate API Key or modify existed.
Shopify
You need to provide an API Password from your Shopify admin account.- Log in your store's admin area and go to Apps Menu. Then, click the Private apps button.
- Click on the button in the right top corner Create a private App.
- Enter the Title of the app and provide your Contact email (optionally).
- 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” .
- After that, click Save app.
- API Password will appear right after you save the app.
Volusion
Volusion requires API Key (URL) and Encrypted Password- Login to the Admin Area of your Volusion store.
- Click the Inventory tab followed by the Import/Export link at the top, below the Inventory tab.
- In the Other Import/Export Features section, click the Volusion API link.
- Click the Instant Help link on the upper right hand corner of the page.
- Click the Volusion API Integration Help link at the bottom of the page.
- 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.
How to connect Bigcommerce to API2Cart?
1. Log into the store.
2. Go to Advanced Settings.
3. Click API Accounts.
4. Click Create API Account.
5. Type the name of the user in the Username box.
6. There you will find API Path box. Copy its value.
7. Click Content - modify, Checkout Content - modify, Customers - modify, Customers Login - login, Information & Settings - modify, Marketing - modify, Orders - modify, Order Transactions - modify, Products - modify, Themes - modify, Carts - modify.
8. Click the Save button. There will appear a window BigCommerce API Credential with Client ID, Client Secret and Access Token.
9. Add BigCommerce store to your API2Cart account, using credential you've got in steps 6 and 8.
How to connect Shopify to API2Cart?
To connect Shopify to API2Cart you will need to provide an API Password from your Shopify admin account. Here is a step-by-step guidance that will help you to retrieve Shopify API Password by your own.
- At first, log in your store's admin area and go to Apps Menu. Then, click the Private apps button.
Create private app.
- Enter the Title of the app and provide your Contact email (optionally).
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” as illustrated on the screenshot below. After that, click Save app.
- API Password will appear right after you save the app.
How to connect Volusion to API2Cart?
- Login to the Admin Area of your Volusion store.
- Click the Inventory tab followed by the Import/Export link at the top, below the Inventory tab.
- Click the Volusion API tab.
- Point to Get Help in the top right and click Get help with this page.
- Click the Volusion API Integration Help link at the bottom of the page.
- 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.
How to connect 3dcart to API2Cart?
- Log in to your admin panel and go to Settings -> General -> Store Settings.
- Go to the Advanced Settings section located at the far bottom of the page.
- Click on Change Settings next to API Settings.
- Check Enable API if it isn't enabled yet.
- Copy API User Key and save changes.
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:
- 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)
- 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' => '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('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:
- 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)
- 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.
How to work with the products?
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.option.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.
How to work with orders?
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' => 'mail@gmail.com',
'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.
How to work with customers?
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' => 'mail@mail.com',
'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.
How to work with categories?
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.
What information should I provide to start working with API2Cart?
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.
Why do I need API Key?
What do I need to connect my store to API2Cart?
-
- 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.