82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
|
|
===== Step 1: Get Token =====
|
||
|
|
access_token: b15de01b66759b91e045deb169c0b69
|
||
|
|
|
||
|
|
===== Step 2: Get a yz_open_id from trade API =====
|
||
|
|
Found yz_open_id from order: anyuO2rv621793313242066944
|
||
|
|
buyer_info: {"outer_user_id":"","buyer_phone":"$LBOS9XKFoggqVOFvWABBEw==$1$","yz_open_id":"anyuO2rv621793313242066944","fans_type":0,"fans_id":0,"fans_nickname":""}
|
||
|
|
yz_open_id from order: anyuO2rv621793313242066944
|
||
|
|
|
||
|
|
===== Step 3A: POST youzan.scrm.customer.detail.get/1.0.1 =====
|
||
|
|
URL: https://open.youzanyun.com/api/youzan.scrm.customer.detail.get/1.0.1?access_token=b15de01b66759b91e045deb169c0b69
|
||
|
|
Request Body: {"yz_open_id":"anyuO2rv621793313242066944","fields":"user_base,tags,benefit_level,behavior,credit"}
|
||
|
|
Status: 200 OK
|
||
|
|
Response:
|
||
|
|
{
|
||
|
|
"trace_id" : "yz7-0a34f87c-1773885978273-913273",
|
||
|
|
"code" : 141001107,
|
||
|
|
"data" : {
|
||
|
|
"cards" : [ ],
|
||
|
|
"level_infos" : [ ],
|
||
|
|
"rights" : [ ],
|
||
|
|
"customer_attrInfos" : [ ],
|
||
|
|
"tags" : [ ]
|
||
|
|
},
|
||
|
|
"success" : false,
|
||
|
|
"message" : "客户不存在"
|
||
|
|
}
|
||
|
|
|
||
|
|
--- data 内包含的 key: cards, level_infos, rights, customer_attrInfos, tags
|
||
|
|
--- user_base: NOT FOUND
|
||
|
|
--- behavior: NOT FOUND
|
||
|
|
--- tags: []
|
||
|
|
|
||
|
|
===== Step 3B: POST youzan.scrm.customer.get/3.0.0 (old API) =====
|
||
|
|
URL: https://open.youzanyun.com/api/youzan.scrm.customer.get/3.0.0?access_token=b15de01b66759b91e045deb169c0b69
|
||
|
|
Request Body: {"yz_open_id":"anyuO2rv621793313242066944"}
|
||
|
|
Status: 200 OK
|
||
|
|
Response:
|
||
|
|
{
|
||
|
|
"trace_id" : "yz7-0a34f87c-1773885978362-696693",
|
||
|
|
"code" : 141500101,
|
||
|
|
"success" : false,
|
||
|
|
"message" : "缺少必要参数, mobile/fans_id/open_user_id 三选一传入"
|
||
|
|
}
|
||
|
|
|
||
|
|
===== Step 3C: GET youzan.scrm.customer.detail.get/1.0.1 (should fail per doc) =====
|
||
|
|
URL: https://open.youzanyun.com/api/youzan.scrm.customer.detail.get/1.0.1?access_token=b15de01b66759b91e045deb169c0b69&yz_open_id=anyuO2rv621793313242066944&fields=user_base,tags,behavior
|
||
|
|
Status: 200 OK
|
||
|
|
Response:
|
||
|
|
{
|
||
|
|
"trace_id" : "yz7-0a34f87c-1773885978420-231815",
|
||
|
|
"code" : 141001107,
|
||
|
|
"data" : {
|
||
|
|
"cards" : [ ],
|
||
|
|
"level_infos" : [ ],
|
||
|
|
"rights" : [ ],
|
||
|
|
"customer_attrInfos" : [ ],
|
||
|
|
"tags" : [ ]
|
||
|
|
},
|
||
|
|
"success" : false,
|
||
|
|
"message" : "客户不存在"
|
||
|
|
}
|
||
|
|
|
||
|
|
===== Step 4: POST scrm.customer.detail.get with account_info =====
|
||
|
|
URL: https://open.youzanyun.com/api/youzan.scrm.customer.detail.get/1.0.1?access_token=b15de01b66759b91e045deb169c0b69
|
||
|
|
Request Body: {"account_info":{"account_id":"13800138000","account_type":2},"fields":"user_base,tags,behavior"}
|
||
|
|
Status: 200 OK
|
||
|
|
Response:
|
||
|
|
{
|
||
|
|
"trace_id" : "yz7-0a34f87c-1773885978484-47619",
|
||
|
|
"code" : 141001107,
|
||
|
|
"data" : {
|
||
|
|
"cards" : [ ],
|
||
|
|
"level_infos" : [ ],
|
||
|
|
"rights" : [ ],
|
||
|
|
"customer_attrInfos" : [ ],
|
||
|
|
"tags" : [ ]
|
||
|
|
},
|
||
|
|
"success" : false,
|
||
|
|
"message" : "客户不存在"
|
||
|
|
}
|
||
|
|
|