To enhance data security of the AliExpress platform and sellers, as well as to improve the efficiency and quality of interconnection between open platforms, the original AliExpress open platform has been completely migrated and upgraded to a new open platform which is called TOP (Taobao Open Platform).
First please take a look at AliExpress Open Platform Introduction and check which type of developer you are. If you are not clear about the developer type, please don’t hesitate to get help from your AliExpress business contact or AliExpress open platform support (Dingtalk group ID: 23371186). And then you can follow the process to register developer account and apply for open platform applications.
Here we will see the difference between these two platforms and what you need to pay attention to during the migration.
Both Ocean and TOP are based on OAuth 2.0. The authorization for Ocean platform is:
1. Get temporary token (code)
2. Get refresh token and access token by temporary token
3. Refresh access token by refresh token after access token is expired
4. Start from step 1 if both tokens are expired
In TOP platform, step 3 is not necessary because the validity period of access token in TOP (1 year for Self-Developed applications and 1 month for Commercial Developer applications) is much longer than in Ocean (10 hours), and the refresh token is already expired when you get it, which means it’s useless.
Please refer to TOP User Authorization Introduction for more details
Note
Both Ocean and TOP have limitation for API calls, but you will face more problems on this in TOP platform. So be aware of this, please refer to API access count limitation.
TOP performs better than Ocean on SDK support.
Though SDK provides convenience for interaction with AliExpress API, you need to consider the deployment issue, especially when you need to deploy your module together with AliExpress SDK to each client.
For most of the API, we only change them from one platform to another platform, the function and input/output are the same logically. Below are the major differences between Ocean APIs and TOP APIs.
All API names are changed. For example, API to upload images, its name is “api.uploadImage4SDK” in Ocean while it’s “aliexpress.photobank.redefining.uploadimageforsdk” in TOP.
Ocean APIs use camel case for parameter name while TOP APIs convert each upper case character to underscore character and lower case character. For example, for posting product in native language, Ocean parameter name “aeopAeProductSKUs” is named as “aeop_ae_product_s_k_us” in TOP.
TOP supports below basic data types which are not all the same as data types in Ocean.
A list parameter in API is mapped to a JSON array in Ocean while it’s mapped to a JSON object with a sub JSON array in TOP (JSON format). For example, in aliexpress.freight.redefining.listfreighttemplate, the aeop_freight_template_d_t_o_list is a list.
The response in TOP is
There is a middle layer aeopfreighttemplatedtolist between aeop_freight_template_d_t_o_list and the JSON array. The name of the middle layer is the lower case of the type name (here it’s Aeopfreighttemplatedtolist).
There are two kinds of errors in Ocean
Platform errors, Ocean will return response like below when there are platform errors.
{ "error_code":"450", "error_message":"Required argument productId : expect [type: java.lang.String]", "exception":"Required argument productId : expect [type: java.lang.String]" }
TOP also has those two kinds of errors, but it’s recommended to merge them into consistent format like below
{ "error_response":{ "sub_msg":"invalid parameter", "code":50, "sub_code":"isv.invalid-parameter", "msg":"Remote service error" } }
however, some APIs don’t follow this rule and still use their own error responses
So when there is API’s own error response, you need to check both platform defined error and API error, otherwise you only need to handle the platform defined error.