E-commerce integration with AliExpress API

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Integration of Online Store with AliExpress (API)

AliExpress provides API for sellers through AliExpress Open Platform. Integration allows managing products, prices, stock levels, and orders on the global marketplace.

Authentication via TOP Protocol

import hashlib
import hmac
import time

class AliexpressClient:
    def __init__(self, app_key: str, app_secret: str, access_token: str):
        self.app_key      = app_key
        self.app_secret   = app_secret
        self.access_token = access_token

    def _sign(self, params: dict) -> str:
        sorted_params = sorted(params.items())
        sign_string   = self.app_secret
        for k, v in sorted_params:
            sign_string += f"{k}{v}"
        sign_string += self.app_secret
        return hashlib.md5(sign_string.encode()).hexdigest().upper()

    def call(self, method: str, params: dict) -> dict:
        base_params = {
            'method':       method,
            'app_key':      self.app_key,
            'timestamp':    str(int(time.time() * 1000)),
            'format':       'json',
            'v':            '2.0',
            'session':      self.access_token,
            **params
        }
        base_params['sign'] = self._sign(base_params)

        resp = requests.post('https://api.taobao.com/router/rest', data=base_params)
        return resp.json()

Publishing a Product

def publish_product(self, product: dict) -> str:
    result = self.call('aliexpress.solution.product.schema.get', {
        'subject':     product['name'],
        'local_price': product['price'],
        'currency_code': 'USD',
    })
    return result.get('result', {}).get('product_id')

Stock Synchronization

def update_inventory(self, product_id: str, sku_list: list) -> None:
    self.call('aliexpress.ds.add.info', {
        'product_id':     product_id,
        'sku_stock_info': json.dumps([{
            'skuAttr':  sku['attributes'],
            'quantity': sku['stock'],
            'price':    sku['price'],
        } for sku in sku_list]),
    })

Getting Orders

def get_orders(self, start_time: str, end_time: str) -> list:
    result = self.call('aliexpress.trade.ds.order.get', {
        'create_time_start': start_time,
        'create_time_end':   end_time,
        'page_size':         50,
    })
    return result.get('result', {}).get('order_list', {}).get('order_dto', [])

AliExpress API Specifics

  • Requires registration as AliExpress seller
  • Content for EU requires compliance with Product Safety Regulation
  • API works through a single endpoint (api.taobao.com) for all operations with method in parameter
  • All amounts in USD for global marketplace

Timeline

Registration in AliExpress Open Platform: 1–2 weeks. Integration: 14–20 business days.