Mall Center
# Mall Center
# API Declaration
The "token" param must be contained in the header of the https request when calling the API.
Token is the only global API call credential for the Sobot API open platform. It is used when developers call the business APIs and thus should be properly kept. At least 32 chars should be reserved to store token. The validity period of token is currently 24 hours. It needs to be refreshed regularly or reacquired according to the token failure prompt returned by the API. When requesting the token API, regardless of the existence of token, a new token will be returned and its expiry time will be reset (currently 24 hours).
Token usage description:
- Developers need to obtain and manage the token uniformly. When calling the Sobot open APIs of various business, they should use the same token, instead of refreshing and obtaining new tokens for each business. Otherwise, it will easily lead to token invalidation and affect the normal API call.
- The current validity period of the token is transmitted by the returned expire_in, which is currently a value within 86,400 s. Developers need to refresh the new token in advance based on this valid time.
- Developers should reacquire the token according to the token invalidation prompt returned by the API.
# API Call
# Store Management
# ● Add store
API description:
Push store full info in bulk.
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/stores/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
store_list | list | Yes | Store info | The structure of the store object is as follows |
Store object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
storeid | string | Yes | Third-party store ID | No more than 128 bytes |
store_name | string | Yes | Store name | No more than 30 chars |
store_type | int | No | Store name | Please refer to the Store Mapping Relationship Table below for details |
country | string | No | Store country | |
province | string | No | Store province | |
city | string | No | Store city | |
district | string | No | Store district | |
detail_address | string | No | Store detailed address | No more than 256 chars |
parent_storeid | string | No | Parent store ID | Default to 0 (the highest parent level store) |
media_url | string | No | Store image url | Store image url |
employee_list | list | No | Store employee list | Employee info is as follows |
store_code | string | No | Store code | Store's unique code |
status | int | Yes | Store status | 1-Open, 2-Closed |
create_time | string | Yes | Creation time | Timestamp (ms) |
update_time | string | Yes | Update time | Timestamp (ms) |
creator | string | No | Creator | Sobot agent service ID |
delete_flag | int | Yes | Whether to delete | 0-No, 1-Yes |
Store employee object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
employeeid | string | No | Employee ID | Sobot agent ID or sobot department ID of employees, determined by employees_type |
employees_type | int | No | Employee type | Required when employee ID exists: 0-Shop manager, 1-Ordinary employee, 2-Department |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"store_list": [
{
"storeid": "42870430",
"store_name": "Luckin Coffe",
"store_type": 0,
"country": "China",
"province": "Beijing",
"city": "Beijing",
"district": "Beijing",
"detail_address": "No.103, Building 9, Zone 2, Hanwei International Stadium",
"parent_storeid": "0",
"media_url": "https://www.google.com.pic",
"source": 2,
"employee_list": [
{
"employeeid": "zhangsan",
"employees_type": 1
}
],
"store_code": "S25472709390762003",
"status": 1,
"create_time": "1646233461000",
"update_time": "1646233461000",
"creator": "zhangsan",
"delete_flag": 0
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded",
"data": []
}
2
3
4
5
# ● Query store
API description:
Query store full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/stores/get
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
start_time_unix | string | No | Query start time | Query start time (ms) |
end_time_unix | string | No | Query start time | Query end time (ms) |
page_no | int | Yes | Page | No more than 128 bytes |
page_size | int | Yes | Pages | No more than 128 bytes |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | object | No | Return object |
data param details:
Param | Type | Name | Note |
---|---|---|---|
page_no | int | Page | |
page_size | int | Number of return on each page | |
page_count | int | Total pages | |
total_count | int | Total pieces | |
store_id | string | Third-party store ID | Third-party store ID |
sobot_store_id | string | Sobot store ID | Sobot store ID |
store_name | string | Store name | |
store_type | int | Store type | 0-Other, 1-Offline store, 2-Online store |
country | string | Country | China |
province | string | Province | Sichuan Province |
city | string | City | |
district | string | District | |
detail_address | string | Store detailed address | |
parent_store_id | string | Parent store ID | |
media_url | string | Store image url | |
source | int | Store source | 1-Self-built |
employee_list | list | Store employee list | |
employeeid | string | Store employee ID | It could be an employee ID or a department ID, distinguished by employees_type |
employees_type | int | Store employee type | 0-Shop manager, 1-Ordinary employee, 2-Department |
employee_name | string | Store employee name | It could be an employee name or a department name, distinguished by employees_type |
store_code | string | Store code | Store's unique code |
status | int | Store status | 1-Open, 2-Closed |
create_time | string | Creation time | Timestamp (s) |
creator | string | Creator | |
delete_flag | int | Whether to delete | 0-No, 1-Yes |
Request example:
{
"timestamp": "1652361292000",
"nonce": "c31ef7d26f5f42aab753daff73375bbf",
"start_time_unix": "1650423556000",
"end_time_unix": "1653015558000",
"page_no": 1,
"page_size": 5
}
2
3
4
5
6
7
8
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded",
"data": {
"page_no": 1,
"page_size": 5,
"data": [
{
"store_id": "00000000001",
"sobot_store_id": "627d0724e4b05001a012544a",
"store_name": "test store",
"store_type": 0,
"country": "China",
"province": "Hebei",
"city": "Shijiazhuang",
"district": "Gaocheng",
"detail_address": "University Town",
"parent_store_id": "0",
"media_url": "https://img.yzcdn.cn/upload_files/2022/04/01/Fu0Sj2nD_UHNN71KLYhMpicjDgUD.jpg",
"source": 2,
"employee_list": [
{
"employeeid": "zhangsan",
"employees_type": 0,
"employee_name": "zhangsan"
}
],
"store_code": "S25472709390762003",
"status": 1,
"create_time": "1652357736",
"creator": "zhangsan",
"delete_flag": 0
}
],
"page_count": 1,
"total_count": 1
},
"logMessageId": null,
"success": true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Product management
# ● Add product category
API description:
Push product category info
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/item_category/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
item_category | object | Yes | Product category info | Product category structure is as follows |
Refund order item_category object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
category_id | string | Yes | Third-party product category ID | Third-party category ID, unique under third-party |
category_hierarchy | string | Yes | Category level | |
has_child_node | int | Yes | Whether there are child nodes | 0-No, 1-Yes |
parent_node_id | string | Yes | Parent category ID | |
category_name | string | Yes | Category name | |
version | string | No | Edition | |
create_time | string | No | Creation time | Timestamp (ms) |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"item_category": {
"category_id": "202103045600000323434",
"source": 2,
"category_hierarchy": "102",
"has_child_node": 1,
"parent_node_id": "100",
"category_name": "book",
"version": "v2",
"create_time": "1350000123400"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded"
}
2
3
4
# ● Query product category
API description:
Query product category details
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/item_categories/get
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
category_id | string | Yes | Third-party product category ID | Third-party category ID, unique under third-party |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | object | No | Return object |
data param details:
Param | Type | Name | Note |
---|---|---|---|
sobot_category_id | string | Sobot product category ID | |
category_id | string | Third-party product category ID | |
source | string | Product source | Product source 1-Self-built |
category_hierarchy | string | Category level | |
has_child_node | string | Whether there are child nodes | 0-Yes, 1-No |
parent_node_id | string | Parent category ID | |
category_name | string | Category name | |
version | string | Edition | Third-party version no. |
create_time | string | Creation time | Timestamp (s) |
Request example:
{
"timestamp": "1652361292000",
"nonce": "c31ef7d26f5f42aab753daff73375bbf",
"category_id": "123456",
"source": 2
}
2
3
4
5
6
Return example:
{
"retCode":"000000",
"retMsg":"Operation succeeded",
"data":[
{
"sobot_category_id":"62427d6b60b228459521b5bb",
"category_id":"202103045600000323434",
"source":2,
"category_hierarchy":"102",
"has_child_node":1,
"parent_node_id":"100",
"category_name":"book",
"version":"v2",
"create_time":"1350000123"
}
],
"logMessageId":null,
"success":true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# ● Add product info
API description:
Push product full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/items/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
item_list | list | Yes | Product set | The structure of the item object is as follows |
Product item object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
storeid | string | Yes | Third-party store ID | No more than 128 bytes |
itemid | string | Yes | Third-party product ID | |
sku_code | string | No | Product SKU code | |
spu_code | string | No | Product SPU code | |
name | string | Yes | Product name | |
title | string | No | Product title | |
cost_price | string | No | List price | In cents |
retail_price | string | Yes | Retail price | In cents |
create_time | string | Yes | Creation time | Timestamp (ms) |
update_time | string | Yes | Update time | Timestamp (ms) |
delete_flag | int | Yes | Whether to delete | 0-No, 1-Yes |
media_url | string | No | Product attachment URL | |
stock | long | No | Product stock | |
sales_volume | long | No | Product sales volume | |
status | int | Yes | Product status | 0-Other, 1-On sale, 2-Off shelves, 3-Sold out |
creator | string | No | Creator | Sobot agent service ID |
category_id | string | No | Third-party product category ID |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"item_list": [
{
"storeid": "42870430",
"itemid": "865324",
"sku_code": "00000323434 ",
"spu_code": "BM50184126118",
"name": "Third grade Chinese language intensive lecture",
"title": "Third grade Chinese language intensive lecture",
"cost_price": "300",
"retail_price": "200",
"source": 2,
"create_time": "1350000123400",
"update_time": "1350000123400",
"delete_flag": 0,
"media_url": "https://www.google.com.pic",
"stock": 10,
"sales_volume": 100,
"status": 1,
"creator": "zhangsan"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded"
}
2
3
4
# ● Query product info
API description:
Query product full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/items/get
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
start_time_unix | string | No | Query start time | Query start time (ms) |
end_time_unix | string | No | Query end time | Query end time (ms) |
page_no | int | Yes | Page | |
page_size | int | Yes | Pages |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | object | No | Return object |
data param details:
Param | Type | Name | Note |
---|---|---|---|
page_no | int | Page | |
page_size | int | Number of return on each page | |
page_count | int | Total pages | |
total_count | int | Total pieces | |
store_id | string | Third-party store ID | Third-party store ID |
item_id | string | Third-party product ID | Sobot store ID |
sobot_item_id | string | Sobot product ID | |
sku_code | string | Product SKU code | |
spu_code | string | Product SPU code | |
name | string | Product name | |
title | string | Product title | |
cost_price | string | List price | min |
retail_price | string | Retail price | min |
delete_flag | int | Whether to delete | 0-No, 1-Yes |
media_url | string | Product attachment URL | |
stock | int | Product stock | |
source | int | Store source | 1-Self-built |
status | int | 1-Open, 2-Closed | |
create_time | string | Creation time | Timestamp (s) |
creator | string | Creator | |
sales_volume | int | Product sales volume | |
status | Product status | 0-Other, 1-On sale, 2-Off shelves, 3-Sold out | |
category_id | string | Third-party product category ID |
Request example:
{
"timestamp": "1652361292000",
"nonce": "c31ef7d26f5f42aab753daff73375bbf",
"start_time_unix": "1650423556000",
"end_time_unix": "1653015558000",
"page_no": 1,
"page_size": 5
}
2
3
4
5
6
7
8
9
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded",
"data": {
"page_no": 1,
"page_size": 20,
"data": [
{
"store_id": "324",
"item_id": "32401",
"sobot_item_id": "623c1d79e145ea97bcae7898",
"sku_code": "sku324",
"spu_code": "spu324",
"name": "Test product",
"title": "Test product",
"cost_price": "300",
"retail_price": "200",
"source": 2,
"delete_flag": 0,
"media_url": "https://img-sg.sobot.io/161/20304/snscosdownload/SZ/reserved/622c063f000b234400000000bc0c950b000000a000004f50",
"stock": 10,
"sales_volume": 100,
"status": 1,
"creator": "zhangsan",
"create_time": "1648030497",
"category_id": "1"
}
],
"page_count": 1,
"total_count": 1
},
"logMessageId": null,
"success": true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Order management
# ● Add order info
API description:
Push order full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/orders/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
order_list | list | Yes | Order set | The structure of the order object is as follows |
Order object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
storeid | string | Yes | Third-party store ID | No more than 128 bytes |
orderid | string | Yes | Third-party order ID | |
order_no | string | Yes | Order no. | |
create_time | string | Yes | Order Time | Timestamp (ms) |
update_time | string | Yes | Order update time | Timestamp (ms) |
payment_time | string | No | Order delivery time | Timestamp (ms) |
status | int | Yes | Order Status | 0-Other, 1-To Be Paid, 2-Paid, 3-Shipped, 4-Signed for, 5-Dealed, 6-Deal Closed |
actual_amount | string | Yes | Actual amount | In cents |
discount_amount | string | No | Discount amount | In cents |
total_amount | string | No | Total order amount | In cents |
buyerid | string | Yes | Buyer ID | If it is WeChat, pass in unionId |
buyerid_type | int | Yes | Buyer ID type | 1-WeChat unionid, 2-Mobile no., 4-Email, 5-Sobot customer ID |
dispatch_type | int | No | Shipping method | 0-Other, 1-Shipment via EMS; 2-Pick up at the store; 3-Intra-city distribution; 4-No need to ship |
item_list | list | Yes | Product info | Ordered product info structure is as follows |
receiver | object | Yes | Receiver info | Structure is as follows |
outer_order_no | string | No | External order no. | |
payment_serial_no | string | No | Payment serial number |
Ordered product item object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
itemid | string | Yes | Third-party product ID | |
name | string | Yes | Product name | |
cost_price | string | No | List price | min |
actual_price | string | Yes | Paid-in amount | min |
quantity | long | Yes | Purchase volume | |
total_price | string | Yes | Total product price | min |
sku_id | string | No | Product sku_id |
Receiver object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
name | string | Yes | Receiver name | |
phone_number | string | Yes | Receiver mobile no. | |
country | string | Yes | Country | |
province | string | Yes | Province | |
city | string | Yes | City | |
district | string | Yes | District | |
detail_address | string | Yes | Receiver detailed address |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | list | No | Creation failed order info |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"order_list": [
{
"storeid": "42870430",
"source": 1,
"orderid": "erwefwef324tfgrtrsdrgr",
"order_no": "202103045600000323434",
"create_time": "1350000123400",
"update_time": "1350000123400",
"payment_time": "1350000123400",
"status": 3,
"actual_amount": "200",
"discount_amount": "50",
"total_amount": "200",
"buyerid": "zhenyx@163.com",
"buyerid_type": 4,
"dispatch_type": 1,
"item_list": [
{
"itemid": "1455664",
"name": "Test product",
"cost_price": "199",
"actual_price": "100",
"quantity": 2,
"total_price": "200",
"sku_id": "2000000232323232"
}
],
"receiver": {
"name": "Lee",
"phone_number": "13727372426",
"country": "China",
"province": "Beijing",
"city": "Beijing",
"district": "Beijing",
"detail_address": "No.103, Building 9, Zone 2, Hanwei International Sports Center, Beijing"
},
"outer_order_no": "O16581373580000001",
"payment_serial_no": "P16581373880000001"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded"
}
2
3
4
{
"retCode": "000000",
"retMsg": "Operation succeeded",
"data":[
{
"orderid": "erwefwef324tfgrtrsdrgr",
"retCode": 801001,
"retMsg": "Buyer information does not exist"
}
]
}
2
3
4
5
6
7
8
9
10
11
# ● Query order info
API description:
Query order full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/orders/get
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
start_time_unix | string | No | Query start time | Query start time (ms) |
end_time_unix | string | No | Query end time | Query end time (ms) |
page_no | int | Yes | Page | |
page_size | int | Yes | Pages |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | object | No | Return object |
data param details:
Param | Type | Name | Note |
---|---|---|---|
page_no | int | Page | |
page_size | int | Number of return on each page | |
page_count | int | Total pages | |
total_count | int | Total pieces | |
store_id | string | Third-party store ID | |
source | int | Source | 1-Self-built |
order_id | string | Third-party order ID | |
sobot_order_id | string | Sobot order ID | |
order_no | string | Order no. | |
create_time | string | Creation time | Timestamp (s) |
payment_time | string | Order delivery time | Timestamp (s) |
status | string | Order Status | 0-Other, 1-To Be Paid, 2-Paid, 3-Shipped, 4-Signed for, 5-Dealed, 6-Deal Closed |
actual_amount | string | Paid-in amount | min |
discount_amount | string | Discount amount | min |
total_amount | string | Total order amount | min |
buyer_id | string | Buyer ID | |
buyer_id_type | string | Buyer ID type | 1-WeChat unionid, 2-Mobile no., 4-Email, 5-Sobot customer ID |
dispatch_type | string | Shipping method | 0-Other, 1-Shipment via EMS; 2-Pick up at the store; 3-Intra-city distribution; 4-No need to ship |
order_item_list | list | Ordered product info set | Structure is as follows |
receiver | object | Receiver info | Structure is as follows |
outer_order_no | string | External order no. | |
payment_serial_no | string | Payment serial number | |
sobot_customer_id | string | Sobot customer ID |
order_item_list param details:
Param | Type | Name | Note |
---|---|---|---|
item_id | string | Ordered product ID | |
name | string | Ordered product name | |
cost_price | string | List price | min |
actual_price | string | Paid-in price | min |
quantity | int | Purchase volume | |
total_price | string | Total product price | min |
sku_id | string | Product sku_id |
Receiver param details:
Param | Type | Name | Note |
---|---|---|---|
name | string | Receiver name | |
phone_number | string | Receiver mobile no. | |
country | string | Country | China |
province | string | Province | Sichuan Province |
city | string | City | |
district | string | District | |
detail_address | string | Store detailed address |
Request example:
{
"timestamp": "1652361292",
"nonce": "c31ef7d26f5f42aab753daff73375bbf",
"start_time_unix": "1650423556000",
"end_time_unix": "1653015558000",
"page_no": 1,
"page_size": 5
}
2
3
4
5
6
7
8
Return example:
{
"retCode":"000000",
"retMsg":"Operation succeeded",
"data":{
"page_no":1,
"page_size":1,
"data":[
{
"store_id":"107185119",
"source":2,
"order_id":"E20220331160309008300061",
"sobot_order_id":"6245604360b22da3c0bc2ab8",
"order_no":"E20220331160309008300061",
"create_time":"1648742590",
"payment_time":"1648713795",
"status":1,
"actual_amount":"0",
"discount_amount":"0",
"total_amount":"1",
"buyer_id":"or-MA5_cp3-RUnPUNkAcz-DkCKwE",
"buyer_id_type":1,
"dispatch_type":1,
"order_item_list":[
{
"item_id":"1706494507",
"name":"Doraemon",
"cost_price":"1",
"actual_price":"1",
"quantity":1,
"total_price":"1",
"sku_id":"2000000232323232"
}
],
"receiver":{
"name":"Wu",
"phone_number":"15711222310",
"country":"China",
"province":"Beijing",
"city":"Beijing",
"district":"Fengtai",
"detail_address":"Hanwei International Plaza Zone 2 (No. 186 South Fourth Ring West Road)"
},
"outer_order_no": "O16581373580000001",
"payment_serial_no": "P16581373880000001",
"sobot_customer_id": "f179a28a7e9d43dbb4b2b37efb47ad11"
}
],
"page_count":6,
"total_count":6
},
"logMessageId":null,
"success":true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Logistics management
# ● Add logistics info
API description:
Push order logistics full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/logistics/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
logistics_list | list | Yes | Logistics info | Structure is as follows |
Logistics object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
order_no | string | Yes | Third-party order no. | |
refund_no | string | No | Third-party refund order no. | Required when refund order is generated and product is returned |
logisticsid | string | No | Third-party logistics ID | |
fee | string | Yes | Logistics cost | Total logistics cost, in cents |
status | int | Yes | Logistics status | 0-Other; 1-To be shipped; 2-Shipped; 3-To-be-signed for; 4-Signed for; 5-Rejected; 6-Delivering |
company_name | string | Yes | Logistics company name | |
tracking_number | string | Yes | Logistics waybill number | |
create_time | string | Yes | Creation time | Timestamp (ms) |
update_time | string | Yes | Update time | Timestamp (ms) |
delivery_time | string | No | Delivery time | Timestamp (ms) |
sign_time | string | No | Sign time | Timestamp (ms) |
signer | string | No | Signer | Signer name |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"logistics_list": [
{
"order_no": "202103045600000323434",
"logisticsid": "1232324444",
"fee": "180",
"status": 1,
"company_name": "SF",
"tracking_number": "SF2334344334334",
"source": 2,
"create_time": "1350000123400",
"update_time": "1350000123400"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded"
}
2
3
4
# After sales management
# ● Add after sales info
API description:
Push refund order full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/refunds/add
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
refund_list | list | Yes | Refund order info | The structure of the refund order info is as follows |
Refund order object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
order_no | string | Yes | Order no. | |
refund_no | string | Yes | Refund serial number | |
fee | string | Yes | Refund amount | In cents |
status | int | Yes | Refund status | 0-Other, 1-Not refunded, 2-Refund partially succeeded, 3-Refund completely succeeded |
create_time | string | Yes | Creation time | Timestamp (ms) |
update_time | string | Yes | Update time | Timestamp (ms) |
success_time | string | No | Successful refund time | Timestamp (ms) |
reason | string | No | Refund reason | |
return_goods | int | No | Is there any return | 1-Yes, 2-No |
item_list | list | No | Refund product set | The structure of refund product info is as follows |
receiver | object | No | Return receiver info | Structure is as follows |
Refund product item object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
itemid | string | Yes | Third-party product ID | |
quantity | long | Yes | Refund product quantity | |
fee | string | Yes | Refund amount | min |
Refund receiver object:
Param | Type | Required | Name | Note |
---|---|---|---|---|
phone_number | string | Yes | Receiver phone no. | |
detail_address | string | Yes | Receiver detailed address | |
name | string | Yes | Receiver name |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message |
Request example:
{
"timestamp": "1350000123400",
"nonce": "123412323",
"refund_list": [
{
"order_no": "202103045600000323434",
"refund_no": "201709282209550100010711",
"fee": "100",
"status": 1,
"create_time": "1350000123400",
"update_time": "1350000123400",
"success_time": "1350000123400",
"reason": "",
"return_goods": 1,
"source": 2,
"item_list": [
{
"itemid": "1455664",
"quantity": 1,
"fee": "50"
}
],
"item_list": {
"name": "henry",
"phone_number": "13527293423",
"detail_address": "No.103, Building 9, Zone 2, Hanwei International Sports Center, Beijing"
}
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Return example:
{
"retCode": "000000",
"retMsg": "Operation succeeded"
}
2
3
4
# ● Query after sales info
API description:
Query product after sales full info in bulk
Request method:
POST
Request URL:
https://sg.sobot.io/zk-data-adapter/api/data/v1/refunds/get
Request param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
timestamp | string | Yes | Timestamp | Timestamp at request initiation (ms) |
nonce | string | Yes | Random value | Request random value |
start_time_unix | string | No | Query start time | Query start time (ms) |
end_time_unix | string | No | Query end time | Query end time (ms) |
page_no | int | Yes | Page | |
page_size | int | Yes | Pages | |
sobot_order_id | string | No | Sobot order no. | |
sobot_refund_id | string | No | Sobot refund order no. |
Return param:
Param | Type | Required | Name | Note |
---|---|---|---|---|
retCode | string | Yes | Return code | |
retMsg | string | Yes | Return message | |
data | object | No | Return object |
data param details:
Param | Type | Name | Note |
---|---|---|---|
page_no | int | Page | |
page_size | int | Number of return on each page | |
page_count | int | Total pages | |
total_count | int | Total pieces | |
sobot_refund_id | string | Sobot refund order no. | |
sobot_order_id | string | Sobot order no. | |
order_no | string | Third-party order no. | |
refund_no | string | Third-party refund order no. | |
fee | string | Refund amount | min |
status | int | 0-Other, 1-Not refunded, 2-Refund partially succeeded, 3-Refund completely succeeded | |
success_time | string | Successful refund time | Timestamp (s) |
reason | string | Refund reason | |
return_goods | int | Is there any return | 1-No, 2-Yes |
source | int | Store source | 1-Self-built |
create_time | string | Refund order creation time | Timestamp (s) |
item_list | list | Refund product set | The structure of refund product info is as follows |
receiver | object | Return receiver info | Structure is as follows |
Refund product item object:
Param | Type | Name | Note |
---|---|---|---|
item_id | string | Third-party product ID | |
quantity | long | Refund product quantity | |
fee | string | Refund amount | min |
Refund receiver object:
Param | Type | Name | Note |
---|---|---|---|
phone_number | string | Receiver phone no. | |
detail_address | string | Receiver detailed address | |
name | string | Receiver name |
Request example:
{
"timestamp": "1652361292000",
"nonce": "c31ef7d26f5f42aab753daff73375bbf",
"start_time_unix": "1650423556000",
"end_time_unix": "1653015558000",
"page_no": 1,
"page_size": 5,
"sobot_order_id": "62441b3460b23dd86fa0fd87",
"sobot_refund_id": "624151e860b2616881269844"
}
2
3
4
5
6
7
8
9
10
Return example:
{
"retCode":"000000",
"retMsg":"Operation succeeded",
"data":{
"page_no":1,
"page_size":20,
"data":[
{
"sobot_order_id":"62441b3460b23dd86fa0fd87",
"sobot_refund_id":"624151e860b2616881269844",
"order_no":"202103045600000323434",
"refund_no":"201709282209550100010711",
"fee":"100",
"status":1,
"create_time":"1350000123",
"success_time":"",
"reason":"",
"return_goods":1,
"source":2,
"item_list":{
"name":"henry",
"phone_number":"13527293423",
"detail_address":"No.103, Building 9, Zone 2, Hanwei International Sports Center, Beijing"
}
}
],
"page_count":1,
"total_count":1
},
"logMessageId":null,
"success":true
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Sobot store/product/order related status description
# ● Third-party source code
Source | Source code |
---|---|
Self-built | 1 |
# ● Store status corresponding relationship
Open | Closed | |
---|---|---|
Sobot | 1 | 2 |
# ● Store type corresponding relationship
Open | Closed | Others | |
---|---|---|---|
Sobot | 1 | 2 | 0 |
# ● Product status corresponding relationship
On shelves | Off shelves | Sold out | Others | |
---|---|---|---|---|
Sobot | 1 | 2 | 3 | 0 |
# ● Order status corresponding relationship (excl. refund)
Pending Payment | Paid | Been Shipped | Signed for | |
---|---|---|---|---|
Sobot | 1 | 2 | 3 | 4 |
Dealed | Deal Closed | Others | |
---|---|---|---|
Sobot | 5 | 6 | 0 |
# ● Order refund status corresponding relationship
Not refunded | Refund partially succeeded | Refund completely succeeded | Others | |
---|---|---|---|---|
Sobot | 1 | 2 | 3 | 0 |
# ● Delivery method corresponding relationship
Shipment via EMS | Pick up at the store | Intra-city distribution | |
---|---|---|---|
Sobot | 1 | 2 | 3 |
No need to ship | Others | |
---|---|---|
Sobot | 4 | 0 |
# ● Logistics status corresponding relationship
To Be Shipped | Been Shipped | To-be-signed for | Signed for | |
---|---|---|---|---|
Sobot | 1 | 2 | 3 | 4 |
Refuse to-be-signed for | Delivering | Others | |
---|---|---|---|
Sobot | 5 | 6 | 0 |