感谢您的反馈!
Reconfigure Existing APP to Daraz Open Platform
The Seller Center APIs have been migrated to Daraz Open Platform. The current applications that call the Seller Center APIs need to be reconfigured for the migration. This section aims at helping you migrate your existing applications to the new platform.
We strongly recommend you to use the official SDK to call Daraz Open Platform APIs ( download link ), which saves your efforts in resolving the protocols. The official SDK will be continuously upgraded to support more programming languages ??and APIs. If you do not use the official SDK, you will need to understand the following API protocol updates. For more detailed information, refer to the API Reference Documentation .
Daraz Open Platform API has updated protocol than the Seller Center API. The differences between the request URLs, parameters, and responses are shown in the table below.
Items |
Seller Center API |
Daraz Open Platform API |
Description |
Request URL |
https://api.sellercenter.Daraz.{sg} |
https://api.Daraz.{sg}/rest |
One URL for each venture |
Parameters |
?Action=GetBrands |
/brands/get? |
API name: RESTful |
&Timestamp=2015-07-01T11:11+0000 |
×tamp=2018-01-07+15%3A53%3A16 |
Timestamp: supporting UTC format |
|
&Version=1.0 |
N/A |
||
&Signature=01286525c2fdba61ed1f5e |
&sign_method=hmac |
Signature algorithm (Daraz Open Platform supports HMAC_SHA256) |
|
&Format=XML / JSON |
&format=json |
DAZOP supports json format only |
|
&UserID=a@bc |
&app_key=4272 &partner_id=top-apitools &session=61003091b65c3d405 |
Identity: · APP: non -> app_key · ISV: non -> partner_id · user: UserEmail -> log in auth seesion |
|
&Limit=100 |
&limit=100 |
Changed to lowercase. For example, OrderId will be changed to order_id |
|
&Offset=0 |
&offset=0 |
Changed to lowercase |
|
Post body |
<xml>...</xml> |
<xml>...</xml> |
No change |
Success response |
Refer to the sample below |
Refer to the sample below |
· Removed the "SuccessResponse", "Head", and "Body" tags · The "RequestId" is on the same level with the results |
Error response |
Refer to the sample below |
Refer to the sample below |
· Kept the "ErrorResponse" tag · Removed the "Head" tag |
SDK |
For Java |
For Java, C#, PHP, Ruby, and Python |
{ "SuccessResponse": { "Head": { "RequestId": "0bb606c315153141103028143eff59", "RequestAction": "GetBrands", "ResponseType": "Brands", "Timestamp": "2018-01-07T08:35:10+00:00" }, "Body": { "Brands": [ { "BrandId": 3635, "Name": "3Dconnexion", "GlobalIdentifier": "3dconnexion" }, { "BrandId": 3636, "Name": "3M", "GlobalIdentifier": "3m" } ] } }}
{ "ErrorResponse": { "Head": { "RequestId": "0bb606d615153145206778830e1230", "RequestAction": "GetBrands", "ErrorType": "Sender", "ErrorCode": 20, "ErrorMessage": "E020: %s Invalid Limit,limit MaxSize 1000" } }}
{ "request_id": "cwxtlxt98lvy", "code": "0", "data": [ { "brand_id": 161266, "global_identifier": "test_carmen", "name": "test carmen" }, { "brand_id": 161267, "global_identifier": "2k_games", "name": "2K Games" } ]}
{ "request_id": "cwxtly2mw54o", "code": "15", "type":"ISV|platform|ISP", "message": "Remote service error"}
Daraz Open Platform APIs are RESTful APIs. The following table shows the mapping of the API method name and the Daraz Open Platform API path.
API |
API path |
GetBrands |
|
GetCategoryAttributes |
|
GetCategoryTree |
|
GetPayoutStatus |
|
GetTransactionDetails |
|
GetDocument |
|
GetFailureReasons |
|
GetMultipleOrderItems |
|
GetOrder |
|
GetOrderItems |
|
GetOrders |
|
GetShipmentProviders |
|
SetInvoiceNumber |
|
SetStatusToCanceled |
|
SetStatusToPackedByMarketplace |
|
SetStatusToReadyToShip |
|
CreateProduct |
|
GetProducts |
|
GetQcStatus |
|
GetResponse |
|
MigrateImage |
|
MigrateImages |
|
RemoveProduct |
|
SetImages |
|
UpdatePriceQuantity |
|
UpdateProduct |
|
UploadImage |
|
SellerUpdate |
|
UserUpdate |