LogoLogo
Build appsContact API support
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
  • REST API
    • REST API overview
    • Store Profile
      • Get store profile
      • Update store profile
      • Upload store logo image
      • Delete store logo image
      • Store reports
        • Get store reports
        • Get latest store update stats
        • Get deleted items history
    • Orders
      • Search orders
      • Get order
      • Get last order
      • Calculate order details
      • Update order
      • Create order
      • Delete order
      • Get repeat order URL
      • Order invoices
        • Get order receipt PDF
        • Get tax invoices for order
        • Generate tax invoice for order
      • Order statuses
        • Search order statuses
        • Get order status
        • Update custom order status
      • Order extra fields
        • Search order extra fields
        • Update order extra field
        • Add extra fields to order
        • Delete order extra field
      • Abandonned carts
        • Search abandoned carts
        • Get abandoned cart
        • Update abandoned cart
        • Convert abandoned cart to order
      • Recurring subscriptions
        • Search recurring subscriptions
        • Get recurring subscription
        • Update recurring subscription
    • Products
      • Search products
      • Get product
      • Update product
      • Create product
      • Delete product
      • Delete all products
      • Adjust product stock
      • Get product filters
      • Get recently used product swatches
      • Search product brands
      • Product images and videos
        • Upload main product image
        • Upload main product image (async)
        • Upload gallery product image
        • Upload gallery product image (async)
        • Delete main product image
        • Delete gallery product image
        • Delete all gallery product images
        • Upload main product video
        • Upload gallery product video
        • Upload cover for gallery video
        • Delete main product video
        • Delete gallery product video
        • Download gallery product video
        • Bulk update product images and videos
      • Product files
        • Upload product file
        • Download product file
        • Delete product file
        • Delete all product files
        • Change product file description
      • Product variations
        • Search product variations
        • Get product variation
        • Update product variation
        • Create product variation
        • Delete product variation
        • Delete all product variations
        • Adjust product variation stock
        • Upload product variation image
        • Upload product variation image (async)
        • Delete product variation image
      • Product types and attributes
        • Search product types
        • Get product type
        • Update product type and attributes
        • Create product type
        • Delete product type
      • Product reviews
        • Search product reviews
        • Get product reviews stats
        • Update product review status
        • Bulk update/delete product reviews
        • Delete product review
    • Categories
      • Search categories
      • Search categories by path
      • Get category
      • Update category
      • Create category
      • Delete category
      • Category images
        • Upload category image
        • Upload category image (async)
        • Delete category image
      • Manage order of categories in the store
        • Get order of categories
        • Update order of categories
      • Manage order of products in the category
        • Get order of products
        • Update order of products
        • Assign products to the category
        • Unassign products from the category
    • Customers
      • Search customers
      • Get customer
      • Update customer
      • Create customer
      • Delete customer
      • Customer groups
        • Search customer groups
        • Get customer group
        • Update customer group name
        • Create customer group
        • Delete customer group
      • Customer contacts
        • Search customer contacts
        • Get customer contact
        • Update customer contact
        • Create customer contact
        • Delete customer contact
      • Customer extra fields
        • Search customer extra fields
        • Get customer extra field
        • Update customer extra field
        • Create customer extra field
        • Delete customer extra field
    • Discounts
      • Promotions
        • Search promotions
        • Update promotion
        • Create promotion
        • Delete promotion
      • Discount coupons
        • Search discount coupons
        • Get discount coupon
        • Update discount coupon
        • Create discount coupon
        • Delete discount coupon
    • Domains
      • Search store domains
      • Update store domains
      • Search domains for purchase
      • Purchase domain
      • Send domain verification email
      • Reset domain password
    • Dictionaries
      • Country codes
      • Currency codes
      • Currency codes by country
      • State codes by country
      • Tax classes by country
    • Staff accounts
      • Search staff accounts
      • Get staff account
      • Get staff account scopes
      • Update staff account
      • Create staff account
      • Delete staff account
      • Resend staff account invite
      • Cancel staff account invite
    • Application
      • Get app subscription status
      • Cancel app subscription
      • Get all app storage data
      • Get specific app storage data
      • Update specific app storage data
      • Delete specific app storage data
      • Add app storage data
      • Custom charge with Ecwid billing
    • Batch requests
      • Create batch request
      • Get batch status
      • Search batch requests by status
      • Stop batch request
      • Stop and delete batch request
    • Shipping options
      • Search shipping options
      • Update shipping option
      • Create shipping option
      • Delete shipping option
    • Payment options
      • Search payment options
      • Get payment option
      • Update payment option
      • Create payment option
      • Delete payment option
    • Checkout extra fields
      • Add checkout extra fields with JavaScript
      • Manage checkout extra fields with REST API
        • Search checkout extra fields
        • Get checkout extra field
        • Update checkout extra field
        • Create checkout extra field
        • Delete checkout extra field
    • Storefront widget details
      • Get page slug and static code
      • Set base URL for storefront widgets
      • Optimize custom website SEO with better URLs
        • Enable Clean Store URLs on a custom website
        • Set Custom Page Slugs on a custom website
      • Dynamic loading for storefront widget
      • SSO (Single-Sign-On) for websites
        • Add SSO to the website
        • Customize SSO on the website
        • SSO code examples
      • Static store pages
        • Static code for home page
        • Static code for category page
        • Static code for product page

Lightspeed® 2025

On this page
  • Creating new Ecwid account
  • Changing the account subscription
  • Suspending/resuming a user account
  • Deleting a user account
  • Getting info about the store
  • Checking a user account status
  • How to clone a store using the Ecwid Clone Store API
  • Getting a list of all stores that are registered for the given partner
  • Getting the list of partner plans, available for subscription
  • Single sign-on (SSO) using Partner Key mechanism
  • Embedding Ecwid Control Panel
  • Implementing Custom Save Button
  • Static Embedding of Ecwid Widget
  • Dynamic Embedding of Ecwid Widget
  • Deferred Initialization of Ecwid Widget
  • Improving SEO with Static Pages
  • Centering popups in iframe (storefronts and stores’ control panel)
  • Tracking customer navigation in embedded control panel
  • Color Management for Ecwid Widget (Chameleon)
  • Accessing Ecwid Developer API
  • Using Ecwid Developer API
  • Product API extensions for partners
  • Setting language of control panel
  • Billing Rules
  • Trial plans in Ecwid
  • Define upgrade URLs
  • Profile-based Ecwid SSO

Was this helpful?

  1. Partner API

Partner API calls

Last updated 17 days ago

Was this helpful?

Partner API (also called Reseller API) is only available to Ecwid reseller partners. It allows managing partner channel settings and stores on this channel.

This API is unavailable to the store owners.

Creating new Ecwid account

This method allows you to create a new Ecwid store with some default settings on your partner channel. It works with both APIv3 and APIv1, though APIv1 is no longer supported. So we recommend using APIv3.

You need a master application for your partner channel and its API keys to use this request. If you don't have one yet, please contact your .

Creating stores using API v3

POST https://app.ecwid.com/api/v3/stores?returnApiToken={true/false}

Headers

Both headers are required:

X-Ecwid-App-Client-Id - accepts client_id of your master app X-Ecwid-App-Secret-Key - accepts client_secret of your master app

Request body

The request body is JSON-formatted. It contains the merchant object with two fields inside (both are required):

Field
Type
Description

email

string

Store owner’s email.

name

string

Store owner’s name.

Query parameters

Set returnApiToken to true to receive an access token in the response alongside the Store ID (id). Having both, use API calls to manage store data.

Request example in HTTP and PHP:

POST /api/v3/stores?returnApiToken=true HTTP/1.1
Host: app.ecwid.com
X-Ecwid-App-Client-Id: client_id
X-Ecwid-App-Secret-Key: client_secret
Content-Type: application/json

{
    "merchant": {
        "email": "example@example.com",
        "name": "John Doe"
    }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://app.ecwid.com/api/v3/stores?returnApiToken=true',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "merchant": {
        "email": "example@example.com",
        "name": "John Doe"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'X-Ecwid-App-Client-Id: client_id',
    'X-Ecwid-App-Secret-Key: client_secret',
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

If you need to check if there is a store registered with the specified email, please use the following GET request:

GET https://app.ecwid.com/api/v3/stores?email={email}

Headers

Both headers are required:

X-Ecwid-App-Client-Id - to pass the ClientId X-Ecwid-App-Secret-Key - to pass the SecretKey

Creating stores using API v1

with these parameters:

- email: store email, will be used as a login

- password

- name: Owner full name

- key: API key

- plan: internal name of the active partner plan to create the initial subscription for the store

- billing (optional): set billing period for the account subscription. Possible values: monthly, annual. If parameter is not set then monthly value is used by default.

- is_trial (optional): enables trial period for the store. Possible values: false, true.

Type of value should be string (mandatory). Use this parameter to subscribe store to the trial version of paid plan. Number of days in trial period is set individually for every partner’s plan. If parameter is not set then false value is used by default. Ecwid will not bill partner for the duration of free trial. After free trial expires partner will be billed according to selected plan rates. If customer did not subscribe for the services partner must suspend/delete account at the end of free trial period to avoid charges for this account.

- ip (optional): IP address of owner. It will be used to detect owner’s location and automatically configuring store defaults (including time zone and default language) for that location. If you don’t know IP but know the country of the owner, just specify any IP belonging to the country to correctly pre-configure the store defaults.

- timezone (optional) Time zone of the store. (e.g. America/New_York, Europe/London, Asia/Tokyo, Africa/Johannesburg see timezones in Ecwid backend for the full list). - defaultlanguage (optional) Storefront default language. Two letter language code (e.g. en, fr, exceptions: es_419, pt_BR)

- profile_id (optional) assign a new store to the existing profile ID in Ecwid (see Profile-based Ecwid SSO for resellers for more details)

- returnProfileId (optional) if set to 'true' profile ID will be returned in response in addition to the store ID. The profile ID format is a string starting with a 'p' and following with numbers. Example: p987654321

- external_account_id (optional): ID of the external account (R-Series) connected to the created store

- Accept-Language HTTP header can be used as usual to specify the store’s language. If missing, English language is used.

If a new account/store is created successfully, Ecwid will return the 200 OK HTTP status and this code:

<?xml version="1.0" encoding="UTF-8"?><ownerid>OWNERID</ownerid>

where OWNERID is an ID you should use in the widgets.

If Ecwid already has a store with the same email, the 409 status will be returned (in this case please use the profile_id parameter to create a new store).

If the e-mail isn't valid: 400

If API key isn't valid: 403

Example in Java

import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.methods.multipart.*;
import org.apache.commons.httpclient.params.*;
import org.dom4j.Document;
import org.dom4j.io.SAXReader;

/**
 * Example Java code for creating a store using reseller API.
 */
public class TestClient {
    public static void main(String[] args) throws Exception {
        HttpClient client = new HttpClient();
        PostMethod post = new PostMethod("https://my.ecwid.com/resellerapi/v1/register?register=y");
        Part[] parts = {
                new StringPart("email", "test@example.com"),
                new StringPart("name", "Tester Tester"),
                new StringPart("password", "tester"),
                new StringPart("key", "12345"),
                new StringPart("plan", "ECWID_FREE"),
                };
        HttpMethodParams params = new HttpMethodParams();
        post.setRequestEntity(new MultipartRequestEntity(parts, params));

        if (client.executeMethod(post) != 200) {
            System.err.println("Error creating store: " + post.getStatusLine());
            return;
        }
        
        SAXReader reader = new SAXReader();
        Document doc = reader.read(post.getResponseBodyAsStream());
        int ownerid = Integer.parseInt(doc.getRootElement().getText());

        System.out.println("Successfully created: "+ownerid);
    }
}

Changing the account subscription

You can change the account subscription for the account previously created by you with the help of /resellerapi/v1/register API call (see above). Changing the subscription will stop the current subscription and create a new one for the plan provided.

To change the plan make a POST request to this URL:

with the following parameters:

  • ownerid: the Ecwid store ID, as an integer number

  • key: your reseller API key previously used to create the account

  • plan: the internal name of the active partner plan to create the initial subscription for the store

  • billing (optional): set billing period for the account subscription. Possible values: monthly, annual. If parameter is not set then monthly value is used by default.

To unsubscribe from the current plan to the default one make a POST request to this URL:

with these parameters:

  • ownerid: the Ecwid store ID, as an integer number

  • key: your reseller API key previously used to create the account

This will stop your current subscription for the account and bring it back to the free plan, defined for the partner. The same result can be achieved by calling /subscribe and specifying your default plan name in the plan parameter.

If the request succeeds, the response 200 OK is returned, and the new expiration date is provided in the following XML format:

<subscribe-response>
<expirationDate>2012-05-20T06:44:53.627-04:00</expirationDate>
</subscribe-response>

If the new subscription has no expiration date, the empty xml is returned:

<subscribe-response/>

If the request fails, the response will contain the reason for the failure, for example:

HTTP ERROR 400

Problem accessing /400. Reason:

Plan 'TEST' not found for partner TestPartner

Suspending/resuming a user account

You can suspend or resume a user account you have previously created with the /resellerapi/v1/register API call (see above). Suspending a user account prevents the storefront from showing any products or creating orders. Suspended accounts allow users to use their Control Panel though.

To suspend, make a POST HTTP request to the following URL:

To resume a previously suspended account, make the following POST HTTP request:

The parameters for both calls are the following:

  • ownerid - the Ecwid store ID, as an integer number

  • key - your reseller API key which was used to create the account

On success, both calls return HTTP status 200. Suspending an already suspended account and resuming an already active account makes no effect and returns status code 200.

Deleting a user account

If you want to delete an account, you should make a POST HTTP request to the following URL:

The parameters for this call are the following:

  • ownerid - the Ecwid store ID you want to delete

  • key - your reseller API key

On success, you will see HTTP status 200. If you cannot delete an account (e.g. it wasn't created by you), the 403 HTTP error will be returned.

Important notice: deleting account does not remove its billing records. At the end of the billing cycle you will be invoiced for the period that account was active.

Getting info about the store

If you want to get info about one of partner’s stores you should make a POST HTTP request to the following URL:

The parameters for this call are the following:

  • store.id - the Ecwid store ID information you want to get. store.ids for multiple stores

  • key - your reseller API key

On success, it will return HTTP status 200 and a small XML document containing basic information about the store and its subscription and billing.

Checking a user account status

You can query status information on an account created previously by the /resellerapi/v1/register API call (see above). Make a POST HTTP request to the following URL:

The parameters are:

  • ownerid - the Ecwid store ID, as an integer number

  • key - your reseller API key which was used to create the account

On success, the call returns HTTP status 200 and the XML listing apps installed, information about the store subscription and billing, plan features enabled/disabled, shipping and payment configuration, tax settings and zones:

  • ownerid - echoes the ownerid in the request

  • profile_id - Ecwid profile ID associated with this store

  • suspended - “true” if the store was suspended

  • closed - “true” is the store was closed by the user

  • email - the current email of the account

  • name - the person name in the account profile

  • traffic - amount of web traffic consumed by the store since the start of the month

  • storage - amount of billable storage occupied by the store, including store images and files.

  • shippingAndTaxSettings - current zones, shipping and tax settings

  • account-type - information about the subscription. The most useful tag there is subscription/originalProduct, which contains the current user’s plan.

  • carrier-settings - (deprecated)

  • paymentmethods - payment method list

  • total - total of all orders in the store currency, except unfinished orders.

  • currency - store currency ISO code

  • productCount - product count

  • categoryCount - category count

  • source - value of source parameter that was defined during account creation. If not defined the tag is missing

If the store with such ID does not exist, the call returns HTTP status 404.

If the store does not belong to your API key, the call returns HTTP status 403.

How to clone a store using the Ecwid Clone Store API

The Ecwid Partner APIs allows an Ecwid reseller to create and manage accounts (stores) in Ecwid. In some cases, it may be convenient to have a single "template" store and clone it to create new stores — to make it easier pre-filling new stores with products, settings etc. The Ecwid Clone Store API can be used to do that.

Please refer to this documentation for details: Cloning API

Getting a list of all stores that are registered for the given partner

Include the following parameters:

  • date.from Stores created after the given date/time will be returned. The date/time is given either as a UNIX timestamp or a ‘YYYY-MM-DD’ string.

  • store.id (optional). If specified, select a store with the given ID. store.ids for multiple stores

  • url.substring (optional). If specified, limits stores only to those having certain substring in their URL.

  • email.substring (optional) If specified, limits stores only to those having certain substring in their email.

  • date.to (optional). If specified, limits stores to those created before the given date/time. The date/time is given either as a UNIX timestamp or a ‘YYYY-MM-DD’ string.

  • timezone (optional, default is ‘GMT’). The name if the timezone used to parse date.from and date.to fields.

  • suspended (optional). If specified, lists only stores with the given “suspended” status. Possible values are: “y”, “yes”, “1”, “true”, “t”, “n”, “no”, “0”, “false”, “f”.

  • order (optional, defaults to “id"). Specifies criteria used to sort stores. One of “id”, “email”, “url”, “traffic”, “storage”, ”date”, “id_desc”, “email_desc”, “url_desc”, “traffic_desc”, “storage_desc”, ”date_desc”.

  • key. Your partner API key.

  • offset (optional, default is "0"). Starting offset of the result window. Used to create pagination.

  • limit (options, defaults to “20"). Number of stores to return, an integer value in the range [0; 100].

On success, returns store list in the following format:

<storeList>
 <stores>
   <id>STORE ID</id>
   <channelId>PARTNER ID</channelId>
   <name>Store name</name>
   <nick>Store owner's nickname</nick>
   <email>Store owner's email</email>
   <url>Store URL</url>
   <planName>Name of partner plan</planName>
   <planChangeableByReseller>either 'true' or 'false'</planChangeablebyReseller>
   <planExpiration>Plan expiration date</planExpiration>
   <suspended>'Suspended' status, either 'true' or 'false'</suspended>
   <test>’true’ for test accounts and ‘false’ for others</test>
   <trial>’true’ for trial subscriptions and ‘false’ for life</test>
   <traffic>Traffic consumed since start of the month, bytes</traffic>
   <storage>Storage consumed by the store data, bytes</storage>
   <registered>Store registration date</registered>
 </stores>
...more store data...

 <total>TOTAL NUMBER OF STORES MATCHING CRITERIA</total>
</storeList>

On error, returns one of the following HTTP status:

  • 403 - wrong API key

  • 412 - wrong parameter format

  • 500 - internal error

Getting the list of partner plans, available for subscription

You can get the list of active partner plans, available for subscription. To get them make a POST request to this URL:

If the request succeeds, the response code 200 is returned, and the response body will contain the list of plans in XML format:

<planList>
    <plans>
        <active>true</active>
        <canUserCancel>true</canUserCancel>
        <channelId>TestPartner</channelId>
        <ecwidBilling>true</ecwidBilling>
        <id>3</id>
        <maxCategoryCount>1500</maxCategoryCount>
        <maxProductCount>30000</maxProductCount>
        <monthlyPrice>17.0</monthlyPrice>
        <name>TEST_PLAN_NAME</name>
        <premiumFeatures>true</premiumFeatures>
        <sendCancellationEmailToBillingManager>true</sendCancellationEmailToBillingManager>
        <suspendWhenExpired>false</suspendWhenExpired>
        <title>Test Plan Title</title>
        <trialDays>14</trialDays>
    </plans>
...
</planList>

If the request fails, the reason for the failure is returned.

Single sign-on (SSO) using Partner Key mechanism

In order to login a user into Ecwid store control panel, the control panel should be opened through the following URL:

https://my.ecwid.com/cp/partner-login?ownerid=[ID]&t=[TIMESTAMP]&login_sha256token=[TOKEN]&place=[PAGE_HASH]&logout_url=[LOGOUT_URL]&upgrade_url=[UPGRADE_URL]&lang=[LANGUAGE_CODE]&inline&profile_id=[PROFILE_ID]

where:

  • my.ecwid.com domain may be different if your Ecwid admin URL uses a custom domain.

  • ID - Store ID, e.g. 1003

  • PROFILE_ID - Login to a specified profile ID (see Profile-based Ecwid SSO for resellers for more details), optional param.

  • TIMESTAMP - UNIX timestamp of a token creation time. Time should be in UTC and timestamp should be in seconds.

  • TOKEN - the token itself that is a SHA256 hash, created by concatenation of the following parameters: timestamp + store_id + channel_id + partner_api_key. The token must be generated in lowercase.

Token generation params:

  • PAGE_HASH - (optional) the hash part of control panel page’s URL-address that should be opened after sign-on (Dashboard page if was not defined). If page hash is using additional parameters, they should also be used in this request. E.g. place=order:id=V8SQC

  • LOGOUT_URL - Ecwid will redirect a user to this URL if his/her session is expired. Usually it is URL of a partner’s control panel or “log in” page.

  • LANGUAGE_CODE - a two letter language code for the store control panel

  • inline - (optional) displays control panel in iframe friendly manner with header and footer removed

The UPGRADE_URL parameter works in the following way:

  • When passing a value via UPGRADE_URL - that value is assigned as Upgrade URL for that particular store.

  • When passing empty value via UPGRADE_URL - a current Upgrade URL for that store is reset. In this case, one of two options is possible:

  1. If Channel_Upgrade_URL (URL that is set for a partner on the Ecwid side) is set, Ecwid will redirect a user to that Channel_Upgrade_URL.

  • If UPGRADE_URL is not passed at all - a current Upgrade URL (that was set earlier) is used.

  • send_postmessage_on_upgrade_button_click Enables sending postmessage when upgrading. Possible values: false, true. Optional param.

Please note that when both upgrade_url and send_postmessage_on_upgrade_button_click parameters are passed in the SSO URL simultaneously then postmessages only will be sent.

When clicking Upgrade buttons, Ecwid sends postmessage in the following format:

{
  event: 'upgrade-link-click',
  feature: 'coupons',
  plan: 'PARTNER_PLAN_NAME'
}

where

feature - name of a feature an upgrade button was clicked for;

plan - name of a plan where the feature is available.

Please note that the option to send upgrade postmessage can be enabled or disabled on the partner channel level. Contact your partner manager to enable or disable it.

Request limitations:

  • A token is valid for 5 minutes from the time specified in the timestamp.

  • The URL provided works with HTTPS only, not HTTP.

  • SSO session will expire in 27 hours after the last active RPC request from the control panel. So if the control panel is open in your browser it will keep sending heartbeats and the session will not expire.

PHP code sample:

<?php
$time = time();
$store_id = STORE-ID;
$channel_id = "YOUR-CHANNEL-ID";
$apikey = "YOUR-API-KEY";
$token = $time . $store_id . $channel_id . $apikey;
$token = sha256($token);

echo "https://my.ecwid.com/cp/partner-login?ownerid=$store_id&t=$time&login_sha256token=$token&place=order&logout_url=http://example.com&upgrade_url=http://billing.com" . "\n";
?>

Embedding Ecwid Control Panel

For seamless customer experience it is possible to embed Ecwid control panel into a third party product using seamless iframe. Please make sure that you are using the Ecwid SSO for seamless customer experience. The iframe will automatically adjust its height depending on the content of control panel page. Below is an example of simple HTML page with embedded Ecwid control panel:

<html>
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    </head>
  
<body>

<h1>Sample of Ecwid control panel embedding</h1>


<script type='text/javascript'>//<![CDATA[ 
window.onload=function(){
 // Create IE + others compatible event handler
    var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
    var eventer = window[eventMethod];
    var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
 
    // Listen to message from child window
    eventer(messageEvent,function(e) {
        $('#ecwid-frame').css('height', e.data.height + 'px');
    },false);
 
    $(document).ready(function(){
              $('#ecwid-frame').css('height', '700px');
 
        $('#ecwid-frame').attr('src', 'https://my.ecwid.com/cp/CP.html?inline');
    });
 
}//]]>  
 
</script>
 
 
      <div id="wrap">
        <iframe seamless id="ecwid-frame" frameborder="0" width="100%" height="700" scrolling="no"></iframe>
    </div>

  </body>
</html>

Implementing Custom Save Button

You can natively implement buttons in your product to save changes in the Ecwid control panel. This is useful if you display an Ecwid control panel in a webview of a mobile app or want to have your original controls to save changes.

Please note that Save page functions described below won’t work when the control panel is embedded in an iframe.

To control saving data in Ecwid control panel please use the following Javascript API functions:

EcwidControlPanel.onSavePageDataRequired(callback) - Ecwid will fire this callback when it detects that data was changed and requires saving.

EcwidControlPanel.savePageData() - save unsaved data in Ecwid control panel.

EcwidControlPanel.onSavePageData(callback) - callback is fired when data is saved. EcwidControlPanel.revertUnsavedPageData() - discard unsaved data in Ecwid control panel. EcwidControlPanel.onRevertUnsavedPageData(callback) - callback is fired when data is discarded.

Note: when customer leaves Ecwid control panel with unsaved changes it will display popup with warning to save changes even if save button is hidden.

Static Embedding of Ecwid Widget

In some cases it is necessary to load Ecwid widgets simultaneously with loading of a web page. This way of loading is called Static loading. For example, sitebuilders can load Ecwid widgets statically when customers publish their websites (with a store) live.

[IMPORTANT]:

  • Use a correct domain in the script.js

Please note that this correct for partners who use ecwid.com as the domain for their store Control panel.

If another domain is set as the domain for partner stores Control panel, in this case a partner should use that custom domain in the script.js.

Please contact with Ecwid Partner team and clarify your domain for the store CP and other questions regarding the script.js if any.

  • Call the script.js only once!

Dynamic Embedding of Ecwid Widget

In some cases it is necessary to dynamically create and destroy Ecwid widget within HTML page. This is useful for dynamic sitebuilders that switch to online store page without actually reloading page (e.g. making it visible). You should use window.ecwid_dynamic_widgets variable to enable dynamic widget creating in Ecwid. See the example below that shows how to create and destroy Ecwid widget through javascript functions.

Please note that this method allows to embed the Product browser widget only. If you need to embed other widgets dynamically, please, use the code for deferred widget initialization (next point).

Please note that this method is slower than direct embedding of Ecwid widget so you should use it only if you need dynamic widget creation.

<div id="my-store-1003"></div>
<script>
window.ecwid_script_defer = true;
window.ecwid_dynamic_widgets = true;

   if (typeof Ecwid != 'undefined') Ecwid.destroy(); 
   window._xnext_initialization_scripts = [{
        widgetType: 'ProductBrowser',
        id: 'my-store-1003',
        arg: ["categoriesPerRow=3","views=grid(3,3) list(10) table(20)","categoryView=grid","searchView=list"]
      }];

  if (!document.getElementById('ecwid-script')) {
      var script = document.createElement('script');
      script.charset = 'utf-8';
      script.type = 'text/javascript';
      script.src = 'https://app.ecwid.com/script.js?1003';
      script.id = 'ecwid-script'
      document.body.appendChild(script);
    } else {
      ecwid_onBodyDone();
    }

</script>

Deferred Initialization of Ecwid Widget

Sometime it is necessary to delay widget initialization while host page finish initialization procedures. This is useful when host site is built dynamically using libraries such as React js.

Use this integration code for deferred widget initialization:

<div id="my-store-1003"></div>
<div id="productBrowser"></div>
<script>
window.ecwid_script_defer = true;
var script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = 'https://app.ecwid.com/script.js?1003';
document.getElementById('my-store-1003').appendChild(script);
window._xnext_initialization_scripts = [
    { widgetType: 'ProductBrowser', id: 'productBrowser', arg: [
        '"categoriesPerRow=3","views=grid(4,4) list(10) table(20)","categoryView=grid","searchView=list","style=","responsive=yes","id=productBrowser"'
    ] }
];</script>

Improving SEO with Static Pages

This method will work only if your page with Ecwid widget is generated dynamically with a server side script e.g. Python, PHP, ASP etc. You need to add a piece of code to your page that fetches the HTML version of a store page and insert it into your page. Static Store Pages API also returns Meta tags and Open Graph tags it is highly recommended to insert them into your page as well.

You should do it dynamically each time the store page is loaded in the customer’s browser. Google bot will continue following links in the static page and will index the entire product catalog.

Store customers will be interacting with the dynamic Ecwid widget. To prevent customers from seeing a static copy of the store page you need to add a Javascript code that will hide the static part.

You can use the code example provided below for hiding static content: html_selector - is a HTML selector of the static content.

<script data-cfasync="false" data-no-optimize="1" type="text/javascript">
	function createClass(name,rules) {
		var style = document.createElement('style');
		style.type = 'text/css';
		document.getElementsByTagName('head')[0].appendChild(style);
		if(!(style.sheet||{}).insertRule)
			(style.styleSheet || style.sheet).addRule(name, rules);
		else
			style.sheet.insertRule(name+'{'+rules+'}',0);
	}
	createClass('#html_selector', 'display:none;');
</script>
<div id=’#html_selector’> 
	Static HTML code here
</div>

Sample code in PHP for extracting productid and categoryid from SEO friendly URL

<?
$pattern =  '!.*-(p|c)([0-9]+)(\/.*|\?.*)?$!';
if( preg_match( $pattern, $current_url, $matches ) ) {
	return array();
}
$modes = array(
	'p' => 'product',
	'c' => 'category'
);
return array( 'mode' => $modes[$matches[1]], 'id' => $matches[2] );
?>

Returned values:

mode = product - this is a product page

mode = category - this is a category page

mode is empty - this is a home page

id - productid or categoryid. Use it when calling the Static Pages API.

Centering popups in iframe (storefronts and stores’ control panel)

Ecwid can be embedded to a website in many ways. Sometimes a storefront can be inserted in an iframe container due to the limitations of a platform. To make sure that all popup windows such as customer account login popup are displayed in the center of an iframe, use the example code below in a main frame of your page. The example can be used for the storefront and the stores’ control panel.

Example of centering popups:

<script src='https://d1e443hvef5jf2.cloudfront.net/static/iframeintegration.js'></script>
<script type='text/javascript'>

window.addEventListener('load',  function(e) {
  setupEcwidPopupCentering('#myframe');
});

</script>

setupEcwidPopupCentering() function accepts one argument, which is the ID of an iframe element, where Ecwid storefront is loaded. In order to work, setupEcwidPopupCentering() function needs to have iframeintegration.js file loaded for that frame.

Tracking customer navigation in embedded control panel

Each time customer opens new page in embedded Ecwid control panel it sends following postmessage to the parent window:

{
    'action': 'pageLoad',
    'data': {
      'page': {
          'title': 'Catalog',
          'path': 'products',
        }
    },
    'height': 1200
}

This functionality is useful when creating deep product integration with Ecwid. For example change content of parent window depending on the page opened in Ecwid control panel.

Color Management for Ecwid Widget (Chameleon)

When embedding Ecwid widget into a website there is an easy way to make sure that Ecwid colors matching site colors. There are two options to define colors for Ecwid stores: automatic and manual.

  • Automatic color detection

You should add the following data structure before Ecwid widget integration:

<div><script type="text/javascript">
window.ec = {
config: {
chameleon: {
colors: 'auto'
}
}
}

Ecwid will change its main colors depending on website colors and will automatically calculate all intermediate colors in the interface to make sure that all elements are legible and have good contrast.

Please note that for some website themes the automatic mechanism may detect colors not ideally.

We recommend checking how colors were detected.

Please note that if Ecwid widgets are embedded into an iframe, the automatic mechanism will not work. In this case additional actions are required, please get in touch with Ecwid Bizdev team for more information on this.

In cases when the automatic mechanism cannot be used, please use the manual mechanism:

  • Manual color defining

Allows to define colors for Ecwid stores manually. Example of data structure that should be added before Ecwid widget integration:

window.ec ={

config:{

chameleon:{

'color-link': '#ffffff' ,

'color-button': '#00ff00',

'color-foreground': '#a1d3de' ,

//Set widget background transparency through alpha channel

'color-background': 'rgba(29,29,29,0)' ,

'color-price': '#df0739'

}

}

}

Turn off automatic background color in gallery

When the automatic Ecwid background color in the gallery does not work well, please use the parameter below to switch off automatic background color and use the color set manually.

ec.config.chameleon.colors.gallery.use_exact_colors = true

Accessing Ecwid Developer API

Ecwid provides many REST API calls for managing data in Ecwid stores.

If certain permissions are granted partner can access Developer API on behalf of customers. This is useful for building various types of integrations with third party products, consolidating customer data, building reports etc.

To access Developer API for a store it is necessary to retrieve access token that is unique for every store. Normally receiving access token requires manual permission granted by the store owner. However, for Ecwid partners, there is an alternative flow that allows generating access token without explicit confirmation from your users.

Before accessing the Developer API, you must ensure that this functionality is set and enabled for your partner account. You will need the following access credentials that should be provided to you by Ecwid: client_id and client_secret. If you do not have this data please get in touch with Ecwid representative.

Receiving access token (alternative flow for partners)

To receive token for online store make a POST request to the following endpoint:

client_id
required
Application ID

client_secret

required

Application secret key

grant_type

required

Must be authorization_code

{ownerid} in the endpoint path should be replaced with the Store ID number.

Please make sure that the correct domain my.ecwid.com is used to make POST request!

Important: an access token does not expire. So you will need to retrieve the token only once per store and then use it as many times as you need. In other words, you should save the token in your system and use it for all API calls instead of generating it every time you access the store over API.

After receiving access token partner should use it to access REST API as described in the API documentation above.

Using Ecwid Developer API

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description.

There are tables with detailed descriptions of the returned HTTP codes in each corresponding HTTP request’s section.

Also, there are several general errors related to requests of various types: 402 The store is suspended error is returned when the request is made to the suspended store. 403 Token doesn't exist error is returned when the request is made using the incorrect or invalid token.

Single Sign On to the control panel using the Developer API and store access tokens

Use the following endpoint to display Ecwid control panel and automatically log in customer into it:

my.{domain}/api/v3/{ownerId}/sso?token={token}&timestamp={timestamp}&signature={signature}

Make sure SSO access to Control Panel is available only to authorized users. SSO URL contains a REST API token allowing access to store data. Therefore, SSO requests shouldn't be available to users not logged in on your side.

Parameters:

  • domain - if your instance of Ecwid is located on custom domain please insert it here. Otherwise domain should be ecwid.com

  • ownerId - unique numeric identifier of the store. Also known as StoreID

  • token - ApiToken that was generated during store creation. Also could be received via oAuth endpoint or via Partner API

  • timestamp - UNIX timestamp for current date and time e.g. 1492688357

  • signature - is sha256 hash from concatenation of ownerid, token, timestamp and app_secret without spaces between them: sha256(ownerid+token+timestamp+app_secret). Signature should be generated without sha256 secret key. Please generate the signature in lowercase (mandatory!)

  • place, inline, logout_url, upgrade_url, send_postmessage_on_upgrade_button_click - see parameter description in Single sign-on (SSO) using token mechanism

  • disable_scroll_on_page_switch=true - (optional) disables automatic scrolling to the top after a page switch

  • hide_profile_header=true - (optional) hides all three elements: Visit storefront, Help menu, Profile menu.

  • hide_page_header=true - (optional) hides pages’ headers (text).

  • hide_footer=true - (optional) hides the footer.

  • hide_back_button=true - (optional) hides the Back button.

  • hide_dashboard_background_image=true - (optional) hides the background image in the new dashboard and replaces it with grey background.

  • hide_staff_accounts_header_menu=true - (optional) hides “My stores” link in the dashboard header. “**My stores” link allows opening admin panel of stores where a user is logged in when using the Staff accounts feature.

  • hide_vertical_navigation_menu - (optional) - hides main product navigation menu. This is useful when partner wants to implement navigation menu in host application outside iframe. Possible values: false, true. Ecwid will send post message navigationMenuUpdated after initial load of control panel and each time when menu is changed. Host application where Ecwid is embedded should listen for this message and use its data to build menu.

  • session_tag - (optional) arbitrary string that identifies a session. Used for SSO session invalidation (logging out customer).

{
   'action': 'navigationMenuUpdated',
   'data': {
     navigationMenuItems: [
       {
         'title': 'Catalog',
         'path': 'products',
         'items': {
           {
             'title': 'Products',
             'path': 'products'
           },
           {
             'title': 'Categories',
             'path': 'category:id=0&mode=edit'
           },
           {
             'title': 'Product Types',
             'path': 'product-classes'
           }
         }
       },
 
       {
         'title': 'Sales',
         'path': 'orders'
         ...
       },
 
       ...
     ]
   }
   'height': 1200 
}

If you need to use external menu outside the iframe you can use the following code to open necessary page in iframe without reloading it:

 window.ecwidOpenAdminPage = function (place) {
       jQuery('#ecwid-frame')[0].contentWindow.postMessage(JSON.stringify({
            ecwidAppNs: "your-app-namespace",
            method: "openPage",
            data: place
       }), "*") 
}

You can populate "place" variable with necessary target e.g. orders, products, etc

If authorization is successful then customer will be redirected to control panel otherwise 403 error will be returned.

If you need to disable scrolling while navigating between pages in the admin panel, you will need to use the optional parameter openWithoutScrolling.

If the address of the needed page is without parameters, then you need to add :openWithoutScrolling=true. If there are any parameters, you need to add &openWithoutScrolling=true.

For example, to open the “Orders” page without scrolling while navigating between pages, you can use the following code:

jQuery("#ecwid-frame")[0].contentWindow.postMessage(
  JSON.stringify({
    method: "openPage",
    data: "orders:openWithoutScrolling=true",
  }),
  "*"
);

To open the “Order Editor” page without scrolling while navigating between pages, you can use the following code:

jQuery("#ecwid-frame")[0].contentWindow.postMessage(
  JSON.stringify({
    method: "openPage",
    data: "app:name=ecwid-edit-orders&openWithoutScrolling=true",
  }),
  "*"
);

SSO session invalidation

Use this call to invalidate the SSO session (log out customer).

When you log in a user via APIv3 SSO, make sure that you are sending an optional session_tag string parameter.

When you need to log out a user, please do POST request to https://app.ecwid.com/api/v3/{storeId}/sso-logout?token=token

Use this JSON as its body:

{
    "sessionTag": "SESSION-TAG-VALUE"
}

Product API extensions for partners

Extensions list:

  • Managing list of enabled payment processors

Setting values in the store profile

As a partner, you can set additional parameters that are unavailable to regular users using REST API /products.

To modify store profile you should use PUT HTTP request to the following endpoint URL:

http://app.ecwid.com/api/v1/<ownerId>/profile?secure_auth_key=

In the body of request you should add JSON document, which may contain the following fields:

  • enabledOnlineProcessors - enabled online payment processors for given ownerId. Possible values are:

    • [] - allow all processors;

    • [“NONE”] - forbid all online payment processors;

    • [“processor1”, “processor2”, “processor3”] - allow all offline payment processors and all listed online payment processors.

It is possible to turn on payment processors, that will be supported in future. For example, you can enable “amex” for all your clients in advance and as soon as it will be released, this payment will appear in all stores automatically.

  • storeUrl - set store URL. Possible values are:

    • null - do not change store URL;

    • “” - reset store URL value;

    • new value of store URL. Must be valid URL beginning with “http://” or “https://”.

Response:

If storeUrl is not valid URL or does not start with “http://” or “https://”, server will respond with error 400 Bad Request.

If JSON with fields enableOnlineProcessors or storeUrl sent with customer API key, server will respond with error 403 Forbidden.

Examples of JSON document:

{
	"enabledOnlineProcessors": [ "new1", "new2"],
“storeUrl”: “http://storename.com”
}

Getting values through Product API

You can also get information about extended fields of store profile us API. To do so make GET HTTP request to the following endpoint URL:

http://app.ecwid.com/api/v1/<ownerId>/profile?secure_auth_key=

Among all default fields, additional field enabledOnlineProcessors will be listed. Possible values are:

  • [] - allow all processors;

  • [“NONE”] - forbid all online payment processors;

  • [“processor1”, “processor2”, “processor3”] - allow all offline payment processors and all listed online payment processors.

Upon requesting Product API with customer API key or anonymously, field enabledOnlineProcessors will not be listed.

Setting language of control panel

By default Control panel will automatically switch to the correct language depending on customer language setting in the web browser. However you can override this behaviour and display control panel in certain language. Use lang parameter to when when accessing control panel:

Use two letter language code to select necessary language:

Language
code

French:

fr

German:

de

Italian:

it

Dutch:

nl

Spanish:

es

Brazilian Portuguese:

pt_BR

Indonesian:

id

Czech:

cs

Hungarian:

hu

Turkish:

tr

Bulgarian:

bg

Norwegian:

no

Swedish:

sv

Danish:

da

Polish:

pl

Finnish:

fi

Billing Rules

Trial plans in Ecwid

Ecwid allows to create new stores subscribed to the trial version for the paid plan, if this functionality was enabled during partner creation. It is possible to define number of trial days for paid plan and the plan itself for which trial subscription will be available.

*Note: Number of trial days and the trial subscription availability are defined by Ecwid and can’t be managed through Partner API.*

How to subscribe to trial plan?

Subscription to trial plan can be done together with new account creation only. (See: Create new Ecwid account) There is no way to subscribe existing store to trial version of paid plan.

Among with general parameters required for the new account creation you will need to pass the following:

  • is_trial = true This parameter will mark the account as a “trial”

  • plan = Name of the plan for trial subscription (Usually discussed in contract and can’t be changed afterwards).

What is next?

When the request on new trial account creation is received, Ecwid creates new account and subscribes it to the paid plan with the expiration date calculated as:

date of subscription + number of trial days

Our internal script will check all trial subscriptions periodically and switch them to “Live” mode automatically, when trial period is over. All trial subscriptions are converted to Live paid subscription automatically and you will be billed for them accordingly.

Define upgrade URLs

There are lot of upgrade URLs in Ecwid interface they trigger upgrades when customer want to use certain functionality that is not available for the current plan. Normally they just lead to Ecwid plans page but partner can redefine them and point to alternative location e.g. to partner’s billing page where customer can manage their subscription.

This URL can be setup globally for all stores during initial deployment just specify it in partner questionnaire. You can also define Upgrade URL as parameter when doing SSO.

Profile-based Ecwid SSO

Definitions

Partner — Ecwid's reseller partner who provides their customers with Ecwid stores.

User — Partner's customer (seller)

Ecwid store — an Ecwid store with unique 'store ID' property.

Ecwid control panel — a web page allowing the user to manage a particular Ecwid store.

Ecwid profile ID — a special unique property that identifies the owner of an Ecwid store. Each profile ID can be assigned to several stores meaning this person can open different Ecwid control panels under the same login session.

Intro. What problem are we solving here?

Ecwid Control Panel can be embedded into the partner product seamlessly. Some partners allow users to create several Ecwid stores under one partner account. For example, a user can have several sites created under their account on the partner side and they need a separate store added to each site. In this case, the partner may want to allow opening different Ecwid control panels in different browser tabs — e.g. to allow the user to manage each site and store in a separate tab.

Normally, Ecwid doesn't allow users to be logged in different accounts in the same browser — each new login will override the previous ones so that all opened control panels will display the same Ecwid account.

The doc below explains how to have several different Ecwid accounts opened in the same browser.

Profile-based SSO API Basics

The solution relies on a special internal property of Ecwid accounts — 'profile ID'. Several Ecwid stores can be assigned to the same profile ID, which tells Ecwid those actually belong to the same person and can be opened in the same browser session with no need to log out and log in again.

Ecwid automatically generates and stores that profile ID when a new store is created. However, it's possible to specify the profile ID for a newly created store so that it's assigned to an existing profile ID.

When using the Ecwid SSO API, it's possible to pass the profile ID parameter to let Ecwid know the control panel is being opened under specific profile ID. If other stores under the same profile ID are opened in the same browser, they won't be logged out — everything will work well.

Below are the details on how to do that for new and existing customers.

How to make it work for new users

Partner gets an Ecwid profile ID when creating first Ecwid store for the user

When the partner creates the first Ecwid store for the user via the Ecwid Partner API (the /resellerapi/v1/register endpoint), the partner should pass a special parameter 'returnProfileId=true' to the request to make Ecwid return the generated profile ID of that store. When the store is created, the corresponding profile ID will be returned in response in addition to the store ID. The profile ID format is a string starting with a 'p' and following with numbers. Example: p987654321.

The partner should store that profile ID corresponding to the user on their side.

Request:

POST https://my.ecwid.com/resellerapi/v1/register?register=y&returnProfileId=true

Response:

<?xml version="1.0" encoding="UTF-8"?>
<store>
  <ownerid>12345</ownerid>
  <profileid>p987654321</profileid>
</store>

Partner specifies the profile ID when creating new Ecwid stores for the existing user

If the same user requests to create another Ecwid store (e.g. to add a store to their another site), the partner should pass the existing profile ID in the request query to the Ecwid Partner API. This will assign a new store to the same profile ID in Ecwid.

Request:

POST https://my.ecwid.com/resellerapi/v1/register?register=y&profile_id=p98765

Partner passes the profile ID parameter in SSO request when logging in the user to an Ecwid control panel

When opening the Ecwid control panel using the Ecwid SSO API, partner should pass the profile_id query parameter to make Ecwid log that user into the specific profile ID.

Request:

GET https://my.ecwid.com/cp/partner-login?ownerid=[ID]&profile_id=p98765

That's it. Several logins to Ecwid control panel with the same profile ID can work in the same browser without interrupting each other.

Example

Let's say a customer creates several sites in the partner product (e.g. sitebuilder) and adds a new store to each site.

  1. john@partner-sitebuilder.com requests to add a store to their site A

  • The partner checks if the user already has an Ecwid profile ID assigned. This is a new customer, so let's say there is no Ecwid profile ID on file.

  • The partner uses the Ecwid Partner API to register a new store and specifies 'returnProfileId=true' in the request

  • Ecwid returns the store ID 123 and the profile ID p98765 for the new store

  • The partner saves the Ecwid profile ID in the user record to keep the link between john@partner-sitebuilder.com and Ecwid profile ID p98765 in the system.

  1. john@partner-sitebuilder.com requests to add a store to their another site — site B

  • The partner checks if the user already has an Ecwid profile ID assigned. This time, the Ecwid profile ID is there — it's p98765.

  • The partner uses the Ecwid Partner API to register a new store and specifies _'profile_id=_p98765 in the request

  • Ecwid creates a new store and assigns it to the existing profile instead of generating a new profile. The response specifies the new store ID 456. Now, two stores in Ecwid are assigned to that profiel: store ID 123 and store ID 456.

  1. john@partner-sitebuilder.com opens store control panels in the partner UI.

  • The user manages the site A in one browser tab, and the site B in another browser tab

  • To display the Ecwid control panel, the partner uses the Ecwid SSO API and passes the profile_id parameter in request.

  • The control panel A and the control panel B work simultaneously in different browser tabs.

How to make it work for the existing users

Partner's existing Ecwid stores were registered before the above mentioned API became available. All of those stores have different profile IDs assigned, even the stores of the same customer are separate. To make the new approach working for the old users, the partner needs to re-assign profile ID for those existing users who run several Ecwid stores.

Below is an instruction on how to do that for each particular user.

Partner finds Ecwid stores belonging to the user and their profile IDs

Partner should check the Ecwid stores belonging to a user and get their profile IDs. This can be done via the /status endpoint of the Partner API. The profile ID field will present in the XML response.

Request:

POST https://my.ecwid.com/resellerapi/v1/status

Response (XML):

…
<profileid>p987654321</profileid>
…

Partner assigns the same profile ID for all Ecwid stores belonging to the user

Now the partner has a list of stores and profile IDs assigned to them. Partner should choose any of those profile IDs (e.g. the first one) and assign it to all stores of that customer, so that all stores have the same profile ID.

To change the profile ID of the store, the Ecwid's Partner API /change-store-profile endpoint can be used. It requires the following parameters:

  • key: the Partner reseller key

  • ownerid: the store ID

  • src_profile: the old profile ID

  • dst_profile: the new profile ID

The partner will get 200 OK in response if the profile ID has re-assigned.

Request:

POST https://my.ecwid.com/resellerapi/v1/change-store-profile?ownerid=123&key=abc123&src_profile=p98765&dst_profile=p55555

When it's done for all stores of the user, the new profile-based SSO API can be used as explained above.

Note on security

When the same profile ID is specified for several stores, it tells Ecwid that the user associated with that profile ID can manage all of those stores without extra login/password. So, partners should be careful when assigning profile ID to avoid unintentionally giving a wrong user access to the store data.

When creating a new store you can send multiple optional parameters to pre-configure the store. Please refer to this documentation for details:

You should receive a 404 error, meaning there are no registered stores for this email. Please refer to the endpoint documentation for details:

To create new Ecwid account just make a POST request to this URL:

The following example demonstrates store creation in Java programming language. The following libraries are required to run the example: , , for parsing the response.

To retrieve a list of your customers’ stores, make a POST request to the following endpoint URL:

Please note that is now available and has more functionality. We recommend switching to the Developer API SSO.

UPGRADE_URL - allows setting an upgrade URL for every partner’s store. Ecwid will redirect a user to this URL if he/she clicks any upgrade button within store Control panel (e.g. ). For more information on upgrade URLs format refer to Define upgrade URLs

If Channel_Upgrade_URL is not set, a user will not be redirected anywhere and just see a popup with an explanatory text:

Ecwid admin is often embedded in a partner service in a form of an iframe. In this case, when a merchant clicks upgrade button, Ecwid can send a postmessage to the "parent" window and then the partner admin interface handles it accordingly. For example, the partner can show a popup where the merchant chooses a plan and then is directed to finish the upgrading process .

To hide Ecwid save button use parameter: hide_save_button=true when embedding control panel e.g.

Please refer to the following articles to find regarding the Ecwid widgets including embed codes:

In the articles below the ecwid.com is used in the script.js ()

Please note that the script.js () should be called only once before loading of the widgets or simultaneously with loading of the first widget (but only once!).

Ecwid widgets are indexed by Google. However Google is indexing HTML pages faster and deeper than dynamic Javascript widgets. So as a measure to improve indexing you can use to add indexable HTML content to your store.

We recommend to cache static content on your side to provide better site performance. You should use the endpoint to determine when the cache becomes obsolete. productsUpdated and categoriesUpdated fields provide an indication when it is necessary to refresh cache.

and send the following parameters:

Ecwid responds with a JSON-formatted data containing the access token and additional information. Please refer tothis reference to parse the response.

hide_visit_storefront_menu=true - (optional) hides the Visit storefront link

hide_help_menu=true - (optional) hides the Help menu . The Help menu is usually hidden for White-label partners.

hide_profile_menu=true - (optional) hides the Profile menu (round icon with pop-up menu).

Managing

- enables all offline payment processors, online processors “new1” and “new2”, when they will be added to Ecwid and sets store URL to “”.

e.g.

Please contact your for more details.

To better understand Ecwid will bill you for the services, please refer .

partner manager
Create store
Get store
https://my.ecwid.com/resellerapi/v1/register?register=y
Commons HttpClient 3.1
Commons Codec
Dom4j
https://my.ecwid.com/resellerapi/v1/subscribe
https://my.ecwid.com/resellerapi/v1/unsubscribe
https://my.ecwid.com/resellerapi/v1/suspend
https://my.ecwid.com/resellerapi/v1/resume
https://my.ecwid.com/resellerapi/v1/delete
https://my.ecwid.com/resellerapi/v1/stores
https://my.ecwid.com/resellerapi/v1/status
https://app.ecwid.com/resellerapi/v1/stores
https://my.ecwid.com/resellerapi/v1/plans?key=
http://take.ms/l7qnX
screenshot example
http://take.ms/aZrjQ
https://my.ecwid.com/cp/CP.html?inline&hide_save_button=true
more information
https://app.ecwid.com/script.js?...
https://app.ecwid.com/script.js
Static Store Pages API
Store Changes Stats API
https://my.ecwid.com/api/oauth/token/{ownerid}
http://take.ms/ztmFq
http://take.ms/lhoJD
Screenshot
storeURL
http://storename.com
https://my.ecwid.com/cp/?lang=es
Partner manager
to this document
Single Sign On to control panel using the Developer API