蝦皮API串接 取得蝦皮訂單 income 買家退款金額

「買家退款金額」refund_amount

v2.returns.get_return_detail

GET

/api/v2/returns/get_return_detail

Use this api to get detail information of a return by return id.

Common Parameters

SurroundingsHTTP Address
URLhttps://partner.shopeemobile.com/api/v2/returns/get_return_detail
URL(Chinese Mainland)https://openplatform.shopee.cn/api/v2/returns/get_return_detail
Test URLhttps://partner.test-stable.shopeemobile.com/api/v2/returns/get_return_detail
Test URL(Chinese Mainland)https://openplatform.test-stable.shopee.cn/api/v2/returns/get_return_detail
NameTypeSampleDescription
partner_idint1Partner ID is assigned upon registration is successful. Required for all requests.
timestamptimestamp1610000000This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours.
shop_idint600000Shopee’s unique identifier for a shop. Required param for most APIs.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by partner_id, api path, timestamp, access_token, shop_id and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2

Request Parameters

NameTypeRequiredSampleDescription
return_snstringTrue2206150VT13E3MQThe serial number of return.

Response Parameters

NameTypeSampleDescription
request_idstringd52ca43b277a4f9292fb8be658bfd33dThe identifier for an API request for error tracking
errorstringerror code
messagestringerror description
responseobjectAmount of the refund.
imagestring[][“https://cf.shopee.sg/file/166f23cbfb31bd882f51cfe7f90d3826”]Image URLs of return.
reasonstringNOT_RECEIPTReason for return product. Applicable values: See Data Definition- ReturnReason.
text_reasonstringnot receivedReason that buyer provide.
return_snstring2206140TA5PM808The serial number of return.
refund_amount買家退款金額float13.97Amount of the refund.
currencystringSGDCurrency of the return.
create_timeint1655205084The time of return create.
update_timeint1655219544The time of modify return.
statusstringACCEPTEDEnumerated type that defines the current status of the return. Applicable values: See Data Definition- ReturnStatus.
due_dateint1655377883The last time seller deal with this return.
tracking_numberstringRNSHS00177569The tracking number assigned by the shipping carrier for item shipment.
dispute_reasonstring[][“UNKNOWN”]The reason of seller dispute return. While the return has been disputed, this field is useful. Applicable values: See Data Definition- ReturnDisputeReason.
dispute_text_reasonstring[][“The goods I sent are correct and there is no difference.”]The reason that seller provide. While the return has been disputed, this field is useful.
needs_logisticsbooleanfalseItems to be sent back to seller. Can be either integrated/non-integrated.
amount_before_discountfloat13.99Order price before discount.
userobject
usernamestringgwlsg01Buyer’s nickname.
emailstring********oo@shopee.comBuyer’s email.
portraitstringhttps://cf.shopee.sg/file/166f23cbfb31bd882f51cfe7f90d3826Buyer’s portrait.
itemobject[]
model_idint2001586745Shopee’s unique identifier for a variation of an item.
namestring[Self collection point] Orange macaronName of item in local language.
imagesstring[][“https://cf.shopee.sg/file/4ecbb6fa567e42c1b1e02993ad53df12”]Image URLs of item.
amountint1Amount of this item.
item_pricefloat10.0The price of item.
is_add_on_dealbooleanfalseTo indicate if this item belongs to an addon deal.
is_main_itembooleanfalseTo indicate if this item is main item or sub item. True means main item, false means sub item.
add_on_deal_idint0The unique identity of an addon deal.
item_idint2700126223The id of item.
item_skustringUSBThe sku of item.
variation_skustringREDthe variation sku of item
order_snstring220614T9XV8JTNShopee’s unique identifier for an order.
return_ship_due_dateint1655438205The due date for buyer to ship order.
return_seller_due_dateint1655438205The due date for seller to deal with this return when buyer have shipped order.
activityobject[]
activity_idint123456789The id of activity.
activity_typestringBUNDLEThe type of activity.
original_pricestring12.34activity’s origin price
discounted_pricestring12.34activity’s discount price
itemsobject[]
item_idint12345678The id of item.
variation_idint12345678Shopee’s unique identifier for a variation of an item.
quantity_purchasedint2item’s quantity purchase
original_pricestring12.34item’s origin price
seller_proofobject
seller_proof_statusstringPENDINGTo indicate whether the seller needs to provide evidence when the return status is JUDGING and SELLER_DISPUTE. See “Data Definition – SellerProofStatus”
seller_evidence_deadlineint1655438336To indicate the deadline for submitting the evidence
seller_compensationobject
seller_compensation_statusstringPENDING_REQUESTTo indicate whether the seller is eligible for raising a compensation request. See “Data Definition – SellerCompensationStatus”
seller_compensation_due_dateint1655438336To indicate the deadline for requesting the compensation
compensation_amountfloat100.0To indicate the compensation amount that the agent decided
negotiationobject
negotiation_statusstringPENDING_RESPONDTo indicate whether the seller can negotiate with the buyer. See “Data Definition – NegotiationStatus”
latest_solutionstringRETURN_REFUNDTo indicate what is the offer solution. See “Data Definition – ReturnSolution”
latest_offer_amountfloat12.34To indicate the refund amount in the latest offer solution
latest_offer_creatorstringusernameTo indicate which party made the latest offer
counter_limitint0To indicate the remaining counter limit
offer_due_dateint1655438336To indicate offer_due_date
logistics_statusstringLOGISTICS_REQUEST_CREATEDTo indicate the reverse logistic status. See “Data Definition – LogisticsStatus”
return_pickup_addressobjectTo indicate the buyer’s pickup address
addressstringBLOCK 106, HENDERSON CRESCENTTo indicate receiver’s address
namestringnameTo indicate receiver’s name
phonestring6512345678To indicate receiver’s phone
townstringBatinoTo indicate receiver’s town
districtstringCalamba CityTo indicate receiver’s district
citystringLagunaTo indicate receiver’s city
statestringSouth LuzonTo indicate receiver’s state
regionstringSGTo indicate receiver’s region
zipcodestring150106To indicate receiver’s zip code

Request Example-Java

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://partner.shopeemobile.com/api/v2/returns/get_return_detail?access_token=access_token&partner_id=partner_id&return_sn=2206150VT13E3MQ&shop_id=shop_id&sign=sign&timestamp=timestamp")
.asString();

Request Example-PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/returns/get_return_detail?access_token=access_token&partner_id=partner_id&return_sn=2206150VT13E3MQ&shop_id=shop_id&sign=sign&timestamp=timestamp',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Request Example-cURL

curl --location --request GET 'https://partner.shopeemobile.com/api/v2/returns/get_return_detail?access_token=access_token&partner_id=partner_id&return_sn=2206150VT13E3MQ&shop_id=shop_id&sign=sign&timestamp=timestamp' 

Request Example-Python

import requests

url = "https://partner.shopeemobile.com/api/v2/returns/get_return_detail?access_token=access_token&partner_id=partner_id&return_sn=2206150VT13E3MQ&shop_id=shop_id&sign=sign&timestamp=timestamp"

payload={}
headers = {

}
response = requests.request("GET",url,headers=headers, data=payload, allow_redirects=False)

print(response.text)

Response Example-JSON

{
    "error": "",
    "message": "",
    "request_id": "b803fce6b8676ea93b3798c3a831d820",
    "response": {
        "activity": [],
        "amount_before_discount": 43.99,
        "create_time": 1680870259,
        "currency": "BRL",
        "dispute_reason": [
            "OTHER"
        ],
        "dispute_text_reason": [
            "this is  a pant when buyer choose picture and choose name all will appear ,so we send right "
        ],
        "due_date": 1681043059,
        "image": [
            "http://img.ws.mms.shopee.sg/sg-11134004-7qvdr-lfb60rg990apaa"
        ],
        "item": [
            {
                "add_on_deal_id": 0,
                "amount": 1,
                "images": [
                    "http://img.ws.mms.shopee.sg/sg-11134201-23020-cc4ug3a519mv00",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-w4pejbb5fdmv8b",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-t7pejbb5fdmv95",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-0hkhl0a5fdmv21",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-u4xfpab5fdmv3b",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-6v6gv0a5fdmv2e",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-wgcoanpxgdmv6e",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-3ixilfqxgdmv02",
                    "http://img.ws.mms.shopee.sg/sg-11134201-23010-5ncgfab5fdmv71"
                ],
                "is_add_on_deal": false,
                "is_main_item": false,
                "item_id": 19271370531,
                "item_price": 43.99,
                "item_sku": "A5098-M254537-6",
                "model_id": 230772663359,
                "name": "2 Peças Conjunto Top Sutiã Legging Levanta Bumbum Sem Costura Cintura Alta Feminino Academia",
                "variation_sku": "A5098-E987644-6"
            }
        ],
        "logistics_status": "",
        "needs_logistics": false,
        "negotiation": {
            "counter_limit": null,
            "latest_offer_amount": null,
            "latest_offer_creator": "",
            "latest_solution": "",
            "negotiation_status": "",
            "offer_due_date": null
        },
        "order_sn": "230320UFURXE7A",
        "reason": "ITEM_MISSING",
        "refund_amount": 43.99,
        "return_pickup_address": {
            "address": "",
            "city": "",
            "district": "",
            "name": "",
            "phone": "",
            "region": "",
            "state": "",
            "town": "",
            "zipcode": ""
        },
        "return_seller_due_date": 0,
        "return_ship_due_date": 0,
        "return_sn": "2304070GJB5JCVU",
        "seller_compensation": {
            "compensation_amount": null,
            "seller_compensation_due_date": null,
            "seller_compensation_status": ""
        },
        "seller_proof": {
            "seller_evidence_deadline": null,
            "seller_proof_status": ""
        },
        "status": "CANCELLED",
        "text_reason": "",
        "tracking_number": "",
        "update_time": 1681123982,
        "user": {
            "email": "******81@gmail.com",
            "portrait": "",
            "username": "carlaalvesoliveira664"
        }
    }
}

Error Example-JSON

{
    "error": "error_data",
    "message": "The return you queried doesn't exist",
    "request_id": "149f4d211a8c078f6ed4b5e3fa8f87da"
}

Error Codes

ErrorError Description
error_bannedCore server error.
error_permCore server error.
error_paramCore server error.
error_paramCore server error.
error_paramCore server error.
error_limitCore server error.
error_deletedCore server error.
error_disabledCore server error.
error_paramCore server error.
error_exceptionCore server error.
error_existCore server error.
error_expireCore server error.
error_fraudCore server error.
error_limitCore server error.
error_permCore server error.
error_invitationCore server error.
error_paramCore server error.
error_paramCore server error.
error_lockedCore server error.
error_permCore server error.
error_need_voice_otpCore server error.
error_paramCore server error.
error_need_otpCore server error.
error_message_censoredCore server error.
error_networkCore server error.
error_not_existsCore server error.
error_not_loginCore server error.
error_out_stockmCore server error.
error_param_formatCore server error.
error_password_changeCore server error.
error_permCore server error.
error_paramCore server error.
error_paramCore server error.
error_paramCore server error.
error_paramCore server error.
error_limitCore server error.
error_unknownCore server error.
error_accountCore server error.
error_versionCore server error.
error_paramThe period between create_time_from and created_time_of must not more than 15 days.
error_perminvalid dispute_reason.
error_paramno partner_id
error_datalack of param
error_permthere is invalid params.
error_paramThere is no access_token in query.
error_authInvalid access_token.
error_paramInvalid partner_id.
error_paramThere is no partner_id in query.
error_authNo permission to current api.
error_paramThere is no sign in query.
error_signWrong sign.
error_paramno timestamp
error_paramInvalid timestamp
error_networkInner http call failed
error_networkInner error, please try later. [4].
error_innerInner error, please try later. [0].
error_dataInner error, please try later. [5].
error_paramInner error, please try later. [1].
error_dataQuery order info failed. Please try later.
error_dataGet user info failed. Please try later.
error_perminvalid email : {email}.
error_paramReturn SN or ID is invalid.
error_dataThe return you queried doesn’t exist.
error_permissionPlease link shop and partner on seller center.

如果有什麼問題,也可以在下方留言處與我們分享,感謝您!!

手刀試用=>蝦皮對帳王

手刀試用=>康捷雲端ERP

相關文章

👉 進出貨一覽表 簡單王 操作步驟詳解

👉 簡單王-進出貨匯入上傳工具 操作步驟詳解

👉 蝦皮對帳王-蝦皮對帳結果一覽表-為什麼要對帳?無對應???

👉 蝦皮對帳王-對帳原理分析-有訂單,有撥款だいじょうぶ(大丈夫);有訂單,沒撥款 歐NO~~~~~!!!

[蝦皮服務] 訂單完成後什麼時候能夠收到款項呢?

期待您的留言

Comments

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *