LinkedMall开放接口 (1.0.0)
Download OpenAPI specification:Download
1. 卖家安装时,平台请求应用
在上述授权流程中,LinkedMall会重定向到应用的安装地址,即app_install_uri
,重定向到该地址的时候,会额外携带以下参数:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
client_id |
String |
Query | Y | 颁发给应用的客户端ID |
shop_id |
String |
Query | Y | 店铺ID |
timestamp |
String |
Query | Y | 时间戳 |
platform |
String |
Query | Y | 固定为linkedmall |
hmac |
String |
Query | Y | app_install_uri 所有Query参数进行HMAC签名的值 |
请求示例:
https://awesomeapp.com/install?shop_id=2022927736662&client_id=382635552423&platform=linkedmall×tamp=1646915676453&hmac=3766682300b57a855702e8729f91b9eb10d3fa662211415f4eac098730822e14e
2. 应用发起授权请求
请求授权接口动作由应用主动发起,具体来说就是拼接一个重定向地址,由浏览器发起重定向即可。
请求端点:https://linkedmall.store/openapi/oauth2/authorize
此请求包含的参数如下:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
client_id |
String |
Query | Y | 平台颁发给应用的客户端ID |
response_type |
String |
Query | Y | 返回类型,固定值code |
scope |
String |
Query | Y | 请求的权限scope,空格拼接并用 URLEncode编码 |
redirect_uri |
String |
Query | Y | 注册的回调地址,使用URLEncode编码 |
state |
String |
Query | N | 应用自己生成的随机字符串,可选 |
请求示例:
https://linkedmall.store/openapi/oauth2/authorize?client_id=9737261665284&response_type=code&scope=read_items%20read_orders&redirect_uri=https%3A%2F%2Fawesomeapp.com%2Foauth2%2Fcallback&state=rh8q7t7cge7637
3. 卖家确认授权,应用收到回调
在卖家确认授权之后,LinkedMall会回调应用,把授权码(code)信息带到应用这边,具体来说,LinkedMall会拼接一个重定向地址,由浏览器发起重定向,最终请求到应用这边。
请求参数如下:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
code |
String |
Query | Y | 授权码,用于交换token |
state |
String |
Query | N | 应用申请授权带过来的state参数,可选 |
shop_id |
String |
Query | Y | 店铺ID |
timestamp |
String |
Query | Y | 时间戳 |
hamc |
String |
Query | Y | 上述所有Query参数的HMAC签名 |
请求示例:
https://awesomeapp.com/oauth2/callback?code=cn8a7t34t8t&shop_id=387266155522×tamp=1646915676453&state=dh8q3287787c3&hmac=3766682300b57a855702e8729f91b9eb10d3fa662211415f4eac098730822e14e
4. 应用收到回调,进行验签
签名和验签相关内容参考下述 签名机制 小节。
5. 申请token
应用确认授权码回调准确无误之后,需要尽快申请token,因为授权码(code)的有效期只有几分钟。
请求端点:https://linkedmall.store/openapi/oauth2/token
请求参数如下:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
client_id |
String |
Body | Y | 平台颁发给应用的客户端ID |
client_secret |
String |
Body | Y | 平台颁发给应用的密钥 |
grant_type |
String |
Body | Y | 固定值authorization_code |
code |
String |
Body | Y | 回调给应用的授权码 |
请求示例:
curl -i -X POST https://linkedmall.store/openapi/oauth2/token \
-H 'Content-Type:application/json' \
-d '{"client_id": "9737261665284", "client_secret": "cno8份734xn3736c632", "grant_type": "authorization_code", "code": "cn8a7t34t8t"}'
返回参数如下:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
access_token |
String |
Body | Y | 颁发的access_token |
refresh_token |
String |
Body | Y | 颁发的refresh_token |
token_type |
String |
Body | Y | token的类型,固定为bearer |
expires_in |
Long |
Body | Y | access_token过期时间,单位为秒 |
返回示例:
{
"access_token": "cn87g327CN7d73cj3hHx",
"token_type": "bearer",
"refresh_token": "xno87wh479tFxj8Hw22",
"expires_in": 7200
}
6. 刷新token
颁发给应用的access_token有一个有效期,默认为2小时,应用自己需要确保:
- 在access_token过期之前,调用LinkedMall的刷新token接口,刷新access_token
请求端点:https://linkedmall.store/openapi/oauth2/token
请求参数如下:
参数 | 类型 | 位置 | 必填 | 描述 |
---|---|---|---|---|
client_id |
String |
Body | Y | 颁发给应用的客户端ID |
client_secret |
String |
Body | Y | 颁发给应用的密钥 |
grant_type |
String |
Body | Y | 授权类型,固定为refresh_token |
refresh_token |
String |
Body | Y | 之前颁发给应用的refresh_token |
请求示例:
curl -i -X POST https://linkedmall.store/openapi/oauth2/token \
-H 'Content-Type:application/json' \
-d '{"client_id": "9737261665284", "client_secret": "cno8份734xn3736c632", "grant_type": "refresh_token", "refresh_token": "xno87wh479tFxj8Hw22"}'
返回和上述申请token保持一致。
LinkedMall的签名步骤为:
- 把所有需要签名的参数,放入HashMap
- 把上述HashMap序列化为JSON格式字符串,根据key的字母表顺序排序
- 对上述字符串进行HMAC签名,得到
hmac
值
同样的,应用在验签的时候,重复上述步骤得到hmac
值,与请求带过来的hmac
值进行对比,如果不一致则说明请求非法。
Java加签示例
首先引入依赖:
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
使用Java
实现上述签名过程的代码如下:
private String hmac(String secret, String algo, Map<String, String> params) throws Exception {
try {
Mac mac = Mac.getInstance(algo);
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), algo));
HmacUtils utils = new HmacUtils(algo, secret.getBytes(StandardCharsets.UTF_8));
String json = OBJECT_MAPPER.writeValueAsString(params);
return utils.hmacHex(json);
} catch (NoSuchAlgorithmException | JsonProcessingException | InvalidKeyException e) {
log.error("HMAC signing failed: {}", e.getMessage());
throw new RuntimeException(e.getMessage());
}
}
scope | 请求路径 | 权限说明 |
---|---|---|
read_shop | GET /openapi/v1/merchant/shop/{shopId} | 读取店铺基本信息 |
read_customers | GET /openapi/v1/customers/{customerId} | 查询客户信息 |
read_customers | GET /openapi/v1/customers | 查询客户信息 |
read_fulfillments | GET /openapi/v1/fulfillments/{fulfillmentId} | 查询履约信息 |
read_items | GET /openapi/v1/items/{itemId} | 查询商品信息 |
read_items | GET /openapi/v1/items | 查询商品信息 |
search_items | GET /openapi/v1/items/search | 搜索商品信息 |
read_orders | GET /openapi/v1/orders/{orderId} | 查询订单信息 |
write_checkout | POST /openapi/v1/orders/checkout | 付款 |
write_customer | POST /openapi/v1/customers | 新增客户信息 |
write_customer | POST /openapi/v1/customers/{customerId}/update | 更新客户信息 |
write_customer | POST /openapi/v1/customers/{customerId}/delete | 删除客户信息 |
write_draft_orders | POST /openapi/v1/draftOrders/{orderId}/delete | 删除草稿单 |
write_fulfillments_event | POST /openapi/v1/fulfillments/{fulfillmentId}/logistics/{logisticsId}/omsevents | 创建履约事件 |
write_items | POST /openapi/v1/items | 新增商品信息 |
write_items | POST /openapi/v1/items/{itemId}/update | 更新商品信息 |
write_items | POST /openapi/v1/items/{itemId}/delete | 删除商品信息 |
write_items | POST /openapi/v1/items/{itemId}/activate | 上架商品 |
write_items | POST /openapi/v1/items/{itemId}/deactivate | 下架商品 |
write_shipping | POST /openapi/v1/fulfillments/{fulfillmentId}/logistics | 更改物流信息 |
write_fulfillments | PUT /openapi/v1/fulfillments/{fulfillmentId}/logistics/{logisticsId} | 修改运单 |
write_fulfillments | POST /openapi/v1/fulfillments/{fulfillmentId}/logistics/{logisticsId}/cancel | 取消运单 |
read_locations | GET /openapi/v1/setting/locations | 查询地址信息 |
write_fulfillments | POST /openapi/v1/orders/{orderId}/shipment | 订单发货 |
创建商品
Authorizations:
Request Body schema: application/json
itemCreateRequest
abstractText | string 摘要 |
Array of objects (AttributeValue) 属性值列表 | |
brandName | string 品牌名称 |
categoryId | string 分类id |
categoryName | string 类目名称 |
collectionIds | Array of strings 关联商品集合id |
description | string 描述 |
distributionChannels | Array of strings Items Enum: "ONLINE_MALL" "POS" "TELEGRAM" 铺货渠道 |
handle | string 导入时,指定handle可以对相同handle的商品进行覆盖 |
isDefaultSku | boolean 是否默认sku |
Array of objects (MediaCreateRequest) 媒体列表 | |
merchantId | string 商户id |
offlineTrade | boolean |
onlineTime | string <date-time> 上线时间,定时上线用 |
Array of objects (PropertyCreateRequest) 属性列表 | |
requestId | string request id |
seodescription | string |
seokeywords | string |
seolink | string |
seotitle | string |
shouldCoverByHandle | boolean 是否覆盖同名商品,默认为false |
Array of objects (SkuCreateRequest) SKU列表 | |
sortWeight | string 排序权重,浮点型 |
status | string 状态 |
Array of objects (TagDTO) 标签列表 | |
title | string 标题 |
vendor | string 制造商 |
Responses
Request samples
- Payload
{- "abstractText": "abstract",
- "attributeValueList": [
- {
- "attributeId": "string",
- "attributeName": "string",
- "attributeValue": "string",
- "attributeValueId": "string"
}
], - "brandName": "string",
- "categoryId": "string",
- "categoryName": "string",
- "collectionIds": [
- "string"
], - "description": "<html></html>",
- "distributionChannels": [
- "ONLINE_MALL"
], - "handle": "string",
- "isDefaultSku": true,
- "medias": [
- {
- "name": "string",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "type": "image"
}
], - "merchantId": "123172398129",
- "offlineTrade": true,
- "onlineTime": "2018-06-18T11:49:50-04:00",
- "properties": [
- {
- "assetsType": "COLOR_HEX",
- "name": "color",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "values": [
- {
- "assetsValue": "string",
- "position": 1,
- "requestId": "4ae63c2f-d8cc-4865-8fe2-1aef44fa748b",
- "status": "ENABLED",
- "value": "red"
}
]
}
], - "requestId": "4ae63c2f-d8cc-4865-8fe2-1aef44fa748b",
- "seodescription": "string",
- "seokeywords": "string",
- "seolink": "string",
- "seotitle": "string",
- "shouldCoverByHandle": true,
- "skus": [
- {
- "barcode": "BARCODE123",
- "description": "this is a iphone",
- "displayDiscount": true,
- "grams": 500,
- "height": 100,
- "inventoryStrategy": "string",
- "isDangerousGoods": false,
- "isDisplayDiscount": true,
- "isTaxed": true,
- "isTrackInventory": true,
- "length": 100,
- "medias": [
- {
- "name": "string",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "type": "image"
}
], - "name": "G256",
- "prices": [
- {
- "amount": 10000,
- "currencyCode": "USD",
- "effectiveTime": "2019-08-24T14:15:22Z",
- "expiredTime": "2019-08-24T14:15:22Z",
- "status": "string",
- "type": "COMPARED_AT"
}
], - "propertyValues": [
- {
- "name": "color",
- "value": "yellow"
}
], - "requiresShipping": false,
- "sellingInventory": 10,
- "status": "string",
- "title": "Green 256GB",
- "trackInventory": true,
- "weight": "string",
- "weightUnit": "GRAM",
- "width": 100
}
], - "sortWeight": 111.11,
- "status": "ENABLE",
- "tags": [
- {
- "id": "string",
- "name": "string"
}
], - "title": "iPhone 13 Pro Max",
- "vendor": "vendor"
}
获取单个商品
Authorizations:
path Parameters
itemId required | string 商品id |
query Parameters
language | string Enum: "AF" "AF_ZA" "AR" "AR_AE" "AR_BH" "AR_DZ" "AR_EG" "AR_IQ" "AR_JO" "AR_KW" "AR_LB" "AR_LY" "AR_MA" "AR_OM" "AR_QA" "AR_SA" "AR_SY" "AR_TN" "AR_YE" "AZ" "AZ_AZ" "AZ_AZ_CYRILLIC" "BE" "BE_BY" "BG" "BG_BG" "BS_BA" "CA" "CA_ES" "CS" "CS_CZ" "CY" "CY_GB" "DA" "DA_DK" "DE" "DE_AT" "DE_CH" "DE_DE" "DE_LI" "DE_LU" "DV" "DV_MV" "EL" "EL_GR" "EN" "EN_AU" "EN_BZ" "EN_CA" "EN_CB" "EN_GB" "EN_IE" "EN_JM" "EN_NZ" "EN_PH" "EN_TT" "EN_US" "EN_ZA" "EN_ZW" "EO" "ES" "ES_AR" "ES_BO" "ES_CL" "ES_CO" "ES_CR" "ES_DO" "ES_EC" "ES_ES_TRADITIONAL" "ES_ES_INTERNATIONAL" "ES_GT" "ES_HN" "ES_MX" "ES_NI" "ES_PA" "ES_PE" "ES_PR" "ES_PY" "ES_SV" "ES_UY" "ES_VE" "ET" "ET_EE" "EU" "EU_ES" "FA" "FA_IR" "FI" "FI_FI" "FO" "FO_FO" "FR" "FR_BE" "FR_CA" "FR_CH" "FR_FR" "FR_LU" "FR_MC" "GL" "GL_ES" "GU" "GU_IN" "HE" "HE_IL" "HI" "HI_IN" "HR" "HR_BA" "HR_HR" "HU" "HU_HU" "HY" "HY_AM" "ID" "ID_ID" "IS" "IS_IS" "IT" "IT_CH" "IT_IT" "JA" "JA_JP" "KA" "KA_GE" "KK" "KK_KZ" "KN" "KN_IN" "KO" "KO_KR" "KOK" "KOK_IN" "KY" "KY_KG" "LT" "LT_LT" "LV" "LV_LV" "MI" "MI_NZ" "MK" "MK_MK" "MN" "MN_MN" "MR" "MR_IN" "MS" "MS_BN" "MS_MY" "MT" "MT_MT" "NB" "NB_NO" "NL" "NL_BE" "NL_NL" "NORWEGIAN_NYNORSK_NORWAY" "NORTHERN_SOTHO" "NORTHERN_SOTHO_ZA" "PUNJABI" "PUNJABI_IN" "POLISH" "POLISH_PL" "PORTUGUESE" "PORTUGUESE_BRAZIL" "PORTUGUESE_PORTUGAL" "QUECHUA" "QUECHUA_BOLIVIA" "QUECHUA_ECUADOR" "QUECHUA_PERU" "ROMANIAN" "ROMANIAN_RO" "RUSSIAN" "RUSSIAN_RU" "SANSKRIT" "SANSKRIT_IN" "NORTHERN_SAMOS" "NORTHERN_SAMIAN_FINLAND" "SCOTT_SAMOS_FINLAND" "INARI_SAMOS_FINLAND" "NORTHERN_SAMIAN_NORWAY" "RULE_SAMOS_NORWAY" "SOUTH_SAMIAN_NORWAY" "NORTHERN_SAMIAN_SWEDEN" "RULE_SAMOS_SWEDEN" "SOUTH_SAMIAN_SWEDEN" "SLOVAK" "SLOVAK_SK" "SLOVENIAN" "SL_SI" "SQ" "SQ_AL" "SR_BA_LATIN" "SR_BA_CYRILLIC" "SR_SP_LATIN" "SR_SP_CYRILLIC" "SV" "SV_FI" "SV_SE" "SW" "SW_KE" "SYR" "SYR_SY" "TA" "TA_IN" "TE" "TE_IN" "TH" "TH_TH" "TL" "TL_PH" "TN" "TN_ZA" "TR" "TR_TR" "TS" "TT" "TT_RU" "UK" "UK_UA" "UR" "UR_PK" "UZ" "UZ_UZ" "UZ_UZ_CYRILLIC" "VI" "VI_VN" "XH" "XH_ZA" "ZH" "ZH_CN" "ZH_HK" "ZH_MO" "ZH_SG" "ZH_TW" "ZU" "ZU_ZA" language |
Responses
更新商品
Authorizations:
path Parameters
itemId required | string itemId |
Request Body schema: application/json
itemUpdateRequest
abstractText | string 摘要 |
Array of objects (AttributeValue) 属性值列表 | |
brandName | string 品牌名称 |
categoryId | string 分类id |
categoryName | string 类目名称 |
collectionIds | Array of strings 关联商品集合id |
description | string 描述 |
distributionChannels | Array of strings Items Enum: "ONLINE_MALL" "POS" "TELEGRAM" 铺货渠道 |
handle | string 导入handle |
isDefaultSku | boolean 是否默认sku |
Array of objects (MediaCreateRequest) 媒体列表,为空则不更新 | |
merchantId | string 商户id |
offlineTrade | boolean |
onlineTime | string <date-time> 上线时间,定时上线用 |
Array of objects (PropertyCreateRequest) 属性列表,为空则不更新 | |
requestId | string request id |
seodescription | string |
seokeywords | string |
seolink | string |
seotitle | string |
Array of objects (SkuUpdateRequest) SKU列表,为空则不更新 | |
sortWeight | string 排序权重,浮点型 |
status | string 状态 |
Array of objects (TagDTO) 标签列表 | |
title | string 标题 |
vendor | string 制造商 |
Responses
Request samples
- Payload
{- "abstractText": "abstract",
- "attributeValueList": [
- {
- "attributeId": "string",
- "attributeName": "string",
- "attributeValue": "string",
- "attributeValueId": "string"
}
], - "brandName": "string",
- "categoryId": "string",
- "categoryName": "string",
- "collectionIds": [
- "string"
], - "description": "<html></html>",
- "distributionChannels": [
- "ONLINE_MALL"
], - "handle": "string",
- "isDefaultSku": true,
- "medias": [
- {
- "name": "string",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "type": "image"
}
], - "merchantId": "123172398129",
- "offlineTrade": true,
- "onlineTime": "2018-06-18T11:49:50-04:00",
- "properties": [
- {
- "assetsType": "COLOR_HEX",
- "name": "color",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "values": [
- {
- "assetsValue": "string",
- "position": 1,
- "requestId": "4ae63c2f-d8cc-4865-8fe2-1aef44fa748b",
- "status": "ENABLED",
- "value": "red"
}
]
}
], - "requestId": "4ae63c2f-d8cc-4865-8fe2-1aef44fa748b",
- "seodescription": "string",
- "seokeywords": "string",
- "seolink": "string",
- "seotitle": "string",
- "skus": [
- {
- "barcode": "BARCODE123",
- "description": "this is a iphone",
- "displayDiscount": true,
- "grams": 500,
- "height": 100,
- "id": "12397102370912",
- "inventoryStrategy": "string",
- "isDangerousGoods": false,
- "isDisplayDiscount": true,
- "isTaxed": true,
- "isTrackInventory": true,
- "length": 100,
- "medias": [
- {
- "name": "string",
- "position": 1,
- "requestId": "string",
- "status": "string",
- "type": "image"
}
], - "name": "G256",
- "prices": [
- {
- "amount": 10000,
- "currencyCode": "USD",
- "effectiveTime": "2019-08-24T14:15:22Z",
- "expiredTime": "2019-08-24T14:15:22Z",
- "status": "string",
- "type": "COMPARED_AT"
}
], - "propertyValues": [
- {
- "name": "color",
- "value": "yellow"
}
], - "requiresShipping": false,
- "sellerSku": "string",
- "sellingInventory": 10,
- "status": "string",
- "title": "Green 256GB",
- "trackInventory": true,
- "weight": "string",
- "weightUnit": "GRAM",
- "width": 100
}
], - "sortWeight": 111.11,
- "status": "ENABLE",
- "tags": [
- {
- "id": "string",
- "name": "string"
}
], - "title": "iPhone 13 Pro Max",
- "vendor": "vendor"
}
分页获取商品列表
Authorizations:
query Parameters
asc | boolean Example: asc=true 是否升序,默认true |
collectionId | string Example: collectionId=1231325135 商品集合id |
createdAtMax | string <date-time> 最大创建时间 |
createdAtMin | string <date-time> 最小创建时间 |
fields | string 返回字段 |
idList | Array of strings id列表,用于批量查询商品信息 |
ids | string id范围 |
keywordIds | Array of strings 关键字ID |
language | string Enum: "AF" "AF_ZA" "AR" "AR_AE" "AR_BH" "AR_DZ" "AR_EG" "AR_IQ" "AR_JO" "AR_KW" "AR_LB" "AR_LY" "AR_MA" "AR_OM" "AR_QA" "AR_SA" "AR_SY" "AR_TN" "AR_YE" "AZ" "AZ_AZ" "AZ_AZ_CYRILLIC" "BE" "BE_BY" "BG" "BG_BG" "BS_BA" "CA" "CA_ES" "CS" "CS_CZ" "CY" "CY_GB" "DA" "DA_DK" "DE" "DE_AT" "DE_CH" "DE_DE" "DE_LI" "DE_LU" "DV" "DV_MV" "EL" "EL_GR" "EN" "EN_AU" "EN_BZ" "EN_CA" "EN_CB" "EN_GB" "EN_IE" "EN_JM" "EN_NZ" "EN_PH" "EN_TT" "EN_US" "EN_ZA" "EN_ZW" "EO" "ES" "ES_AR" "ES_BO" "ES_CL" "ES_CO" "ES_CR" "ES_DO" "ES_EC" "ES_ES_TRADITIONAL" "ES_ES_INTERNATIONAL" "ES_GT" "ES_HN" "ES_MX" "ES_NI" "ES_PA" "ES_PE" "ES_PR" "ES_PY" "ES_SV" "ES_UY" "ES_VE" "ET" "ET_EE" "EU" "EU_ES" "FA" "FA_IR" "FI" "FI_FI" "FO" "FO_FO" "FR" "FR_BE" "FR_CA" "FR_CH" "FR_FR" "FR_LU" "FR_MC" "GL" "GL_ES" "GU" "GU_IN" "HE" "HE_IL" "HI" "HI_IN" "HR" "HR_BA" "HR_HR" "HU" "HU_HU" "HY" "HY_AM" "ID" "ID_ID" "IS" "IS_IS" "IT" "IT_CH" "IT_IT" "JA" "JA_JP" "KA" "KA_GE" "KK" "KK_KZ" "KN" "KN_IN" "KO" "KO_KR" "KOK" "KOK_IN" "KY" "KY_KG" "LT" "LT_LT" "LV" "LV_LV" "MI" "MI_NZ" "MK" "MK_MK" "MN" "MN_MN" "MR" "MR_IN" "MS" "MS_BN" "MS_MY" "MT" "MT_MT" "NB" "NB_NO" "NL" "NL_BE" "NL_NL" "NORWEGIAN_NYNORSK_NORWAY" "NORTHERN_SOTHO" "NORTHERN_SOTHO_ZA" "PUNJABI" "PUNJABI_IN" "POLISH" "POLISH_PL" "PORTUGUESE" "PORTUGUESE_BRAZIL" "PORTUGUESE_PORTUGAL" "QUECHUA" "QUECHUA_BOLIVIA" "QUECHUA_ECUADOR" "QUECHUA_PERU" "ROMANIAN" "ROMANIAN_RO" "RUSSIAN" "RUSSIAN_RU" "SANSKRIT" "SANSKRIT_IN" "NORTHERN_SAMOS" "NORTHERN_SAMIAN_FINLAND" "SCOTT_SAMOS_FINLAND" "INARI_SAMOS_FINLAND" "NORTHERN_SAMIAN_NORWAY" "RULE_SAMOS_NORWAY" "SOUTH_SAMIAN_NORWAY" "NORTHERN_SAMIAN_SWEDEN" "RULE_SAMOS_SWEDEN" "SOUTH_SAMIAN_SWEDEN" "SLOVAK" "SLOVAK_SK" "SLOVENIAN" "SL_SI" "SQ" "SQ_AL" "SR_BA_LATIN" "SR_BA_CYRILLIC" "SR_SP_LATIN" "SR_SP_CYRILLIC" "SV" "SV_FI" "SV_SE" "SW" "SW_KE" "SYR" "SYR_SY" "TA" "TA_IN" "TE" "TE_IN" "TH" "TH_TH" "TL" "TL_PH" "TN" "TN_ZA" "TR" "TR_TR" "TS" "TT" "TT_RU" "UK" "UK_UA" "UR" "UR_PK" "UZ" "UZ_UZ" "UZ_UZ_CYRILLIC" "VI" "VI_VN" "XH" "XH_ZA" "ZH" "ZH_CN" "ZH_HK" "ZH_MO" "ZH_SG" "ZH_TW" "ZU" "ZU_ZA" Example: language=CHINESE 语言 |
limit | integer <int32> 页数 |
modifiedAtMax | string <date-time> 最大修改时间 |
modifiedAtMin | string <date-time> 最小修改时间 |
page | integer <int32> 页码 |
publishedAtMax | string <date-time> 最大发布时间 |
publishedAtMin | string <date-time> 最小发布时间 |
publishedStatus | string 发布状态 |
rankType | string Example: rankType=ProductName 排序规则 |
searchText | string Example: searchText=iPhone 13 Pro Max 搜索文本 |
searchTextType | string Example: searchTextType=ProductName 搜索文本类型 |
shouldIncludeDescription | boolean Example: shouldIncludeDescription=false 是否需要返回商品描述,列表页通常不需要,默认为false |
sinceId | string 游标 |
title | string 标题 |
vendor | string 制造商 |
Responses
Response samples
- 200
{- "errorCode": "string",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "string",
- "success": true
}
创建草稿单
Authorizations:
Request Body schema: application/json;charset=UTF-8
request
appId | string app id |
channel | string order channel |
customerId | string shop customer id |
language | string 渲染语言 |
Array of objects (LineItemRequest) order payment amount | |
requestId | string [ 0 .. 64 ] characters request id from merchant |
Responses
Request samples
- Payload
{- "appId": "2032432432423",
- "channel": "string",
- "customerId": "2020111232847239874748923010",
- "language": "string",
- "lineItems": [
- {
- "customerId": "2020111232847239874748923010",
- "quantity": 1,
- "skuId": "2020111232847239874748923010"
}
], - "requestId": "2020111232847239874748923010"
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "checkoutUrl": "string",
- "orderId": "string",
- "requestId": "string"
}, - "success": true
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "actualPaymentPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "billingAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "cancelReason": "string",
- "canceledAt": "2019-08-24T14:15:22Z",
- "channel": "string",
- "closedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "contact": "string",
- "createdTime": "2019-08-24T14:15:22Z",
- "currency": "string",
- "customerId": "string",
- "customerPaymentPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "discountPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "email": "string",
- "fulfillments": [
- {
- "createdTime": "2019-08-24T14:15:22Z",
- "fulfillmentId": "string",
- "fulfillmentPackages": [
- {
- "companyCode": "string",
- "companyName": "string",
- "items": [
- {
- "customerId": "2020111232847239874748923010",
- "quantity": 1,
- "skuId": "2020111232847239874748923010"
}
], - "logisticsChannel": "string",
- "logisticsId": "string",
- "status": "string",
- "trackNumber": "string",
- "trackUrl": "string"
}
], - "logisticsStatus": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "status": "string",
- "tenantId": "string",
- "trackCompany": "string",
- "trackCompanyCode": "string",
- "trackNumber": "string",
- "trackUrl": "string",
- "tradeOrderId": "string"
}
], - "includeTax": true,
- "lineItems": [
- {
- "createdTime": "2019-08-24T14:15:22Z",
- "currency": "string",
- "inventoryItemId": "string",
- "itemId": "string",
- "itemTitle": "string",
- "lineId": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "property": "string",
- "quantity": 0,
- "refundStatus": "string",
- "skuComparedPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuGrams": 0,
- "skuId": "string",
- "skuName": "string",
- "skuPic": "string",
- "skuPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuTitle": "string",
- "subTotalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tenantId": "string",
- "totalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tradeOrderId": "string",
- "weight": "string",
- "weightUnit": "string"
}
], - "modifiedTime": "2019-08-24T14:15:22Z",
- "note": "string",
- "orderAdminStatus": "string",
- "orderId": "string",
- "orderNo": "string",
- "orderRecallStatus": "string",
- "paymentAdminStatus": "string",
- "paymentChannel": "string",
- "payments": [
- {
- "amount": 0,
- "channel": "string",
- "createdTime": "2019-08-24T14:15:22Z",
- "currency": "string",
- "gatewayId": "string",
- "lastMessage": "string",
- "lastStatus": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "payTime": "2019-08-24T14:15:22Z",
- "payUrl": "string",
- "paymentId": "string",
- "status": "string",
- "tenantId": "string",
- "tradeOrderId": "string"
}
], - "phone": "string",
- "requestId": "string",
- "sameAddress": true,
- "shipmentAdminStatus": "string",
- "shippedLineItems": [
- {
- "companyCode": "string",
- "companyName": "string",
- "count": 0,
- "createdTime": "2019-08-24T14:15:22Z",
- "id": "string",
- "logisticsChannel": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "shippedLines": [
- {
- "createdTime": "2019-08-24T14:15:22Z",
- "currency": "string",
- "inventoryItemId": "string",
- "itemId": "string",
- "itemTitle": "string",
- "lineId": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "property": "string",
- "quantity": 0,
- "refundStatus": "string",
- "skuComparedPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuGrams": 0,
- "skuId": "string",
- "skuName": "string",
- "skuPic": "string",
- "skuPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuTitle": "string",
- "subTotalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tenantId": "string",
- "totalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tradeOrderId": "string",
- "weight": "string",
- "weightUnit": "string"
}
], - "status": "string",
- "tenantId": "string",
- "trackNumber": "string",
- "trackUrl": "string"
}
], - "shippingAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "shippingFee": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "shopId": "string",
- "status": "string",
- "subtotalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "taxPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tenantId": "string",
- "totalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "totalWeight": 0,
- "totalWeightStr": "string",
- "tradeOrderTaxList": [
- {
- "createdTime": "2019-08-24T14:15:22Z",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "taxAmount": 0,
- "taxFormat": "string",
- "taxName": "string",
- "taxValue": 0.1,
- "tenantId": "string",
- "type": "string"
}
], - "waitSendLineItems": [
- {
- "createdTime": "2019-08-24T14:15:22Z",
- "currency": "string",
- "inventoryItemId": "string",
- "itemId": "string",
- "itemTitle": "string",
- "lineId": "string",
- "modifiedTime": "2019-08-24T14:15:22Z",
- "property": "string",
- "quantity": 0,
- "refundStatus": "string",
- "skuComparedPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuGrams": 0,
- "skuId": "string",
- "skuName": "string",
- "skuPic": "string",
- "skuPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "skuTitle": "string",
- "subTotalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tenantId": "string",
- "totalPrice": {
- "amount": 1000,
- "createdTime": "2018-06-18T11:49:50-04:00",
- "currencyCode": "USD",
- "effectiveTime": "2018-06-18T11:49:50-04:00",
- "expiredTime": "2018-06-18T15:49:50-04:00",
- "explicitFormattedAmount": "$10.00 USD",
- "formattedAmount": "$10.00",
- "id": 123981623912693,
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "type": "COMPARED_AT"
}, - "tradeOrderId": "string",
- "weight": "string",
- "weightUnit": "string"
}
]
}, - "success": true
}
订单发货
Authorizations:
path Parameters
orderId required | string orderId |
Request Body schema: application/json;charset=UTF-8
request
channelId required | string Enum: "OMS" "CAINIAO" logistics channel id |
required | object (Address) |
required | Array of objects (LineItemRequest) logistics items |
required | object (Address) |
trackCompany required | string tracking company name |
trackCompanyCode | string tracking company code |
trackNumber required | string tracking id |
trackUrl | string tracking url |
Responses
Request samples
- Payload
{- "channelId": "OMS、CAINIAO",
- "destination": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "items": [
- {
- "customerId": "2020111232847239874748923010",
- "quantity": 1,
- "skuId": "2020111232847239874748923010"
}
], - "originAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "trackCompany": "'UPS",
- "trackCompanyCode": "SF",
- "trackNumber": "2020111232847239874748923010",
- "trackUrl": "'https://www.sf-tracking.com/?number=123456789"
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "fulfillmentId": 2.022081910002401e+33,
- "logisticsId": 2.022081710002401e+33
}, - "success": true
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "locations": [
- {
- "address": "string",
- "city": "string",
- "district": "string",
- "email": "string",
- "id": "string",
- "isDefault": true,
- "name": "string",
- "phone": "string",
- "postCode": "string",
- "region": "string",
- "regionCode": "string",
- "state": "string"
}
]
}, - "success": true
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "email": "string",
- "merchantId": "string",
- "shopId": "string",
- "shopName": "string",
- "subdomain": "string"
}, - "success": true
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "destination": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "fulfillAt": "2022-08-19 09:48:46",
- "fulfillBy": "2022-09-17 15:53:02",
- "fulfillType": "SHIPPING",
- "orderId": 2.022081910002401e+33,
- "orderLines": [
- {
- "currency": "string",
- "fulfillableQuantity": 0,
- "grams": 0,
- "itemId": "string",
- "itemTitle": "string",
- "price": 0,
- "property": "string",
- "quantity": 0,
- "skuId": "string",
- "skuName": "string",
- "skuTitle": "string"
}
], - "originAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "status": "PENDING/OPEN/SUCCESS/INCOMPLETE/CANCELLED",
- "trackingInfo": {
- "companyCode": "xxx",
- "logisticsId": 2.022081910002401e+33,
- "trackCompany": "顺丰快寄",
- "trackNumber": "SF19824568398464"
}, - "tradeOrderId": 2.022081810002101e+33
}, - "success": true
}
创建物流单
Authorizations:
path Parameters
fulfillmentId required | string fulfillmentId |
Request Body schema: application/json;charset=UTF-8
request
channelId | string Enum: "OMS" "CAINIAO" "MARK_SHIP" logistics channel id |
object (Address) | |
Array of objects (LogisticsLineItemRequest) Logistics items | |
merchantId | string merchant id |
object (Address) | |
region | string region |
tenantId | string tenant id |
trackCompany | string tracking company name |
trackCompanyCode | string tracking company code |
trackNumber | string tracking id |
trackUrl | string tracking url |
Responses
Request samples
- Payload
{- "channelId": "OMS",
- "destination": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "items": [
- {
- "quantity": 1,
- "skuId": "2020111232847239874748923010",
- "skuName": 1,
- "skuPrice": 1
}
], - "merchantId": "2020111232847239874748923010",
- "originAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "region": "xxx",
- "tenantId": "2020111232847239874748923010",
- "trackCompany": "'UPS",
- "trackCompanyCode": "SF",
- "trackNumber": "2020111232847239874748923010",
- "trackUrl": "'https://www.sf-tracking.com/?number=123456789"
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "fulfillmentId": 2.022081910002401e+33,
- "logisticsId": 2.022081710002401e+33
}, - "success": true
}
更新物流单
Authorizations:
path Parameters
fulfillmentId required | string fulfillmentId |
logisticsId required | string logisticsId |
Request Body schema: application/json;charset=UTF-8
request
channelId | string Enum: "OMS" "CAINIAO" "MARK_SHIP" logistics channel id |
object (Address) | |
Array of objects (LogisticsLineItemRequest) Logistics items | |
merchantId | string merchant id |
object (Address) | |
region | string region |
tenantId | string tenant id |
trackCompany | string tracking company name |
trackCompanyCode | string tracking company code |
trackNumber | string tracking id |
trackUrl | string tracking url |
Responses
Request samples
- Payload
{- "channelId": "OMS",
- "destination": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "items": [
- {
- "quantity": 1,
- "skuId": "2020111232847239874748923010",
- "skuName": 1,
- "skuPrice": 1
}
], - "merchantId": "2020111232847239874748923010",
- "originAddress": {
- "address1": "Klongsan, Bkk, Thailand",
- "address2": "40-42 Somdejchaipraya Soi 6",
- "city": "Klongsan",
- "cityCode": "KS",
- "companyName": "Alikaka",
- "createdTime": "2018-06-18T11:49:50-04:00",
- "district": "Somdejchaipraya Soi",
- "districtCode": "SS",
- "email": "abc@alibaba-inc.com",
- "firstName": "Pai",
- "id": 1097312703710293,
- "lastName": "Sam",
- "middleName": "Middle",
- "modifiedTime": "2018-06-18T11:49:50-04:00",
- "name": "hangzhou",
- "note": "string",
- "phone": 13110000000,
- "phoneCode": "CN-86",
- "position": 1,
- "postCode": 10600,
- "region": "Thailand",
- "regionCode": "TH",
- "state": "Bkk",
- "stateCode": "Bkk",
- "useDefault": false
}, - "region": "xxx",
- "tenantId": "2020111232847239874748923010",
- "trackCompany": "'UPS",
- "trackCompanyCode": "SF",
- "trackNumber": "2020111232847239874748923010",
- "trackUrl": "'https://www.sf-tracking.com/?number=123456789"
}
Response samples
- 200
{- "errorCode": "string",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "string",
- "success": true
}
取消物流单
Authorizations:
path Parameters
fulfillmentId required | string fulfillmentId |
logisticsId required | string logisticsId |
Responses
Response samples
- 200
{- "errorCode": "string",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "string",
- "success": true
}
创建OMS物流事件单
Authorizations:
path Parameters
fulfillmentId required | string fulfillmentId |
logisticsId required | string logisticsId |
Request Body schema: application/json;charset=UTF-8
request
happenedAt | string <date-time> 发生时间 |
merchantId | string merchant id |
message | string 物流信息 |
region | string region |
status | string Enum: "NEW" "PENDING" "PACKED" "PARTIAL_SHIPPING" "COMPLETE_SHIPPING" "READY_TO_SHIP" "PICKUP_FAILED" "TRANSIT_TO_SHIP" "SHIPPED" "DELIVERED" "DELIVER_FAILED" "RETURNED" "CANCELLED" OMS物流状态 |
tenantId | string tenant id |
Responses
Request samples
- Payload
{- "happenedAt": "2020-07-23T12:00:00.000Z",
- "merchantId": "2020111232847239874748923010",
- "message": "您购买的xxx商品已从北京发货前往西安",
- "region": "xxx",
- "status": "NEW",
- "tenantId": "2020111232847239874748923010"
}
Response samples
- 200
{- "errorCode": "PARAM_ILLEGAL",
- "errorContext": {
- "errorStack": [
- {
- "errorCode": {
- "errorLevel": "string",
- "errorPrefix": "string",
- "errorScene": "string",
- "errorSpecific": "string",
- "errorType": "string",
- "version": "string"
}, - "errorMsg": "string",
- "location": "string"
}
], - "errorVarMap": {
- "property1": "string",
- "property2": "string"
}
}, - "errorMessage": "request param illegal",
- "resultObject": {
- "eventId": 2.022081710002401e+33,
- "fulfillmentId": 2.022081810002101e+33,
- "logisticsId": 2.022081710002401e+33
}, - "success": true
}