This guide will show how to connect the AmeriCommerce platform to API2Cart. You need to log in to your AmeriCommerce store (or register). You can also create a 14-day trial store.

Creating a New App in AmeriCommerce

From the main menu, go to Tools → Apps & Addons and select API Token Manager:

How to connect AmeriCommerce to API2Cart. API Token Manager

Next, click the button to add a new app:

How to connect AmeriCommerce to API2Cart. Add new app

Set the app name and description:

How to connect AmeriCommerce to API2Cart. App name and description

Authorization Types

AmeriCommerce supports two types of authorization:

  • Single Token Flow — generates a non-expiring access_token.
  • OAuth2 Flow — the token is obtained via OAuth authorization. Authentication Documentation

1. Simple Authorization (Single Token Flow)

Step 1: Choose Single Token Flow

How to connect AmeriCommerce to API2Cart. Single Token Flow

Step 2: Select Scopes

It is recommended to select all available scopes, or at least those required for your integration. The system scope is mandatory as API2Cart needs store information. It is also recommended to select settings — provides warehouse, shipping, payment, and delivery method data.

How to connect AmeriCommerce to API2Cart. Selecting scopes

Step 3: Get Access Token

After saving, you will immediately receive an Access Token:

How to connect AmeriCommerce to API2Cart. Access Token generated

Step 4: Using the Token in API2Cart

This token should be used in Credential Set 1:

How to connect AmeriCommerce to API2Cart. Credential set 2
  • americommerce_access_token — the obtained Access Token

2. Authorization via OAuth2 Flow

OAuth2 Flow works by redirecting the user to a confirmation page where the store grants API access to your app.

Step 1: Choose OAuth2 Flow

How to connect AmeriCommerce to API2Cart. OAuth2 Flow

Step 2: Get Client ID and Client Secret

How to connect AmeriCommerce to API2Cart. Client ID & Secret

Step 3: Form OAuth Authorization Link

https://[store].americommerce.com/api/oauth?client_id=[client_id]&scope=people,orders,catalog,content,marketing,system,settings&redirect_uri=[redirect_url]

Where:

  • [store] — your store domain
  • [client_id] — your app’s Client ID
  • [redirect_url] — URL where AmeriCommerce will return code and auth_id
  • scope — the scopes granted for access

Available scopes are described here: Scopes Documentation

Step 4: Confirm Access

How to connect AmeriCommerce to API2Cart. Confirm screen

Step 5: Get code and auth_id at the redirect URL

How to connect AmeriCommerce to API2Cart. Returned params

Step 6: Generate Signature

Example PHP code:


        $appSecret = "APP_SECRET";
        $appId = "APP_ID";
        $code = "OAUTH_CODE";
        $scope = "people,orders,catalog,content,marketing,system,settings";
        $redirectUri = "https://example.com/callback/";

        $data = $appSecret . $code . $appId . $scope . $redirectUri;
        $signature = hash('sha256', $data);

        echo "Signature: " . $signature;
     

Note:

  • The redirect_url must end with a slash /.
  • Use the same scopes selected during app authorization.

Step 7: Obtain access_token via API

Execute the request:

  curl --location 'https://yourstore.americommerce.com/api/oauth/access_token' \
  --data-urlencode 'client_id=APP_ID' \
  --data-urlencode 'auth_id=AUTH_ID' \
  --data-urlencode 'signature=GENERATED_SIGNATURE'
      

Step 8: Using refresh_token in API2Cart

If the signature is generated correctly, the response will return a refresh_token. It should be used in Credential Set 0:

How to connect AmeriCommerce to API2Cart. Credential set 1
  • americommerce_app_id — your app’s App ID
  • americommerce_app_secret — your app’s Client Secret
  • americommerce_refresh_token — obtained refresh_token

After this, your AmeriCommerce store will be successfully connected to API2Cart.


Table of Required AmeriCommerce App Scopes for our API Methods:

MethodScopes
account.cart.addsystem
account.config.updatesystem
cart.validatesystem
cart.deletesystem
cart.infosystem, settings
product.listread_catalog
product.countread_catalog
product.inforead_catalog
product.child_item.listread_catalog
product.child_item.inforead_catalog
product.addcatalog
product.updatecatalog
product.deletecatalog
product.image.addcatalog, system (upload)
product.image.updatecatalog
product.image.deletecatalog
product.brand.listread_catalog
product.variant.addcatalog
product.variant.updatecatalog
product.variant.deletecatalog
category.listread_catalog
category.countread_catalog
category.inforead_catalog
order.countread_orders
order.listread_orders
order.inforead_orders
order.status.listread_orders
order.shipment.listread_orders
order.shipment.inforead_orders
order.shipment.addorders
order.shipment.updateorders
order.shipment.deleteorders
order.addorders
order.updateorders
customer.listread_people
customer.countread_people
customer.inforead_people
customer.addpeople
customer.updatepeople
customer.address.addpeople
customer.deletepeople