0% found this document useful (0 votes)
570 views88 pages

Aliexpress Affiliate Documentation

The document outlines the launch of the new Aliexpress Open Platform, detailing the steps for developers to register, integrate, and call APIs effectively. It provides a comprehensive guide on preparing for API integration, including obtaining necessary credentials, configuring seller authorization, and generating HTTP requests with proper signatures. Additionally, it explains the structure of API endpoints, required parameters, and common error messages encountered during API calls.

Uploaded by

mahdiamlal60
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
570 views88 pages

Aliexpress Affiliate Documentation

The document outlines the launch of the new Aliexpress Open Platform, detailing the steps for developers to register, integrate, and call APIs effectively. It provides a comprehensive guide on preparing for API integration, including obtaining necessary credentials, configuring seller authorization, and generating HTTP requests with proper signatures. Additionally, it explains the structure of API endpoints, required parameters, and common error messages encountered during API calls.

Uploaded by

mahdiamlal60
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

Documentation aliexpress affiliate

AliexpressOP Overview
Background
Dear partners, we are delighted to announce that we are launching the new Aliexpress open
platform! As the market evolves, current features and API deficiencies are becoming a
barrier to our mutual growth. In order to provide better services to our partners and further
empower them, we have fully migrated and upgraded to the new open platform. At the
same time, we have rebuilt our web services to improve the user experience.

Getting started
If you are new to the Aliexpress Open Platform, this guide will help you to familiarize
yourself with the platform step-by-step: start developing your app using the Aliexpress API,
deploy your app online, and share your app with Aliexpress sellers.

Initial Preparation:
1. Become a developer - Register a UAC (unified account center) account and sign up as
a Aliexpress developer.
2. Register your application in one of the application categories - Submit the request
and Aliexpress admins will review and approve your request.
3. Retrieve App Key and App Secret of your application - The unique identity of your
application on the Aliexpress Open Platform.
4. Request API permission for your application, so that your application can initiate
calls to Aliexpress APIs.

Integration Process:
1. Configure seller authorization - Manage a list of sellers who can authorize your
application to access their business data in Aliexpress marketplace
2. Seller authorization intruduction - Get the authorization from sellers
3. Call API with HTTP requests - Instructions on how to assemble HTTP requests to call
API

API calling process


Aliexpress Open Platform APIs are called through HTTP requests. You can call the API by
using the platform provided SDK (recommended), or by assembling the request with a
certain format according to the Aliexpress Open Platform protocols (only if no official SDK is
provided for a programming language). This section introduces how to assemble HTTP
requests to call the Aliexpress APIs.
API calls require data for input and return output as the responses. The general steps for
calling an API through generating HTTP requests are as follows:
1. Populate parameters and values
2. Generate signature
3. Assemble HTTP requests
4. Initiate HTTP requests
5. Get HTTP responses
6. Interpret JSON/XML responses
Refer to the sections below for detailed information about the API calling process on
Aliexpress Open Platform.
1. API endpoints URLs
2. Calling parameters
3. Signature algorithm
4. HTTP request sample

API endpoint URLs


Aliexpress Open Platform provides an online production environment. The data under the
production environment are all true online data, providing limited times and authority of
interface calling. The production environment shares data with the online system, and the
true data of an online shop are directly influenced by the interface for writing class, so you
must operate with caution.

Currently, all interfaces are divided into two categories: System interfaces and Business
interfaces. And you need to choose the correct endponint to use for each type API.

System interfaces: Authorization relative APIs under 'System Tool' in the API
documentation.
Business interfaces: All other APIs except system APIs which mentioned above.

1.For those business APIs: https://api-sg.aliexpress.com/sync?method={api_path}&{query}


2.For those system APIs: https://api-sg.aliexpress.com/rest{api_path}?{query}

Notes:
1. {api_path} means the path of the specific API,{query} means the calling
parameters.
2. Here to see the detail HTTP request sample.

Calling parameters
Calls to the API must include system parameters in addition to the parameters associated
with the application. Different application specific parameters are needed for different
specific APIs.
System parameters
System parameters are required in the HTTP request of every API call, listed in the following
table:
Business parameters
In addition to the system parameters that must be included in the API call request, the
business parameters for the request are also required. Refer to the API documentation for
details about the business parameters of each API.

Signature algorithm
Aliexpress Open Platform verifies the identity of each API request, and the server will also
verify whether the call parameters are valid. Therefore, each HTTP request must contain the
signature information. The requests with invalid signature will be rejected.
Aliexpress Open Platform verifies the identity of the requests by the App Key and Secret
that are assigned to your application. The App Secret is used to generate the signature
string in the HTTP request URL and server-side signature string. It must be kept strictly
confidential.

If you compose HTTP request manually (instead of using the official SDK), you need to
understand the following signature algorithm.
The process of generating the signature is as follows:(Notice:The only difference between
System Interfaces and Business Interfaces is how to handle api_path.)
1.Sort all request parameters (including system and application parameters, but except the
“sign” and parameters with byte array type.If the API you used is Business Interface,
api_path should be used as the request parameter to participate in sorting) according to the
parameter name in ASCII table. For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
// Example of api_path key value pair
// method : aliexpress.offer.product.post

Before sort: foo=1, bar=2, foo_bar=3, foobar=4


After sort: bar=2, foo=1, foo_bar=3, foobar=
2.Concatenate the sorted parameters and their values into a string. For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
bar2foo1foo_bar3foobar4
3.(If the API you used is System Interface, Please add the API name in front of the
concatenated string. For example, adding the API name "/test/api")
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
/test/apibar2foo1foo_bar3foobar4
4.Encode the concatenated string in UTF-8 format and make a digest by the signature
algorithm (using HMAC_SHA256). For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
hmac_sha256(/test/apibar2foo1foo_bar3foobar4)
5.Convert the digest to hexadecimal format. For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
hex("helloworld".getBytes("utf-8")) = "68656C6C6F776F726C64"
Sample code for JAVA
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
public static final String CHARSET_UTF8 = "UTF-8";
public static final String SIGN_METHOD_SHA256 = "sha256";
public static final String SIGN_METHOD_HMAC_SHA256 = "HmacSHA256";

public static String signApiRequest(Map<String, String> params, String appSecret, String


signMethod, String apiName) throws IOException {
// If you are using Business Interface, please do as step 1,add api_path into params.
// params.put("method",apiName);

// sort all text parameters


String[] keys = params.keySet().toArray(new String[0]);
Arrays.sort(keys);

// connect all text parameters with key and value


StringBuilder query = new StringBuilder();
// If you are using System Interface, please do as step 3
// append API name
query.append(apiName);
for (String key : keys) {
String value = params.get(key);
if (areNotEmpty(key, value)) {
query.append(key).append(value);
}
}

// sign the whole request


byte[] bytes = null;

if (signMethod.equals(SIGN_METHOD_SHA256)) {
bytes = encryptHMACSHA256(query.toString(), appSecret);
}

// finally : transfer sign result from binary to upper hex string


return byte2hex(bytes);
}

private static byte[] encryptHMACSHA256(String data, String secret) throws IOException {


byte[] bytes = null;
try {
SecretKey secretKey = new SecretKeySpec(secret.getBytes(CHARSET_UTF8),
SIGN_METHOD_HMAC_SHA256);
Mac mac = Mac.getInstance(secretKey.getAlgorithm());
mac.init(secretKey);
bytes = mac.doFinal(data.getBytes(CHARSET_UTF8));
} catch (GeneralSecurityException gse) {
throw new IOException(gse.toString());
}
return bytes;
}

/**
* Transfer binary array to HEX string.
*/
public static String byte2hex(byte[] bytes) {
StringBuilder sign = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(bytes[i] & 0xFF);
if (hex.length() == 1) {
sign.append("0");
}
sign.append(hex.toUpperCase());
}
return

HTTP request sample


Case 1: Business Interfaces
Taking aliexpress.solution.product.schema.get(get product schema) API call as example, the
steps of assembling the HTTP request is as follows:
Step 1. Populate parameters and values
Common parameters:
1. app_key = “123456”
2. access_token = “test”
3. timestamp = “1517820392000”
4. sign_method = “sha256”
Business parameters:
1. aliexpress_category_id = “200135143”
2. method = “aliexpress.solution.product.schema.get”
Step 2. Sort all parameters and values according to the parameter name in ASCII table
1. access_token = “test”
2. aliexpress_category_id = “200135143”
3. app_key = “123456”
4. sign_method = “sha256”
5. timestamp = “1517820392000”
Step 3. Concatenate the sorted parameters and their values into a string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
access_tokentestaliexpress_category_id200135143app_key123456methodaliexpress.logisti
cs.redefining.getonlinelogisticsinfosign_methodsha256timestamp1517820392000
Step 4. Generate signature
Assuming that the App Secret is “helloworld”, the signature is:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
hex(sha256(access_tokentestaliexpress_category_id200135143app_key123456methodaliex
press.logistics.redefining.getonlinelogisticsinfosign_methodsha256timestamp15178203920
00))=F7F7926B67316C9D1E8E15F7E66940ED3059B1638C497D77973F30046EFB5BBB
Step 5. Assemble HTTP request
Encode all the parameters and values (with the “sign” parameter) using UTF-8 format (the
order of parameters can be arbitrary).The splicing method is:https://api-
sg.aliexpress.com/sync?method={api_path}&{query}.
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
https://api-
sg.aliexpress.com/sync?method=aliexpress.solution.product.schema.get&app_key=123456
78&aliexpress_category_id=200135143&access_token=test&timestamp=1517820392000&s
ign_method=sha256&sign=F7F7926B67316C9D1E8E15F7E66940ED3059B1638C497D77973
F30046EFB5BBB
Case 2: System Interfaces
Taking /auth/token/create(generate access_token) API call as example, the steps of
assembling the HTTP request is as follows:
Step 1. Populate parameters and values
Common parameters:(access_token is not needed in this API)
1. app_key = “12345678”
2. timestamp = “1517820392000”
3. sign_method = “sha256”
Business parameters:
1. code = “3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26”
Step 2. Sort all parameters and values according to the parameter name in ASCII table
1. app_key = “12345678”
2. code = “3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26”
3. sign_method = “sha256”
4. timestamp = “1517820392000”
Step 3. Concatenate the sorted parameters and their values into a string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
app_key12345678code3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26sign_methodsha256times
tamp1517820392000
Step 4. Add the API name in front of the concatenated string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
/auth/token/createapp_key12345678code3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26sign_
methodsha256timestamp1517820392000
Step 5. Generate signature
Assuming that the App Secret is “helloworld”, the signature is:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
hex(sha256(/auth/token/createapp_key12345678code3_500102_JxZ05Ux3cnnSSUm6dCxYg
6Q26sign_methodsha256timestamp1517820392000))=35607762342831B6A417A0DED84B
79C05FEFBF116969C48AD6DC00279A9F4D81
Step 6. Assemble HTTP request
Encode all the parameters and values (with the “sign” parameter) using UTF-8 format (the
order of parameters can be arbitrary).The splicing method is:https://api-
sg.aliexpress.com/rest{api_path}?{query}.
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
https://api-
sg.aliexpress.com/rest/auth/token/create?app_key=12345678&code=3_500102_JxZ05Ux3c
nnSSUm6dCxYg6Q26&timestamp=1517820392000&sign_method=sha256&sign=356077623
42831B6A417A0DED84B79C05FEFBF116969C48AD6DC00279A9F4D81
Step 7 java case
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
public static void main(String[] args) throws Exception {
final String SIGN_METHOD = "sha256";
final String APP_KEY = "YOUR_APP_KEY";
final String APP_SECRET = "YOUR_APP_SECRET";
final String CODE = "YOUR_CODE";
final String API_NAME = "/auth/token/create";

long time = System.currentTimeMillis();


String timeStamp = Long.toString(time);

Map<String, String> params = new HashMap<String, String>();


params.put("app_key", APP_KEY);
params.put("timestamp", timeStamp);
params.put("sign_method", "sha256");
params.put("CODE", CODE);
params.put("simplify", "true");
String requestBody = null;

String sign = IopUtils.signApiRequest(API_NAME,params, requestBody, APP_SECRET,


SIGN_METHOD);
params.put("sign",sign);

String url = "https://api-sg.aliexpress.com/rest" + API_NAME + "?";


for (String key : params.keySet()) {
url += "&" + key + "=" + URLEncoder.encode(params.get(key), "utf-8");
}
System.out.println(url);
String sendGet = HttpUtils.sendGet(url);
System.out.println("sendGet = " + s

Notes:
1. All request and response data codes are in UTF-8 format.Please encode all
parameter names and parameter values in the URL. And all parameter values in the
HTTP body should also be encoded If the requested content type is application / x-
www-form-urlencoded.If it is in multipart / form data format, the parameter value of
each form field does not need to be encoded, but the charset part of each form field
needs to be specified as UTF-8.
2. When the length of the URL assembled by the parameter name and parameter value
is less than 1024 characters, you can use method "GET" to initiate the request; If the
parameter type contains byte [] type or the assembled request URL is too long, the
request must be initiated by method "POST". All APIs can initiate requests using
"POST".
3. Only those who do not use the official AE SDK need to generate the signature for API
calls.If the official AE SDK is used, the SDK will complete this step automatically.

Error messages
All API calls will return a response, which indicates the status of the operation (either
Success or Error) and optionally provides results and/or details related to the specified
action.
When an API call fails, the system returns the request ID and error codes as well. There are
3 categories of common API call errors:
1. SYSTEM: API platform error
2. ISV: Business data error
3. ISP: Backend service error
API platform error (SYSTEM errors)
The API platform errors usually occur because the request from a user does not fulfill the
basic verification. When encountering such errors, check the authority, frequency and other
conditions of the applications. Then, check the uploaded parameters for completeness and
validity based on the API documentation.
Business data error (ISV errors)
These errors are the result of a business logic error, these errors are caused if you do not
follow the certain business rules set out by the Aliexpress Platform (e.g. product creation
rules, platform policy rules, etc).
When encountering such errors, check whether the corresponding information is uploaded
based on the error information. It is recommended to try again after correcting such errors.
Should you still receive the error messages, please reach out to the Aliexpress Partner Seller
Support to find out the business
Backend service error (ISP errors)
The backend service errors are usually caused by the availability of API service. Please try
again after some time, if the issue persists, please contact our technical support team.

Message Push service(webhook)


Introduction:
Message Push is a service provided by the AE Open Platform to service providers
(ISV)/sellers for order message status push. Currently, AE's order synchronization is done
through ISV polling, which leads to issues such as rate limiting, inefficiency, and resource
wastage. By configuring message push, order status changes will be pushed to the ISV's
specified callback URL in the form of HTTP messages.
Previously, the App would constantly inquire whether there were any orders from the open
platform, and if there were, it would provide you with all the specific order numbers within
a certain time frame. After integrating message push, the App can now simply wait, and
when there is an update to your order status, the open platform will deliver your order to
your callback address.
Integration Process:
1:Preparing Callback HTTPS Service
Prepare a callback URL address to receive message notifications from the development
platform, for example: https://www.example.com/test/receiveCallBack.do

demo
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
1、Controller:
@RestController
public class PushMessageTestController {

@Autowired
private GopMessageHandlerFactory gopMessageHandlerFactory;

private static final String TEST_APP_KEY = "你的appkey";


private static final String TEST_APP_SECRET = "你的appSecret";
private static final String MESSAGE_TYPE = "message_type";
/**
* Accept GOP callback

* @param request
* @return
*/
@PostMapping(value = "/images/receiveCallBack.do")
public ResponseEntity<?> receiveGopCallback(HttpServletRequest request, @RequestBody
String s) {
log.info("PushMessageTestController receiveCallBack s:【{}】", JSON.toJSONString(s));
String authorization = null == request.getHeader("authorization") ? null :
request.getHeader("authorization");
if (null == authorization) {
return ResponseEntity.badRequest().body("authorization is null");
} else {
//Signature authentication.
String base = TEST_APP_KEY + s;
String signature = SignatureUtil.getSignature(base, TEST_APP_SECRET);
if (!authorization.equals(signature)) {
return ResponseEntity.badRequest().body("authorization Don't match");
}
}
//product_delete_message s =
{"seller_id":"2060","message_type":15,"data":{"login_id":"ali****01","product_id":100009
6,"product_status":"product-deleted","status_update_time":"2022-05-09
15:48:11"},"timestamp":1652082492,"site":"ae_global"}
//order_create_message s =
{"seller_id":"2060","message_type":1,"data":{"login_id":"ali***01","order_status":"PLACE_
ORDER_SUCCESS","trade_order_id":"30160843","status_update_time":"2022-04-19
23:18:56"},"timestamp":1650435537,"site":"ae_global"}
JSONObject jsonObject = JSON.parseObject(s);
if (jsonObject != null && jsonObject.getInteger(MESSAGE_TYPE) != null) {
AbstractGopMessageHandler messageHandler =
gopMessageHandlerFactory.getMessageHandler(jsonObject.getInteger(MESSAGE_TYPE));
if (messageHandler != null) {
messageHandler.execute(jsonObject);
} else {
log.info("gop 未知消息类型 :{} " , s);
return ResponseEntity.badRequest().build();
}

} else {
log.info("gop 消息格式异常 :{} " , s);
return ResponseEntity.badRequest().build();
}
return ResponseEntity.ok().body(s);
}
}

2、Message processor factory:


@Component
public class GopMessageHandlerFactory {

@Autowired
public List<AbstractGopMessageHandler> messageHandlerList;

public static final Map<Integer ,AbstractGopMessageHandler> map = new HashMap<>(16);

@PostConstruct
protected void init() {
for (AbstractGopMessageHandler messageHandler : messageHandlerList) {
map.put(messageHandler.getMessageType(),messageHandler);
}
}

public AbstractGopMessageHandler getMessageHandler(Integer massageType){


return map.get(massageType);
}
}

3、Abstract message processor:


public abstract class AbstractGopMessageHandler {
/**
* MessageType
* @return
*/
public abstract Integer getMessageType();

/**
* Executor
* @param jsonObject
* @return
*/
public abstract Boolean execute(JSONObject jsonObject);
}

4、order_create_message handler:
@Component
@Slf4j
public class PlaceOrderSuccessMessageHandler extends AbstractGopMessageHandler {
@Override
public Integer getMessageType() {
return 1;
}

@Override
public Boolean execute(JSONObject jsonObject) {
log.info("收到下单成功消息 :request data 【{}】: ", jsonObject.toJSONString());
//todo 业务逻辑
return true;
}
}

4、product_delete_message handler:
@Component
@Slf4j
public class ProductDeletedMessageHandler extends AbstractGopMessageHandler {
@Override
public Integer getMessageType() {
return 15;
}

@Override
public Boolean execute(JSONObject jsonObject) {
log.info("收到商品删除消息 :request data 【{}】: ", jsonObject.toJSONString());
//todo 业务逻辑
re
Callback Data Integration
Let's take a look at an example of callback data (the data received by the callback URL):
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
POST /example/uri HTTP/1.1
Host: www.example.com
Content-Type: application/json
Content-Length: 1238
Authorization: 34f7b258df045d4ed9341850ca85b866f34828fd7d51862f11137216294a894c
{
"havana_id":"17379911544",//Corresponding original TOP platform userId.
"seller_id": "200042360",
"message_type": 1,
"data": {
"login_id": "aliqatest01",
"order_status": "PLACE_ORDER_SUCCESS",
"trade_order_id": "3016467970010843",
"status_update_time": "2022-04-19 23:18:56"
},
"timestamp": 1650435537,
"site": "ae_global"
}

There are several important data points to pay attention to in the callback data:
1、Authorization: This header field is mainly used for signature authentication. It is
recommended for the ISV's callback interface to perform signature authentication to verify
the authenticity of the message and prevent malicious push. The specific signature
authentication method will be separately introduced below.
2、seller_id: Indicates the seller account to which the order belongs.
3、message_type: The subscribed message type in the background. Different message_type
values correspond to different data structures in the "data" field.
4、data: Contains the relevant information data for this order or product message.

Important Notes:
1. The callback URL must be using HTTPS.
2. Please verify your CA certificate. You need a certificate issued by a Certificate
Authority (self-signed certificates are not accepted). OV/EV level certificates are
required, DV level certificates are not accepted.
3. AOP currently provides request signature verification to prevent callback interfaces
from being flooded with fake data. If you still need to filter traffic by IP or other
means, please contact Alibaba Cloud Singapore to find domain names/IP addresses.
The platform does not provide support for this.
4. Message types and their corresponding business references: Developers can refer to
the message type reference table to identify and process the subscribed business
message types.

Message Type Reference Table:


message type message_type status
order TEST AE PUSH 0 online
order successfully 1 online
risk control 24h 2 online
Waiting for seller’s verification 3 online
waiting for group 4 online
The order enters the cancellation process 5 online
waiting for shipping 6 online
Seller partially ships 8 online
Waiting for buyer to receive goods 10 online
Transaction successful 12 online
reverse status 20 online
ARISEreverse status changing 25 online
QD refund successfully 31 online
QD responsible payment 32 online
QD payment fail 34 online
QD order-closing 35 online
QD refusal to pay 36 online
QD refund 37 online
QD order stop 38 online
QD order unfrozen 39 online
payment successfully 41 online
AE-JIT Purchase order
42 online
Cancel message
product product delete 15 online
video dump message 22 online
logistics video audit message 40 online
Waybill number change 18 online

2:Configuring Message Subscription and Callback URL in AppConsole


3:Testing Callback
success

fail (At this point, it is necessary to confirm whether the callback interface is working
properly.)
4:Successful Receipt and Retry on Failure
Confirmation Mechanism
Currently, the client is required to respond with a 200 OK HTTP status code (not the
response body) to confirm the receipt of the message. If the server does not receive a 200
confirmation within 500ms, it considers the message delivery as failed. In case of failure, the
server will retry pushing the message after 30 minutes, and it will retry for a maximum of 12
times before completely giving up on delivery.
Recommended Handling Approach
As retrying on failure can consume more system resources and amplify the message
volume, it is recommended that the receiving app buffers the received messages (using a
processing method that includes a buffering queue in the callback interface service). This
ensures that the interface is not overwhelmed or encounters numerous timeouts when
there is a high volume of callbacks. It is advised not to process the messages directly to
minimize failures. If the failure rate of an app exceeds 50%, the opportunity for push
notifications to that address will be suspended.

Important Notes:
1、Will a successful message be pushed again?
No, it will not be pushed again.
2、If a message fails and is pushed after half an hour, will the status be the latest?
Yes, before retrying, the system will first check the latest status.
3、Is there a possibility of duplicate message pushes?
Yes, due to network or other uncontrollable reasons, there may be instances of duplicate
message pushes. Therefore, it is important to implement relevant idempotent handling in
the callback interface processing logic.

Signature Authentication Operation:


Signature Rules:
The signature is generated using the HMAC-SHA256 algorithm based on the AppKey,
AppSecret, and message body. It is used to verify the source of the message and its
integrity. The receiving party is required to verify the signature.
After generating the signature, encode it in HEX format. The receiving party should verify
the signature to ensure the integrity of the message.
/* Base = {your_app_key} + "{message_body_you_receieved}" Secret = {your_app_Secret};
*/ Authorization = HEX_ENCODE(HMAC-SHA256(Base, Secret))

sign until:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

/**
* sign until
*/
public class SignatureUtil {
private static final String HMAC_SHA256 = "HmacSHA256";

private static final Logger LOGGER = LoggerFactory.getLogger(SignatureUtil.class);

/**
* Generate a signature based on Hmac-SHA256, and encode it in hexadecimal format.
* @param base {AppKey} + {messageBody}
* @param secret {AppSecret}
* E.g.: AppKey = 123456, AppSecret = 3412gyo124goi3124
* 收到的消息体Json :{"seller_id":"1234567", "message_type":0, "data":{...}..}
*
* base = "123456" + "{\"seller_id\":\"1234567\", \"message_type\":0, "data":{...}..}"
* secret = 3412gyo124goi3124
* signature = getSignature(base, secret);
* signature = f3d2ca947f16a50b577c036adecd18bec126ea19cadedd59816e255d3b6104ab
* @return sign
*/
public static String getSignature(String base, String secret) {
try {
Mac sha256Hmac = Mac.getInstance(HMAC_SHA256);
SecretKeySpec secretKey = new SecretKeySpec(secret.getBytes(), HMAC_SHA256);
sha256Hmac.init(secretKey);
return byteArraytoHexString(sha256Hmac.doFinal(base.getBytes()));
} catch (Exception e) {
LOGGER.error("Failed to generate signature");
}
return null;

/**
* Hexadecimal Encode
* @param bytes
* @return
*/
private static String byteArraytoHexString(byte[] bytes) {
if(bytes == null) {
return null;
}
StringBuilder sb = new StringBuilder();
String stmp;
for (byte aByte : bytes) {
stmp = Integer.toHexString(aByte & 0XFF);
if (stmp.length() == 1) {
sb.append('0');
}
sb.append(stmp);
}
return sb.toString().toLowerCase();
}
Note:
1、Is the signature mandatory?
Answer: It is not mandatory, but highly recommended.
2、What is this for? How do I use this code?
Answer: This is an algorithm to generate a string. After receiving a message, the client can
use the same algorithm to regenerate the same string and compare it with the string
received from the server to verify the integrity of the message and the identity of the
sender. Additionally, if you are using Java, you can simply copy the code and generate the
signature as instructed upon receiving the request. Then, compare it with the
"Authorization" header.

FAQ:
Q: If a certain SellerId did not receive any push notifications?
A: Before pushing the message, the system checks the authorization relationship between
the SellerId and the AppKey on the platform. If a SellerId does not receive any push
notifications, verify the validity of the Seller and App's token.

Q: Does it support multi-endpoint push?


A: A single AppKey can only be bound to one push endpoint. If a Seller subscribes to more
than one app and holds valid authorizations, all of the apps can receive orders from that
Seller.
Q: If the push failed even after 12 retries, how can we obtain the failed orders? Is there a
query interface?
A: First of all, for the majority of orders hosted on mainstream cloud servers in China, 99.8%
are successfully pushed within the first attempt and 100% within 3 attempts. The extreme
case of 12 consecutive failed attempts is highly unlikely. Even if there is a sudden network
fluctuation, there is sufficient time for recovery within the 6-hour span of the 12 attempts.
Therefore, the probability of all 12 attempts failing is very low. But what if it does happen?
In such a case, we still provide a pull interface for the app to retrieve orders periodically for
reconciliation. However, the QPS (queries per second) limit for this method is more
stringent compared to pure pulling. In conclusion, our recommended consumption method
is to prioritize push and use pull as a fallback.

Q: How is the 500ms calculated? What should we do if it frequently exceeds 500ms due to
poor network conditions?
A: Do not consume order messages synchronously. Store them in a buffer and then
consume them. Based on current observations, the response time (RT) for mainstream
cloud servers in China is within 200ms. For network fluctuations, there is a 12-retry
compensation mechanism.

Q: Can the callback URL be changed after configuration? Should the callback for testing and
production be differentiated?
A: The callback URL can be changed. There is minimal necessity for a separate testing
callback because your existing order flow is based on pulling and is completely separate
from this callback. You can directly use a single callback URL.

Q: Duplicate push notifications are received?


A: If you notice a large number of duplicates, please verify if the trade_order_id field in the
duplicate messages is the same. The push service guarantees at least one delivery, so a
small number of duplicates are normal. Implement idempotent consumption to handle
duplicates.

Q: We used the example you provided for signature verification, but the signatures don't
match?
A: Many developers have reported issues with the sample code we provided. If you have
already checked all the possibilities below and are still encountering issues, please reach out
to us again. Do not couple the signature verification logic with the business logic. We
recommend designing the signature verification using the Chain of Responsibility pattern,
where signature verification is one link in the chain. Some developers map the fields in the
body to an object and then deserialize the object. This approach relies on the order of
object parsing and may vary depending on the parsing library used, leading to potential
issues. Moreover, this approach tightly couples the signature logic with the business logic
and can become cumbersome when the messages are updated or iterated upon. If
everything seems fine, pay attention to the AppSec value. If the issue persists, try resetting
the AppSec.

Q: We are receiving orders or order data with significant delays?


A: This situation may be caused by interface delays resulting in failed real-time
compensation for a large volume of data. Some servers deployed in China may have this
issue, so consider forwarding the data.

API Overall View


1. Category
Please refer to below document for obtaining the whole category tree and do the mapping
between categories from sellers and categories from Aliexpress.
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.628459b2pdm
9Xj&nodeId=27493&docId=118729#/?docId=1374

2. Product Management
Please refer to below documents
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.334159b2AHII
Cq&nodeId=27493&docId=118729#/?docId=1754

3. Orders
3.1 Flow of order status

3.2 Obtain order list


API: aliexpress.trade.new.redefining.findorderbyid
https://openservice.aliexpress.com/doc/api.htm?spm=a2o9m.11193531.0.0.31a93b53SbbE
SQ#/api?cid=20905&path=aliexpress.trade.new.redefining.findorderbyid&methodType=GE
T/POST
3.2 Obtain order detail
API: aliexpress.trade.seller.orderlist.get
https://openservice.aliexpress.com/doc/api.htm?spm=a2o9m.11193531.0.0.31a93b53SbbE
SQ#/api?cid=20905&path=aliexpress.trade.seller.orderlist.get&methodType=GET/POST

4. Order Fulfillment
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.334159b2AHII
Cq&nodeId=27493&docId=118729#/?docId=1609

Category Mappings
How to do Category Mapping
aliexpress.solution.seller.category.tree.query
Parameters:
1. parent category id
2. Whether to filter out the categories which sellers do not have permissions.
Response:
1. child categories under this parent category.
Best practice:
1. passing 0 to fetch the level 1 categories.
2. Call the API recursively untill the child post category is a leaf.(is_leaf_category = true)
3. Only use leaf category for category mapping and posting products.
4. filter_no_permission equals to false means returning whole the category tree
(including categories that might not be authorised the seller), while true means only
returning categories from the tree which the seller is authorised. The authorised
category tree is a subset of the whole category tree.
5. Better to show both the authorised categories and non-authorised categories to the
sellers and give reminders to sellers of categories with no permission, for them to
directly apply in Aliexpress backend:
Sample Response:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"aliexpress_solution_seller_category_tree_query_response": {
"children_category_list": {
"category_info": [
{
"children_category_id": 100001205,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"hi\":\"?????? ??? ????? ????? ?? ????????\",\"de\":\"Handy
Zubeh?r und Ersatzteile\",\"ru\":\"Аксессуары для мобильных телефонов\",\"ko\":\"?? ??
???? ? ??\",\"pt\":\"Acessórios Do Telefone móvel & Parts\",\"in\":\"Aksesoris Ponsel &
Parts\",\"en\":\"Mobile Phone Accessories\",\"it\":\"Accessori per
cellulari\",\"fr\":\"Mobile Téléphone Accessoires et Pièces\",\"zh\":\"手机配件
\",\"iw\":\"????? ???? ??????? & ?????\",\"es\":\"Accesorios\",\"ar\":\"?????? ???????
??????????\",\"vi\":\"?i?n Tho?i di ??ng Ph? Ki?n & Ph?
Tùng\",\"th\":\"????????????????????????????????\",\"ja\":\"携帯電話アクセサリー&パ
ーツ\",\"tr\":\"Cep Telefonu Aksesuarlar?\",\"nl\":\"mobiele Telefoon Accessoires &
Onderdelen\"}"
},
{
"children_category_id": 100001204,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"hi\":\"?????
?????\",\"de\":\"Kommunikationsger?te\",\"ru\":\"Оборудование для связи\",\"ko\":\"??
??\",\"pt\":\"Equipamentos de comunica??o\",\"in\":\"Peralatan
komunikasi\",\"en\":\"Communication Equipment\",\"it\":\"Apparecchiature di
comunicazione\",\"fr\":\"?quipements de Communication\",\"zh\":\"通信设备
\",\"iw\":\"???? ??????\",\"es\":\"Equipos de comunicación\",\"ar\":\"?????
?????????\",\"vi\":\"Thi?t b? th?ng tin liên l?c\",\"th\":\"??????? ??????????\",\"ja\":\"放
送、通信設備\",\"tr\":\"?leti?im Ekipman?\",\"nl\":\"Communicatie Materiaal\"}"
},
{
"children_category_id": 5090301,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"??????
???\",\"de\":\"Mobiltelefon\",\"ru\":\"Мобильные телефоны\",\"ko\":\"??
??\",\"pt\":\"Telefonia\",\"in\":\"Ponsel\",\"en\":\"Mobile Phones\",\"it\":\"Telefoni
cellulari\",\"fr\":\"Smartphones\",\"zh\":\"手机\",\"iw\":\"???????
??????\",\"es\":\"Smartphones\",\"ar\":\"????? ??????\",\"vi\":\"?i?n tho?i di
??ng\",\"th\":\"??????????????\",\"ja\":\"携帯電話\",\"tr\":\"Cep
Telefonu\",\"nl\":\"Mobiele telefoons\"}"
},
{
"children_category_id": 200380144,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"Wakie ???? ??????? ?? ????? ?????\",\"de\":\"Wakie
Talkie Teile & Zubeh?r\",\"ru\":\"Детали и аксессуары для раций\",\"ko\":\"Wakie ??? ??
? ????\",\"pt\":\"Wakie Talkie Pe?as & Acessórios\",\"in\":\"Wakie Talkie Parts &
Aksesoris\",\"en\":\"Walkie Talkie Parts & Accessories\",\"it\":\"Parti & accessori per
Walkie Talkie\",\"fr\":\"Wakie Walkie Pièces et Accessoires\",\"zh\":\"对讲机配附件
\",\"iw\":\"??? Wakie ???? ????? ???????\",\"es\":\"Piezas y accesorios para walkie-
talkies\",\"ar\":\"wakie ????? ???? ????????\",\"vi\":\"wakie ?àm & Ph?
Ki?n\",\"th\":\"Wakie Talkie?????????????????????\",\"ja\":\"wakieトランシーバーパー
ツ&アクセサリー\",\"tr\":\"Telsiz Par?alar? ve Aksesuarlar?\",\"nl\":\"Wakie Talkie
Onderdelen & Accessoires\"}"
},
{
"children_category_id": 50906,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"????
????\",\"de\":\"Walkietalki\",\"ru\":\"Рация\",\"ko\":\"???\",\"pt\":\"Walkie-
talkie\",\"in\":\"Walkie Talkie\",\"en\":\"Walkie Talkie\",\"it\":\"Walkie
talkie\",\"fr\":\"Talkie Walkie\",\"zh\":\"对讲机\",\"iw\":\"????? ???\",\"es\":\"Walkie-
talkies\",\"ar\":\"?????? ????????\",\"vi\":\"Walkie
?àm\",\"th\":\"??????????????????\",\"ja\":\"携帯無線\",\"tr\":\"El
Telsizi\",\"nl\":\"walkie talkie\"}"
},
{
"children_category_id": 201084002,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"de\":\"Handy Teile\",\"ru\":\"Детали для мобильных
телефонов\",\"ko\":\"Mobile Phone ?\",\"pt\":\"Pe?as de Telefone
celular\",\"in\":\"Handphone\",\"en\":\"Mobile Phone Parts\",\"it\":\"Ricambi per
cellulare\",\"fr\":\"Mobile Téléphone Pièces\",\"zh\":\"手机部件\",\"iw\":\"????? ????
?????\",\"es\":\"Piezas de teléfonos móviles\",\"ar\":\"?????? ??????? ?????\",\"vi\":\"?i?n
Tho?i di ??ng Các B? Ph?n\",\"th\":\"????????????????????\",\"ja\":\"携帯電話部品
\",\"tr\":\"Cep Telefonu Par?alar?\",\"nl\":\"Mobiele Telefoon Onderdelen\"}"
}
]
},
"is_success": true,
"request_id": "pr4mjuj3eklw"
}
}

Overview of Product Management


This document is an overall view of the scenarios related with product management, which
the developers will probably needs to integrate with, inculding product posting/editing,
price/stock updating, products online/offline, products query. Please read carefully about
this document to choose the best scenario which matches yours.
Prerequisites
Developer Guide
Initial Preparation:
1. Become a developer- Register an account and sign up as a Aliexpress developer.
2. Register your applicationin one of the application categories - Submit the request
and Aliexpress admins will review and approve your request.
3. Retrieve App Key and App Secretof your application - The unique identity of your
application on the Aliexpress Open Platform.
4. Request API permissionfor your application, so that your application can initiate calls
to Aliexpress APIs.
Integration Process 🌟:
1. Seller authorization intruduction- Get the authorization from sellers
2. General Authorization flowchart

1. Configure seller authorization- Manage a list of sellers who can authorize your
application to access their business data in Aliexpress marketplace
2. Call API with SDK - Invoke Api endpoint with sdk provided by AliExpress Open
Platform

Product Management API


PS: For all APIs, no matter what site their instructions are on, please keep using them on the
AE open platform, and we will follow up by migrating the instructions over as soon as
possible.
API Function AP
Query category tree al
Get child attributes by post category id (left category) al
Upload images to photo bank al
Query information of images in photobank by page al
Get size chart info by category id al
List all freight templates (shipping template) al
Post product al
Get single product info al
Get product list al
Edit product al
Batch product price update operation for oversea sellers al
Batch product inventory update API for oversea sellers. al
Online product al
Offline product al
Delete product al
Query the sku attribute information belonged to a specific category al

1. Post/Edit products
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.723059b2233
9li&nodeId=27493&docId=118729#/?docId=1755

2. Online/Offline products
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.723059b2233
9li&nodeId=27493&docId=118729#/?docId=1756

3. Operate products in batch action


https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.723059b2233
9li&nodeId=27493&docId=118729#/?docId=1757

Operate products in batch action


Operate products with batch api

API List

API Link
aliexpress.solution.product.list.get https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.product.info.get https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.batch.product.price.update https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.batch.product.delete https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.batch.product.inventory.update https://openservice.aliexpress.com/doc/api.htm?spm

Request Reference:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
// update prices
{
"product_id": 1005003120048613,
"multi_country_price_configuration": {
"price_type": "absolute",
"country_price_list": [
{
"sku_price_by_country_list": [
{
"price": "15",
"discount_price": "13.99",
"sku_code": "abc123"
}
],
"ship_to_country": "FR"
}
]
},
"multiple_sku_update_list": [
{
"price": "19.99",
"discount_price": "14.99",
"sku_code": "abc123"
}
]
}

//update inventory
{
"product_id":1005003120048613,
"multiple_sku_update_list":[
{
"inventory":5,
"sku_code":"abc123"
}
]
}
Online / Offline Products
Online / Offline a product

API List

API Link
aliexpress.postproduct.redefining.onlineaeproduct https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.product.info.get https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.postproduct.redefining.offlineaeproduct https://openservice.aliexpress.com/doc/api.htm?spm
aliexpress.solution.product.list.get https://openservice.aliexpress.com/doc/api.htm?spm

Reference Code:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"product_ids":"1005007011379841;1005007011379842"
}

Post/Edit Product
1. Post a new product
Here are some details that developers may want to figure out before integration:
1.1. aliexpress_category_id
aliexpress.solution.seller.category.tree.query
1.1.1. Parameters:
1. parent category id
2. Whether to filter out the categories which sellers do not have permissions.
1.1.2. Response
child categories under this parent category.
Best practice:
1. passing 0 to fetch the level 1 categories.
2. Call the API recursively untill the child post category is a leaf.(is_leaf_category = true)
3. Only use leaf category for category mapping and posting products.
4. filter_no_permission equals to false means returning whole the category tree
(including categories that might not be authorised the seller), while true means only
returning categories from the tree which the seller is authorised. The authorised
category tree is a subset of the whole category tree.
5. Better to show both the authorised categories and non-authorised categories to the
sellers and give reminders to sellers of categories with no permission, for them to
directly apply in Aliexpress backend:
Sample Response:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"aliexpress_solution_seller_category_tree_query_response": {
"children_category_list": {
"category_info": [
{
"children_category_id": 100001205,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"hi\":\"?????? ??? ????? ????? ?? ????????\",\"de\":\"Handy
Zubeh?r und Ersatzteile\",\"ru\":\"Аксессуары для мобильных телефонов\",\"ko\":\"?? ??
???? ? ??\",\"pt\":\"Acessórios Do Telefone móvel & Parts\",\"in\":\"Aksesoris Ponsel &
Parts\",\"en\":\"Mobile Phone Accessories\",\"it\":\"Accessori per
cellulari\",\"fr\":\"Mobile Téléphone Accessoires et Pièces\",\"zh\":\"手机配件
\",\"iw\":\"????? ???? ??????? & ?????\",\"es\":\"Accesorios\",\"ar\":\"?????? ???????
??????????\",\"vi\":\"?i?n Tho?i di ??ng Ph? Ki?n & Ph?
Tùng\",\"th\":\"????????????????????????????????\",\"ja\":\"携帯電話アクセサリー&パ
ーツ\",\"tr\":\"Cep Telefonu Aksesuarlar?\",\"nl\":\"mobiele Telefoon Accessoires &
Onderdelen\"}"
},
{
"children_category_id": 100001204,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"hi\":\"?????
?????\",\"de\":\"Kommunikationsger?te\",\"ru\":\"Оборудование для связи\",\"ko\":\"??
??\",\"pt\":\"Equipamentos de comunica??o\",\"in\":\"Peralatan
komunikasi\",\"en\":\"Communication Equipment\",\"it\":\"Apparecchiature di
comunicazione\",\"fr\":\"?quipements de Communication\",\"zh\":\"通信设备
\",\"iw\":\"???? ??????\",\"es\":\"Equipos de comunicación\",\"ar\":\"?????
?????????\",\"vi\":\"Thi?t b? th?ng tin liên l?c\",\"th\":\"??????? ??????????\",\"ja\":\"放
送、通信設備\",\"tr\":\"?leti?im Ekipman?\",\"nl\":\"Communicatie Materiaal\"}"
},
{
"children_category_id": 5090301,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"??????
???\",\"de\":\"Mobiltelefon\",\"ru\":\"Мобильные телефоны\",\"ko\":\"??
??\",\"pt\":\"Telefonia\",\"in\":\"Ponsel\",\"en\":\"Mobile Phones\",\"it\":\"Telefoni
cellulari\",\"fr\":\"Smartphones\",\"zh\":\"手机\",\"iw\":\"???????
??????\",\"es\":\"Smartphones\",\"ar\":\"????? ??????\",\"vi\":\"?i?n tho?i di
??ng\",\"th\":\"??????????????\",\"ja\":\"携帯電話\",\"tr\":\"Cep
Telefonu\",\"nl\":\"Mobiele telefoons\"}"
},
{
"children_category_id": 200380144,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"Wakie ???? ??????? ?? ????? ?????\",\"de\":\"Wakie
Talkie Teile & Zubeh?r\",\"ru\":\"Детали и аксессуары для раций\",\"ko\":\"Wakie ??? ??
? ????\",\"pt\":\"Wakie Talkie Pe?as & Acessórios\",\"in\":\"Wakie Talkie Parts &
Aksesoris\",\"en\":\"Walkie Talkie Parts & Accessories\",\"it\":\"Parti & accessori per
Walkie Talkie\",\"fr\":\"Wakie Walkie Pièces et Accessoires\",\"zh\":\"对讲机配附件
\",\"iw\":\"??? Wakie ???? ????? ???????\",\"es\":\"Piezas y accesorios para walkie-
talkies\",\"ar\":\"wakie ????? ???? ????????\",\"vi\":\"wakie ?àm & Ph?
Ki?n\",\"th\":\"Wakie Talkie?????????????????????\",\"ja\":\"wakieトランシーバーパー
ツ&アクセサリー\",\"tr\":\"Telsiz Par?alar? ve Aksesuarlar?\",\"nl\":\"Wakie Talkie
Onderdelen & Accessoires\"}"
},
{
"children_category_id": 50906,
"is_leaf_category": true,
"level": 2,
"multi_language_names": "{\"hi\":\"????
????\",\"de\":\"Walkietalki\",\"ru\":\"Рация\",\"ko\":\"???\",\"pt\":\"Walkie-
talkie\",\"in\":\"Walkie Talkie\",\"en\":\"Walkie Talkie\",\"it\":\"Walkie
talkie\",\"fr\":\"Talkie Walkie\",\"zh\":\"对讲机\",\"iw\":\"????? ???\",\"es\":\"Walkie-
talkies\",\"ar\":\"?????? ????????\",\"vi\":\"Walkie
?àm\",\"th\":\"??????????????????\",\"ja\":\"携帯無線\",\"tr\":\"El
Telsizi\",\"nl\":\"walkie talkie\"}"
},
{
"children_category_id": 201084002,
"is_leaf_category": false,
"level": 2,
"multi_language_names": "{\"de\":\"Handy Teile\",\"ru\":\"Детали для мобильных
телефонов\",\"ko\":\"Mobile Phone ?\",\"pt\":\"Pe?as de Telefone
celular\",\"in\":\"Handphone\",\"en\":\"Mobile Phone Parts\",\"it\":\"Ricambi per
cellulare\",\"fr\":\"Mobile Téléphone Pièces\",\"zh\":\"手机部件\",\"iw\":\"????? ????
?????\",\"es\":\"Piezas de teléfonos móviles\",\"ar\":\"?????? ??????? ?????\",\"vi\":\"?i?n
Tho?i di ??ng Các B? Ph?n\",\"th\":\"????????????????????\",\"ja\":\"携帯電話部品
\",\"tr\":\"Cep Telefonu Par?alar?\",\"nl\":\"Mobiele Telefoon Onderdelen\"}"
}
]
},
"is_success": true,
"request_id": "pr4mjuj3eklw"
}
}

1.2. attribute_list && sku_attributes_list


The attributes under a specific category in Aliexpress could be classified into two types: sku
attribute and general attribute.
SKU attribute and general attribute appears in different parameters when posting a
product. General attributes appears in attribute_list and sku attribute appears in
sku_attribute_list

1.2.1. sku_attributes_list
The following picture shows how sku_attributes_list affects the front-end effect of a
product. In the picture, "Bundle" and "Color" corresponds to the field "sku_attribute_name"
of an element in "sku_attributes_list" , while "Bundle1", "Bundle2", "White", "Black"
corresponds to the field "sku_attribute_value" of an element in "sku_attributes_list".

The value of "sku_attribute_name" and "sku_attribute_value" under a specific category


could be obtained through Query attribute info. In the response of this API:
1. sku = true means the specific attribute was a sku attribute, which could be set in the
sku_attribute_list
2. customized_name = true means the seller could use his own value for the field
sku_attribute_value in product posting
3. customized_pic = true means the seller could input a url representing the image for a
specific sku in the field sku_image_url.

1.2.2. attribute_list
The following picture shows how attribute_list is displayed in the front-end of a product.
As shown from the structure of attribute_list, there are four fields: attribute_name_id,
attribute_value_id, attribute_name, attribute_value.
attribute_name_id and attribute_value_id could be also obtained through the API Query
attribute info.
In the response of the API Query attribute info:
1. sku = false means the specific attribute was a genral attribute, which could be set in
the fields : aliexpress_attribute_name_id and aliexpress_attribute_value_id in
attribute_list
attribute_name and attribute_value corresponds to merchant's customized attributes'
names and values.

1.3. Sample request for sku_info_list

1.3.1. One product with one sku


Some merchants would like to upload a product with just one sku, then the size of
sku_info_list is 1.
Under this scenario, if the merchant has no willing to define sku_attributes_list, just leave it
empty.
The following two examples both show how to post a product with just one sku:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
....
"sku_info_list": [{
"price": "12.21",
"inventory": 99,
"sku_code": "789abc",
"sku_attributes_list": [{
"sku_attribute_name": "Color",
"sku_attribute_value": "red",
"sku_image_url":
"https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
}]
}
]
...
}
Or leave sku_attributes_list empty
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
....
"sku_info_list": [{
"price": "12.21",
"inventory": 99,
"sku_code": "789abc"
}
]
...
}

1.3.2. One product with multiple skus


Some merchants would like to upload a product with multiple skus. For example, a T-shirt
with multiple colors.
The following example shows how to post a product with multiple skus, based on the
picture in section 2.1. (The size of sku_info_list is 4, corresponds to 2 dimensions of sku,
which are Bundle and Color, each of which contains a set of 2 values.)
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
...
"sku_info_list": [{
"price": "174.42",
"inventory": 999,
"sku_code": "789abc",
"sku_attributes_list": [{
"sku_attribute_name": "Bundle",
"sku_attribute_value": "Bundle1"
},{
"sku_attribute_name": "Color",
"sku_attribute_value": "White"
}]
},
{
"price": "182.27",
"inventory": 999,
"skuCode": "123xyz",
"sku_attributes_list": [{
"sku_attribute_name": "Bundle",
"sku_attribute_value": "Bundle1"
},{
"sku_attribute_name": "Color",
"sku_attribute_value": "Black"
}]
},
{
"price": "190.99",
"inventory": 999,
"skuCode": "456abc",
"sku_attributes_list": [{
"sku_attribute_name": "Bundle",
"sku_attribute_value": "Bundle2"
},{
"sku_attribute_name": "Color",
"sku_attribute_value": "White"
}]
},
{
"price": "199.72",
"inventory": 999,
"skuCode": "456xyz",
"sku_attributes_list": [{
"sku_attribute_name": "Bundle",
"sku_attribute_value": "Bundle2"
},{
"sku_attribute_name": "Color",
"sku_attribute_value": "Black"
}]
}
]
...
}

1.4. main_image_urls_list sku_image_url


The url in main_image_urls_list and sku_image_url should be an accessible link in the
merchant's server, or could be obtained by uploading your images to your Aliexpress
photobank by using Upload image to photobank before uploading products.

1.5. subject description language

1.5.1. uploading using one language


If the developer would like to upload the product using one language, please fill in: subject,
description, language. After the product has been uploaded successfully, Aliexpress system
will automatically translate subject and description to other languages. Then if the merchant
would like to modify the subject and description of this product in other languages, please
refer to Edit subject or description
Sample:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"subject":"Versión Global Xiaomi Redmi Note 5 4 GB 64 GB Snapdragon 636 Octa Core
Doble Cámara 12MP 4000 mAh Smartphone",
"description":"Versión Global Xiaomi Redmi Note 5 4 GB 64 GB Snapdragon 636 Octa Core
Doble Cámara 12MP 4000 mAh Smartphone",
"language":"es"
}

1.5.2. uploading using multiple languages:


If the developer would like to upload the product with multiple languages, please ignore
subject and language and use fields: multi_language_subject_list and
multi_language_description_list. The "language" field in the first level of the request
parameters is still needed, which is used to indicate the "original" language used by the
developer.
Sample:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"language": "es",
"multi_language_description_list": [
{
"language": "es",
"web_detail": {
"version": "2.0.0",
"moduleList": [
{
"type": "html",
"html": {
"content": "<h1><font color=\"#b9b6cc\">test description web</font></h1>"
}
}
]
}
}
],
"multi_language_subject_list": [
{
"language": "es",
"subject": "Versión Global Xiaomi Redmi Note 5"
},
{
"language": "en",
"subject": "Global Version Xiaomi Note Redmi 5"
}
]
}
Please see
https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193535.0.0.1b2559b2bxY
Czb&nodeId=27493&docId=118729#/?docId=1382 for more details about how to set the
field of multi_language_description_list

1.6. Get Shipping Template id


aliexpress.freight.redefining.listfreighttemplate
The API doesn't need request, and returns the list of shipping template.
Response Sample
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"aliexpress_freight_redefining_listfreighttemplate_response": {
"aeop_freight_template_d_t_o_list": {
"aeopfreighttemplatedtolist": [
{
"is_default": false,
"template_id": 1000,
"template_name": "Shipping Cost Template for New Sellers"
},
{
"is_default": false,
"template_id": 716381834,
"template_name": "TRlocal"
},
{
"is_default": true,
"template_id": 716259613,
"template_name": "freeshipping"
}
]
},
"result_success": true,
"request_id": "148n940kwijqn"
}
}

1.7. Get Group ID (Optional)


aliexpress.product.productgroups.get
The API needs no request, and returns all group ids.
Sample Response:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"aliexpress_postproduct_redefining_getproductgrouplist_response": {
"result": {
"success": true,
"target_list": {
"aeop_ae_product_tree_group": [
{
"group_id": 515718164,
"group_name": "shoes"
},
{
"group_id": 515797686,
"group_name": "shirts"
}
]
},
"time_stamp": "2019-07-12 20:51:08"
},
"request_id": "u23jrigfk1io"
}
}

1.8. Sample request for post_product_request


PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"subject": "Headscarf Women",
"brand_name": "Esnone",
"service_policy_id": 0,
"aliexpress_category_id": 32005,
"sku_info_list": [{
"price": "12.21",
"discount_price":"9.99",
"inventory": 0,
"sku_attributes_list": [{
"sku_attribute_name": "Color",
"sku_attribute_value": "red",
"sku_image":
"https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
},{
"sku_attribute_name": "US Size",
"sku_attribute_value": "2"
}],
"sku_code": "123abc"
}, {
"price": "12.21",
"inventory": 100,
"sku_attributes_list": [{
"sku_attribute_name": "Color",
"sku_attribute_value": "green",
"sku_image":
"https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"
},{
"sku_attribute_name": "US Size",
"sku_attribute_value": "2"
}],
"sku_code": "989abc"
}],
"inventory_deduction_strategy": "place_order_success",
"shipping_lead_time": 3,
"description": "Headscarf Women",
"freight_template_id": 1001857013, --> replace by the seller's freight template id
"package_width": 30,
"package_height": 20,
"package_length": 10,
"attribute_list": [{
"attribute_value": "Knee Length, --> seller customized attribute name
"attribute_name": "Dresses Length" --> seller customized attribute value
},{
"attribute_value_id": "349906", --> aliexpress attribute value id
"attribute_name_id": "200008911" --> aliexpress attribute name id
}],
"language": "es",
"main_image_urls_list":
["https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg"]
}

2. Edit a existed product

Basically the attributes and settings are the same as posting process, here is one example
request for reference:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascriptMarkdownPHPPythonRubySQL
{
"product_id":1005003235892239,
"sku_info_list":[
{
"price":"12.21",
"discount_price":"11.21",
"inventory":90,
"sku_attributes_list":[
{
"sku_attribute_name":"Color",
"sku_attribute_value":"blue",
"sku_image":"https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows
_Trees.jpg"
}
],
"sku_code":"abc123"
},
{
"price":"12.21",
"inventory":100,
"sku_attributes_list":[
{
"sku_attribute_name":"Color",
"sku_attribute_value":"black",
"sku_image":"https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows
_Trees.jpg"
}
],
"sku_code":"abc989"
}
],
"shipping_lead_time":3,
"multi_country_price_configuration":{
"price_type":"absolute",
"country_price_list":[
{
"sku_price_by_country_list":[
{
"sku_code":"abc123",
"value":"14"
},
{
"sku_code":"abc989",
"value":"13"
}
],
"ship_to_country":"FR"
},
{
"sku_price_by_country_list":[
{
"sku_code":"abc123",
"value":"17"
}
],
"ship_to_country":"ES"
},
{
"sku_price_by_country_list":[
{
"sku_code":"abc989",
"value":"18"
}
],
"ship_to_country":"RU"
}
]
},
"marketing_images":[
{
"image_type":2,
"image_url":"https://ae01.alicdn.com/kf/Hf5987123b00246699ac4f86795d59e636.jpg"
},
{
"image_type":1,
"image_url":"https://ae01.alicdn.com/kf/Hf632c473b88f49f98258812039ab0b7eg.jpg"
}
]
}

Order Api Guide


Get order detail information

API: aliexpress.trade.new.redefining.findorderbyid
https://openservice.aliexpress.com/doc/api.htm?spm=a2o9m.11193531.0.0.31a93b53SbbE
SQ#/api?cid=20905&path=aliexpress.trade.new.redefining.findorderbyid&methodType=GE
T/POST

Get order list information

API: aliexpress.trade.seller.orderlist.get
https://openservice.aliexpress.com/doc/api.htm?spm=a2o9m.11193531.0.0.31a93b53SbbE
SQ#/api?cid=20905&path=aliexpress.trade.seller.orderlist.get&methodType=GET/POST

Platform logistics OpenAPI Integration Guide


1. Overview
This document describes how to integrate the OpenAPI operations for accessing the logistics
workbench of the AliExpress platform. You can call the OpenAPI operations to perform the
following operations on logistics orders: [2.2] Query logistics information of orders, [2.3]
Query merchant addresses, [2.4] Package for orders, [2.5] Ship a package, [2.7] Cancel
packaging, and [2.6] Query waybill information. Before you use the logistics OpenAPI
provided by the AliExpress platform, you must agree the AliExpress logistics service
agreement.
If you do not want to use the logistics service provided by AliExpress for delivery and want
to use a third-party logistics (3PL) service, which is also known as delivery by seller (DBS),
you need to contact the AliExpress customer service for adding you to the DBS whitelist.
After you are added to the DBS whitelist, you can operate the OpenAPI to perform the
following DBS operations for orders: [2.1] Query available logistics services, [2.8] Pack and
ship packages, and [2.9] Modify shipping information.

2. API Interface (Endpoint)


2.1. Query available logistics services

2.1.1. Interface description


●This interface is used to query the available shipping routes for a package. When you
package for an order, input the primary order ID and suborder ID included in the package.
The interface will return the shipping routes that are available for the package.
●When you use the AliExpress logistics service, this interface is optional.
●When you use the DBS mode for delivery, this interface is required.

2.1.2. Request parameters & response parameters


api path:aliexpress.asf.package.shipping.service.get
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.pack
age.shipping.service.get&methodType=GET/POST

2.2. Query logistics information of orders

2.2.1. Interface description


●This interface is used to query logistics information of orders, including the routes used for
delivering packages of suborders in an order, the route level, and whether the delivery
mode is the DBS mode or platform logistics mode.
●This interface is optional.

2.2.2. Request parameters & response parameters


api path:aliexpress.asf.order.shipping.service.get
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.order
.shipping.service.get&methodType=GET/POST

2.3. Query merchant addresses

2.3.1. Interface description


●This interface is used to query the collection address and return address that you record
on the AliExpress platform. The value of the addressId parameter returned by this interface
indicates the collection address and can be used as the value of the corresponding request
parameter of the interface for packaging described in [2.4]. You can call the packaging
interface to create a logistics order on AliExpress. The logistics service personnel will collect
the package at the collection address you specified on the platform.
●This interface is required.
2.3.2. Request parameters & response parameters
api path:aliexpress.asf.seller.address.get
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.seller
.address.get&methodType=GET/POST

2.4. Package for orders

2.4.1. Interface description


●This interface is used for packaging for suborders when using the logistics service provided
by AliExpress. It only supports suborder-level packaging, and you cannot specify sub-order
quantity for packaging.
●This interface is required.

2.4.2. Support Country


Korea,Spain

2.4.3. Request parameters & response parameters


api path:aliexpress.asf.shipment.pack
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.ship
ment.pack&methodType=GET/POST

2.5. Ship a package

2.5.1. Interface description


●In online shipping mode, you call the rts interface to ship a package that has been
packaged. After the rts operation is triggered, the 4PL service provider of Cainiao will collect
the package at the collection address you specified. You need to use the package id
returned by the [packaging] interface as the value of the corresponding request parameter
to call the rts interface.
●This interface is required.

2.5.2. Support Country


Korea,Spain,Mexico

2.5.3. Request parameters & response parameters


api path:aliexpress.asf.platform.logistics.rts
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.platf
orm.logistics.rts&methodType=GET/POST

2.6. Query waybill information


2.6.1. Interface description
●This interface is used to query the information about the waybill of a package. You need to
print the waybill and attach it to the exterior of the package.
●This interface is required.

2.6.2. Request parameters & response parameters


api path:aliexpress.asf.platform.logistics.document.query
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.platf
orm.logistics.document.query&methodType=GET/POST

2.7. Cancel a package

2.7.1. Interface description


●This interface is used to cancel an online shipping-packaging order.
●This interface is required.

2.7.2. Support Country


Korea,Mexico,Spain

2.7.3. Request parameters & response parameters


api path:aliexpress.asf.platform.logistics.repack
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.platf
orm.logistics.repack&methodType=GET/POST

2.8. DBS packaging and shipping

2.8.1. Interface description


●This interface is used for DBS. Before you call this interface, call the interface described in
2.1 to query the available logistics services for the package, and use the logistics service
code (shipmentProviderCode) of an available logistics service as the value of the
corresponding request parameter to call this interface.
●When you use the DBS mode, this interface is required.

2.8.2 Support country


Spain,Korea,Mexico

2.8.3. Request parameters & response parameters


api path:aliexpress.asf.dbs.declareship
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.dbs.d
eclareship&methodType=GET/POST
2.9. Modify DBS shipping information

2.9.1. Interface description


●This interface is used to modify DBS packaging and shipping information. You can change
the waybill number by changing the value of trackingNumber and change the logistics
service provider by changing the value of shipmentProviderCode.
●When you use the DBS mode, this interface is required.

2.9.2. Support country


Korea,Mexico

2.9.3. Request parameters & response parameters


api path:aliexpress.asf.dbs.declare.ship.modify
https://openservice.aliexpress.com/doc/api.htm#/api?cid=21415&path=aliexpress.asf.dbs.d
eclare.ship.modify&methodType=GET/POST

2.10. Query logistics tracking information

2.10.1. Interface description


●This interface is used to query the information about the logistics tracking of a package.
●This interface is optional.

2.10.2. Support country


Korea,Mexico,Spain

2.10.3. Request parameters & response parameters


api path:aliexpress.asf.shipment.tracking.get
https://open.aliexpress.com/doc/api.htm#/api?cid=20892&path=aliexpress.asf.shipment.tr
acking.get&methodType=GET/POST

2.11. Packaging-Support sub-order selection quantity for packaging

2.11.1. Interface description


1. You can use the platform logistics line to perform online packaging operations
through this interface. It supports sub-order selection of quantity for packaging.
Currently, it only supports Mexico.
2. This interface is a required access interface

2.11.2. Support country


Mexico
2.11.3. Request parameters & response parameters
api:aliexpress.asf.local2local.split.quantity.rts.pack
https://open.aliexpress.com/doc/api.htm?_mtopPrev_=use-pre-
acs&_pluginSafe_=yes#/api?cid=20892&path=aliexpress.asf.local2local.split.quantity.rts.pac
k&methodType=GET/POST

AliExpress Direct Local Open Platform Docking SOP

Note that the following content only applies to local overseas ISVs (the main body of the
company in the open platform is a local overseas body, ERP and merchant self-developed
systems can be docked to the relevant APIs), does not apply to cross-border ISVs

1. Link:
https://openservice.aliexpress.com/?spm=a2o9m.11193535.0.0.f58259b2pYQ2rH

2. Registration rules:
https://openservice.aliexpress.com/announcement/index.htm?spm=a2o9m.11193487.0.0.1
919ee0csppqWf#/announcement/detail?id=1341&entitle=announcement&queryid=256&cn
title=announcement&_k=moqav9

3. Process Guidelines - Developer's Guide:


https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193495.0.0.21c46ec6H6Y
OHe&nodeId=27493&docId=118729#/?docId=1358

4.对接文档 api introduction


ap
i
m
api introduction api reference
od
ul
e
https://openservice.aliexpress.com/doc/api
.htm?spm=a2o9m.11193487.0.0.372eee0cz
MZ5Qv#/api?cid=21458&path=aliexpress.a
https://www.yuque.com/yinyanpengbei sf.local.supply.shipping.service.get&metho
lo niao/ph1q8r/fs54kl79n4bvxy17?singleD dType=GET/POST
gi oc# 《本地海外托管新增openAPI文档
sti AliExpress Direct Logistic API for local
c seller》

https://openservice.aliexpress.com/doc/
get order detail information---
api.htm?spm=a2o9m.11193487.0.0.372
tr eee0cJTDFTF#/api?cid=20905&path=alie aliexpress.trade.new.redefining.findorderb
an xpress.trade.seller.orderlist.get&method yid
sa Type=GET/POST get order list information---
cti aliexpress.trade.seller.orderlist.get
on
aliexpress.solution.order.receiptinfo.get
aliexpress.solution.order.fulfill
aliexpress.trade.redefining.confirmshipping
mode

https://www.yuque.com/yinyanpengbei
niao/ph1q8r/zuekkaqtxp0r15zw?singleD
pr oc# 《海外托管服务-商品域 API对接操
od
uc 作指引 Aliexpress-Direct - Product
t Domain API Integration Operation Guide

Affiliate Developers

[Important] Aliexpress Open Platform


Developers Notice
1. Background
In order to provide AliExpress developers with
more stable service, AliExpress has launched a
new open platform: open.aliexpress.com. The
previous AliExpress open platform
(https://developers.aliexpress.com/en), also
known as Taobao Open Platform(TOP) already
offline, while the data(appkey,appsecret, etc.) of
developers has been migrated to new platform.
According to this, some operations/adjustments
needs to be done by developers, which will be
described in the following sections. Please follow
the documentation carefully, otherwise your
business will be impacted.
2. Influenced Developers
1. Commercial Developer
2. Self Developer
3. Affiliates API
4. Drop Shipping
3. Actions to be Taken by Developers
Note:
The following steps mainly apply to the
developers who have already integrated with
Aliexpress in the previous open platform. For
new developers, please refer to the
documentation:
https://openservice.aliexpress.com/doc/doc.ht
m?spm=a2o9m.11193487.0.0.372eee0ce8HtPC&
nodeId=27493&docId=118729#/?docId=1391
Step 1
Login into: https://openservice.aliexpress.com/
,using account and password in previous open
platform
Step2 Fill in Profile
1. Please choose the correct developer type,
e.g. if you were registered as Commercial
Developer in previous open platform, please
also select Commercial developer in new
open platform. Incorrect slection might
influence the subsequent app creation in
new open platform.
2. After logged in, please click the "Profile"
button in the top-right zone, as the following
picture shows.

The following information needs to be filled in


after choose the country/region and developer
type:
For Affliate developer
Corporation:the partner type should be
Affiliate (corporation)or Affiliate (individual)
:refer to below
Step 3
Enter into APP console
(https://openservice.aliexpress.com/app/index.
htm?app/list?_k=6otm31), and check whether
the appkey and appsecret have been migrated
successfully.
Notice: Please do not make any further
modification before finishing step 4 and step 5.
Step 4 Authorization Process Upgrade(Obtain
token)
The way to obtain the token has changed a bit,
compared with Taobao Open Platform.
Please refer to the documentation:
https://openservice.aliexpress.com/doc/doc.ht
m#/?docId=1364
Step 5 API Invocation Process Upgrade
5.1 Using pure http to invoke API (after Mar.1st)
Change the endpoint to
https://openservice.aliexpress.com/doc/api.htm
?api?cid=3&path=/auth/token/security/create&
methodType=GET/POST
Make sure the replacement is made in correct
way.
Example:
Before replacement:
http://gw.api.taobao.com/router/rest?app_key=
24734337&method=aliexpress.offer.product.que
ry&v=2.0&sign=7E63D24D8B28800B94FC151436
DFEE7A&timestamp=2022-06-
15+11%3A54%3A52&partner_id=top-
apitools&session=50000400e43kCExnqC93GWjM
wiywHecjTel0ucGlNIzfxxBDwKMhUI411f20e1acn
hs&format=json&sign_method=md5&product_id
=1307422965

After replacement:
https://api-
sg.aliexpress.com/sync?app_key=24734337&met
hod=aliexpress.offer.product.query&v=2.0&sign
=A7D42DA3D532D5070CD260CA9D707F16&time
stamp=2022-06-
15+11%3A51%3A06&partner_id=top-
apitools&session=50000400e43kCExnqC93GWjM
wiywHecjTel0ucGlNIzfxxBDwKMhUI411f20e1acn
hs&format=json&sign_method=md5&product_id
=1307422965

Although the the migration made the API


invoking compatiable between Taobao Open
Platform and New Open platform, we suggest
that reading the API invoking documentation:
https://openservice.aliexpress.com/doc/doc.ht
m?nodeId=27493&docId=118729#/?docId=1389
5.2 Using SDK to invoke API
⚠️ Please notice: the future changes in
APIs(whether the upgrade of existed APIs or
totally new APIs) will not be reflected in the old
SDK, but only in new SDK. Therefore, 2 options
could be derived for developers:
1. If the developer has no willingness to
integrate with the potential new features,
just change the endpoint in the previous SDK
to:
https://openservice.aliexpress.com/doc/api.
htm?api?cid=3&path=/auth/token/security/
create&methodType=GET/POST
Otherwise, please upgrade to the new SDK,
referred to the documentation:
https://openservice.aliexpress.com/doc/doc.ht
m?nodeId=27493&docId=118729#/?docId=1390
After finishing step 4 and step 5, going alive to
the production environment.

contact us
You can submit a ticket to the AEOP open
platform, or contact us by email

ticket url:
https://openservice.aliexpress.com/support/ind
ex.htm?myTicket?_k=qwzbnv

affiliates Email:affiliates@service.alibaba.com

FAQ
1.Do I need to register a new account on the new
open platform?
You don’t need to register a new account during
the migration. After we complete the data
migration, you can use your existing developer
account to log in to the new platform.
HTTP request sample
Case 1: Business Interfaces
Taking
aliexpress.solution.product.schema.get(get
product schema) API call as example, the steps of
assembling the HTTP request is as follows:
Step 1. Populate parameters and values
Common parameters:
1. app_key = “123456”
2. access_token = “test”
3. timestamp = “1517820392000”
4. sign_method = “sha256”
Business parameters:
1. aliexpress_category_id = “200135143”
2. method =
“aliexpress.solution.product.schema.get”
Step 2. Sort all parameters and values according
to the parameter name in ASCII table
1. access_token = “test”
2. aliexpress_category_id = “200135143”
3. app_key = “123456”
4. sign_method = “sha256”
5. timestamp = “1517820392000”
Step 3. Concatenate the sorted parameters and
their values into a string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
access_tokentestaliexpress_category_id2001351
43app_key123456methodaliexpress.logistics.red
efining.getonlinelogisticsinfosign_methodsha256
timestamp1517820392000
Step 4. Generate signature
Assuming that the App Secret is “helloworld”,
the signature is:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
hex(sha256(access_tokentestaliexpress_category
_id200135143app_key123456methodaliexpress.l
ogistics.redefining.getonlinelogisticsinfosign_me
thodsha256timestamp1517820392000))=F7F792
6B67316C9D1E8E15F7E66940ED3059B1638C497
D77973F30046EFB5BBB
Step 5. Assemble HTTP request
Encode all the parameters and values (with the
“sign” parameter) using UTF-8 format (the order
of parameters can be arbitrary).The splicing
method is:https://api-
sg.aliexpress.com/sync?method={api_path}&{qu
ery}.
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
https://api-
sg.aliexpress.com/sync?method=aliexpress.solut
ion.product.schema.get&app_key=12345678&ali
express_category_id=200135143&access_token=
test&timestamp=1517820392000&sign_method
=sha256&sign=F7F7926B67316C9D1E8E15F7E669
40ED3059B1638C497D77973F30046EFB5BBB
Case 2: System Interfaces
Taking /auth/token/create(generate
access_token) API call as example, the steps of
assembling the HTTP request is as follows:
Step 1. Populate parameters and values
Common parameters:(access_token is not
needed in this API)
1. app_key = “12345678”
2. timestamp = “1517820392000”
3. sign_method = “sha256”
Business parameters:
1. code =
“3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26”
Step 2. Sort all parameters and values according
to the parameter name in ASCII table
1. app_key = “12345678”
2. code =
“3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26”
3. sign_method = “sha256”
4. timestamp = “1517820392000”
Step 3. Concatenate the sorted parameters and
their values into a string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
app_key12345678code3_500102_JxZ05Ux3cnnSS
Um6dCxYg6Q26sign_methodsha256timestamp1
517820392000
Step 4. Add the API name in front of the
concatenated string
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
/auth/token/createapp_key12345678code3_500
102_JxZ05Ux3cnnSSUm6dCxYg6Q26sign_method
sha256timestamp1517820392000
Step 5. Generate signature
Assuming that the App Secret is “helloworld”,
the signature is:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
hex(sha256(/auth/token/createapp_key1234567
8code3_500102_JxZ05Ux3cnnSSUm6dCxYg6Q26s
ign_methodsha256timestamp1517820392000))=
35607762342831B6A417A0DED84B79C05FEFBF1
16969C48AD6DC00279A9F4D81
Step 6. Assemble HTTP request
Encode all the parameters and values (with the
“sign” parameter) using UTF-8 format (the order
of parameters can be arbitrary).The splicing
method is:https://api-
sg.aliexpress.com/rest{api_path}?{query}.
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
https://api-
sg.aliexpress.com/rest/auth/token/create?app_
key=12345678&code=3_500102_JxZ05Ux3cnnSS
Um6dCxYg6Q26&timestamp=1517820392000&si
gn_method=sha256&sign=35607762342831B6A4
17A0DED84B79C05FEFBF116969C48AD6DC00279
A9F4D81
Step 7 java case
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
public static void main(String[] args) throws
Exception {
final String SIGN_METHOD = "sha256";
final String APP_KEY = "YOUR_APP_KEY";
final String APP_SECRET = "YOUR_APP_SECRET";
final String CODE = "YOUR_CODE";
final String API_NAME = "/auth/token/create";

long time = System.currentTimeMillis();


String timeStamp = Long.toString(time);

Map<String, String> params = new


HashMap<String, String>();
params.put("app_key", APP_KEY);
params.put("timestamp", timeStamp);
params.put("sign_method", "sha256");
params.put("CODE", CODE);
params.put("simplify", "true");
String requestBody = null;

String sign =
IopUtils.signApiRequest(API_NAME,params,
requestBody, APP_SECRET, SIGN_METHOD);
params.put("sign",sign);
String url = "https://api-sg.aliexpress.com/rest"
+ API_NAME + "?";
for (String key : params.keySet()) {
url += "&" + key + "=" +
URLEncoder.encode(params.get(key), "utf-8");
}
System.out.println(url);
String sendGet = HttpUtils.sendGet(url);
System.out.println("sendGet

Notes:
1. All request and response data codes are in
UTF-8 format.Please encode all parameter
names and parameter values in the URL. And
all parameter values in the HTTP body should
also be encoded If the requested content
type is application / x-www-form-
urlencoded.If it is in multipart / form data
format, the parameter value of each form
field does not need to be encoded, but the
charset part of each form field needs to be
specified as UTF-8.
2. When the length of the URL assembled by
the parameter name and parameter value is
less than 1024 characters, you can use
method "GET" to initiate the request; If the
parameter type contains byte [] type or the
assembled request URL is too long, the
request must be initiated by method "POST".
All APIs can initiate requests using "POST".
3. Only those who do not use the official AE
SDK need to generate the signature for API
calls.If the official AE SDK is used, the SDK
will complete this step automatically.

API endpoint URLs


Aliexpress Open Platform provides an online
production environment. The data under the
production environment are all true online data,
providing limited times and authority of
interface calling. The production environment
shares data with the online system, and the true
data of an online shop are directly influenced by
the interface for writing class, so you must
operate with caution.

Currently, all interfaces are divided into two


categories: System interfaces and Business
interfaces. And you need to choose the correct
endponint to use for each type API.
System interfaces: Authorization relative APIs
under 'System Tool' in the API documentation.
Business interfaces: All other APIs except system
APIs which mentioned above.

1.For those business APIs: https://api-


sg.aliexpress.com/sync?method={api_path}&{qu
ery}
2.For those system APIs: https://api-
sg.aliexpress.com/rest{api_path}?{query}

Notes:
1. {api_path} means the path of the specific API
,{query} means the calling parameters.
2. Here to see the detail HTTP request sample.

API calling process


Aliexpress Open Platform APIs are called through
HTTP requests. You can call the API by using the
platform provided SDK (recommended), or by
assembling the request with a certain format
according to the Aliexpress Open Platform
protocols (only if no official SDK is provided for a
programming language). This section introduces
how to assemble HTTP requests to call the
Aliexpress APIs.
API calls require data for input and return output
as the responses. The general steps for calling an
API through generating HTTP requests are as
follows:
1. Populate parameters and values
2. Generate signature
3. Assemble HTTP requests
4. Initiate HTTP requests
5. Get HTTP responses
6. Interpret JSON/XML responses
Refer to the sections below for detailed
information about the API calling process on
Aliexpress Open Platform.
1. API endpoints URLs
2. Calling parameters
3. Signature algorithm
4. HTTP request sample

Calling parameters
Calls to the API must include system parameters
in addition to the parameters associated with
the application. Different application specific
parameters are needed for different specific
APIs.
System parameters
System parameters are required in the HTTP
request of every API call, listed in the following
table:

Business parameters
In addition to the system parameters that must
be included in the API call request, the business
parameters for the request are also required.
Refer to the API documentation for details about
the business parameters of each API.

Signature algorithm
Aliexpress Open Platform verifies the identity of
each API request, and the server will also verify
whether the call parameters are valid. Therefore,
each HTTP request must contain the signature
information. The requests with invalid signature
will be rejected.
Aliexpress Open Platform verifies the identity of
the requests by the App Key and Secret that are
assigned to your application. The App Secret is
used to generate the signature string in the HTTP
request URL and server-side signature string. It
must be kept strictly confidential.

If you compose HTTP request manually (instead


of using the official SDK), you need to
understand the following signature algorithm.
The process of generating the signature is as
follows:(Notice:The only difference between
System Interfaces and Business Interfaces is how
to handle api_path.)
1.Sort all request parameters (including system
and application parameters, but except the
“sign” and parameters with byte array type.If the
API you used is Business Interface, api_path
should be used as the request parameter to
participate in sorting) according to the
parameter name in ASCII table. For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
// Example of api_path key value pair
// method : aliexpress.offer.product.post

Before sort: foo=1, bar=2, foo_bar=3, foobar=4


After sort: bar=2, foo=1, foo_bar=3, foobar=
2.Concatenate the sorted parameters and their
values into a string. For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
bar2foo1foo_bar3foobar4
3.(If the API you used is System Interface, Please
add the API name in front of the concatenated
string. For example, adding the API name
"/test/api")
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
/test/apibar2foo1foo_bar3foobar4
4.Encode the concatenated string in UTF-8
format and make a digest by the signature
algorithm (using HMAC_SHA256). For example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
hmac_sha256(/test/apibar2foo1foo_bar3foobar
4)
5.Convert the digest to hexadecimal format. For
example:
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
hex("helloworld".getBytes("utf-8")) =
"68656C6C6F776F726C64"
Sample code for JAVA
PlainBashC++C#CSSDiffHTML/XMLJavaJavascript
MarkdownPHPPythonRubySQL
public static final String CHARSET_UTF8 = "UTF-
8";
public static final String SIGN_METHOD_SHA256
= "sha256";
public static final String
SIGN_METHOD_HMAC_SHA256 =
"HmacSHA256";

public static String signApiRequest(Map<String,


String> params, String appSecret, String
signMethod, String apiName) throws
IOException {
// If you are using Business Interface, please do
as step 1,add api_path into params.
// params.put("method",apiName);

// sort all text parameters


String[] keys = params.keySet().toArray(new
String[0]);
Arrays.sort(keys);

// connect all text parameters with key and


value
StringBuilder query = new StringBuilder();
// If you are using System Interface, please do as
step 3
// append API name
query.append(apiName);
for (String key : keys) {
String value = params.get(key);
if (areNotEmpty(key, value)) {
query.append(key).append(value);
}
}

// sign the whole request


byte[] bytes = null;

if (signMethod.equals(SIGN_METHOD_SHA256))
{
bytes = encryptHMACSHA256(query.toString(),
appSecret);
}

// finally : transfer sign result from binary to


upper hex string
return byte2hex(bytes);
}

private static byte[] encryptHMACSHA256(String


data, String secret) throws IOException {
byte[] bytes = null;
try {
SecretKey secretKey = new
SecretKeySpec(secret.getBytes(CHARSET_UTF8),
SIGN_METHOD_HMAC_SHA256);
Mac mac =
Mac.getInstance(secretKey.getAlgorithm());
mac.init(secretKey);
bytes =
mac.doFinal(data.getBytes(CHARSET_UTF8));
} catch (GeneralSecurityException gse) {
throw new IOException(gse.toString());
}
return bytes;
}

/**
* Transfer binary array to HEX string.
*/
public static String byte2hex(byte[] bytes) {
StringBuilder sign = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(bytes[i] & 0xFF);
if (hex.length() == 1) {
sign.append("0");
}
sign.append(hex.toUpperCase

Get Product Shipping Info


GET/POST
aliexpress.affiliate.product.shipping.get
Description:Get the shipping info of the
product. The required information for the input
parameters can be obtained from the product
query API.
Parameter
Required
Name Type Description
or not
product_id Number Yes Product ID
sku_id Number Yes SKU ID
The Ship to country. Fi
ship_to_country String Yes country; Returns the p
policy.
Required
Name Type Description
or not
The target currency: U
target_currency String Yes
RUB, BRL, AUD, INR, JP
target_sale_price String Yes Non-App sale price in
target language:
target_language String Yes
EN,RU,PT,ES,FR,ID,IT,T
tax_rate String Yes Product tax rate
Response Parameters
Name Type Description
resp_result Object Respond results

client = iop.IopClient(url, appkey ,appSecret)


request =
iop.IopRequest('aliexpress.affiliate.product.ship
ping.get')
request.add_api_param('product_id',
'33006951782')
request.add_api_param('sku_id',
'12000029786932962')
request.add_api_param('ship_to_country', 'CN')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_sale_price',
'100.03')
request.add_api_param('target_language', 'en')
request.add_api_param('tax_rate', '0.1')
response = client.execute(request)
print(response.type)
print(response.body)

Get SKU Product Detail Info


GET/POST
aliexpress.affiliate.product.sku.detail.get
Description:Get all the SKU information of the
product, including price, specifications, delivery
info, etc.
Parameter
Required
Name Type Description
or not
The Ship to country. Filt
ship_to_country String Yes
that country
product_id String Yes Product ID
The target currency: US
target_currency String Yes
BRL, AUD, INR, JPY, IDR
target language:
target_language String Yes
EN,PT,ES,FR,ID,IT,TH,JA,
Yes / No. No by default.
need_deliver_info String No
the query speed will be
Required
Name Type Description
or not
The SKU IDs are optiona
sku_ids String No provided, the query will
the product ID (limited
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('aliexpress.affiliate.product.sku.d
etail.get')
request.add_api_param('ship_to_country', 'CN')
request.add_api_param('product_id',
'1005007588427363')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_language', 'EN')
request.add_api_param('need_deliver_info',
'No')
request.add_api_param('sku_ids',
'12000041407359776,12000041669723427')
response = client.execute(request)
print(response.type)
print(response.body)

Inquire Business License


GET/POST
/aliexpress/xinghe/merchant/license/get
Description:Inquire Business License
Parameter
Name Type Required or not Description
param0 Object Yes 请求参数
Response Parameters
Name Type Description
result Object 返回值
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('/aliexpress/xinghe/merchant/lic
ense/get')
request.add_api_param('param0',
'{\"sellerAdminSeq\":\"\\\"200689478\\\"\",\"c
hannel\":\"\\\"FACEBOOK\\\"\"}')
response = client.execute(request)
print(response.type)
print(response.body)

generate affiliate links


GET/POST
aliexpress.affiliate.link.generate
Description:generate affiliate links
Parameter
Required
Name Type Description
or not
API
app_signature String No
signature
Promotion
link type: 0
for normal
link which
has
standard
promotion_link_type Number Yes
commission
, and 2 for
hot link
which has
hot product
commission
original link
source_values String Yes
or value
Your
tracking_id String Yes
trackingID
Response Parameters
Name Type Description
resp_result Object Respond result

client = iop.IopClient(url, appkey ,appSecret)


request =
iop.IopRequest('aliexpress.affiliate.link.generate'
)
request.add_api_param('app_signature',
'asdasdas')
request.add_api_param('promotion_link_type',
'0')
request.add_api_param('source_values',
'http://www.aliexpress.com,http://www.aliexpr
ess.ru')
request.add_api_param('tracking_id', 'default')
response = client.execute(request)
print(response.type)
print(response.body)

get order info


GET/POST
aliexpress.affiliate.order.get
Description:get order info
Parameter
Required
Name Type Description
or not
app_signature String No API signature
Respond
fields String No
parameter
Required
Name Type Description
or not
Order ID list,
separated by
order_ids String No comma. Query by
sub order id is
supported
Response Parameters
Name Type Description
resp_result Object Respond result

client = iop.IopClient(url, appkey ,appSecret)


request =
iop.IopRequest('aliexpress.affiliate.order.get')
request.add_api_param('app_signature',
'aaaaaa')
request.add_api_param('fields',
'commission_rate,created_time')
request.add_api_param('order_ids',
'1111,222,333')
response = client.execute(request)
print(response.type)
print(response.body)

get hotproducts
GET/POST
aliexpress.affiliate.hotproduct.query
Description:get hotproducts
Parameter
Required
Name Type Description
or not
app_signature String No API signature
List of category
category_ids String No
https://develop
fields String No Respond parame
keywords String No Filter products b
max_sale_price Number No Filter products b
min_sale_price Number No Filter products b
page_no Number No Page number
page_size Number No Record count of
platform_product_type String No product type:A
sort by:SALE_PR
sort String No
LAST_VOLUME_
target currency:
target_currency String No
JPY, IDR, SEK,KR
target
target_language String No
language:EN,RU
tracking_id String No Your trackingID
Required
Name Type Description
or not
Estimated delive
delivery_days String No
in 10 days
The Ship to coun
ship_to_country String No
Returns the pric
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('aliexpress.affiliate.hotproduct.q
uery')
request.add_api_param('app_signature',
'sssfffxxgggg')
request.add_api_param('category_ids',
'111,222,333')
request.add_api_param('fields',
'app_sale_price,shop_id')
request.add_api_param('keywords', 'mp3')
request.add_api_param('max_sale_price',
'33333')
request.add_api_param('min_sale_price',
'22222')
request.add_api_param('page_no', '111')
request.add_api_param('page_size', '50')
request.add_api_param('platform_product_type
', 'ALL')
request.add_api_param('sort',
'SALE_PRICE_ASC')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_language', 'EN')
request.add_api_param('tracking_id',
'trackingId')
request.add_api_param('delivery_days', '3')
request.add_api_param('ship_to_country', 'US')
response = client.execute(request)
print(response.type)
print(response.body)

get products
GET/POST
aliexpress.affiliate.product.query
Description:get products
Parameter
Required
Name Type Description
or not
app_signature String No API signature
List of category
category_ids String No
https://develop
fields String No Respond parame
keywords String No Filter products b
max_sale_price Number No Filter products b
Required
Name Type Description
or not
min_sale_price Number No Filter products b
page_no Number No Page number
page_size Number No record count of
platform_product_type String No product type:A
sort by:SALE_PR
sort String No
LAST_VOLUME_
target currency:
target_currency String No
INR, JPY, IDR, SE
target
target_language String No
language:EN,RU
tracking_id String No Your trackingID
The Ship to coun
ship_to_country String No
Returns the pric
Estimated delive
delivery_days String No
:in 10 days
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('aliexpress.affiliate.product.quer
y')
request.add_api_param('app_signature',
'asdasdasdsa')
request.add_api_param('category_ids',
'111,222,333')
request.add_api_param('fields',
'commission_rate,sale_price')
request.add_api_param('keywords', 'mp3')
request.add_api_param('max_sale_price', '100')
request.add_api_param('min_sale_price', '15')
request.add_api_param('page_no', '1')
request.add_api_param('page_size', '50')
request.add_api_param('platform_product_type
', 'ALL')
request.add_api_param('sort',
'SALE_PRICE_ASC')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_language', 'EN')
request.add_api_param('tracking_id',
'trackingId')
request.add_api_param('ship_to_country', 'US')
request.add_api_param('delivery_days', '3')
response = client.execute(request)
print(response.type)
print(response.body)

get productdetail info


GET/POST
aliexpress.affiliate.productdetail.get
Description:get productdetail info
Parameter
Required
Name Type Description
or not
app_signature String No API signature
fields String No Respond parameter list. e
product_ids String No Product ids
target currency:USD, GBP
target_currency String No
BRL, AUD, INR, JPY, IDR, S
Target Language
target_language String No
:EN,RU,PT,ES,FR,ID,IT,TH,J
tracking_id String No Your trackingID
The Ship to country. Filter
country String No country; Returns the price
policy.
Response Parameters
Name Type Description
resp_result Object Respond results
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('aliexpress.affiliate.productdetail
.get')
request.add_api_param('app_signature', 'aaaaa')
request.add_api_param('fields',
'commission_rate,sale_price')
request.add_api_param('product_ids',
'11111,22222')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_language', 'EN')
request.add_api_param('tracking_id', 'default')
request.add_api_param('country', 'US')
response = client.execute(request)
print(response.type)
print(response.body)

smart match products


GET/POST
aliexpress.affiliate.product.smartmatch
Description:smart match products
Parameter
Required
Name Type Description
or not
app String No App information
app_signature String No API signature
device String No Device infomation
adid or idfa, for more in
https://support.google
device_id String Yes
Can be null, if it is null,
keywords or product ID
Required
Name Type Description
or not
fields String No Respond parameter list
keywords String No Recommend products b
page_no Number No Request page number
product_id String No Product ID, matching re
site String No site information
Target Currency: USD, G
target_currency String No
BRL, AUD, INR, JPY, IDR
Target Languages:
target_language String No
EN,RU,PT,ES,FR,ID,IT,TH
tracking_id String No trackingId
user String No user id
The Ship to country. Fil
country String No country; Returns the pr
policy.
Response Parameters
Name Type Description
resp_result Object Respond results
client = iop.IopClient(url, appkey ,appSecret)
request =
iop.IopRequest('aliexpress.affiliate.product.smar
tmatch')
request.add_api_param('app', 'app')
request.add_api_param('app_signature',
'sssfffxxgggg')
request.add_api_param('device', 'aaaa')
request.add_api_param('device_id', 'aaaaaa')
request.add_api_param('fields',
'app_sale_price,shop_id')
request.add_api_param('keywords', 'mp3')
request.add_api_param('page_no', '1')
request.add_api_param('product_id', '11111')
request.add_api_param('site', 'sa'a'a'a's')
request.add_api_param('target_currency', 'USD')
request.add_api_param('target_language', 'EN')
request.add_api_param('tracking_id',
'trackingId')
request.add_api_param('user', 'usera')
request.add_api_param('country', 'US')
response = client.execute(request)
print(response.type)
print(response.body)

You might also like