HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Create Return Order

Create Return Order

(支援部分退貨 Support partial refund)

Request Params

FieldTypeDescriptionExample
order_idString退貨訂單號碼6049dff0647ad00045eed112
recipient_nameStringRecipient NameName
recipient_phoneStringRecipient Phone Number0912345678
recipient_phone_country_codeStringRecipient Phone Country Code886
delivery_optionHashDelivery Option
物流方式
countryStringCountry Code
代碼
TW
cityStringCity
城市
台北市
districtStringDistrict
地區
District
address_1StringAddress1
地址1
Address1
address_2StringAddress2
地址2
Address2
postcodeStringPostcode
郵遞區號
Postcode
stateStringStateState
payment_optionHashPayment Option
付款方式
{"id": "647f4351692ce94291740fff","key": "tw_711_c2b_nopay"}
subtotal_items.id
*Required
StringSubtotal Item ID
訂單物品ID
6049dff0647ad00045eed112
subtotal_items.return_reason_keyStringSubtotal Item Return Reason Key
訂單物品退貨選項 key

Available Values:
- not_expected
- broke_during_delivery
- wrong_variation
- wrong_item
- other
not_expected
subtotal_items.return_remarkStringSubtotal Item Return Remark
訂單物品退貨原因

This field is only allowed to be filled in when the value of return_reason_key is "other".
此欄位僅 return_reason_key 是 "other" 時才允許設定
subtotal_items.quantity
*Required
IntegerSubtotal Item Quantity
訂單物品數量
1
bank_accountStringBank Account
銀行帳戶
Account
returned_byStringReturn By
退回方
admin

Response Body

{
   "created_at" : "2021-06-02T12:18:29.606+00:00",
   "customer_email" : "[email protected]",
   "customer_id" : "5f86b66201afcd0c83557f18",
   "customer_name" : "asd",
   "delivery_address" : {
      "address_1" : "",
      "address_2" : "",
      "city" : "",
      "country" : "",
      "country_code" : "",
      "district" : null,
      "key" : null,
      "layer1" : null,
      "layer2" : null,
      "layer3" : null,
      "logistic_codes" : null,
      "postcode" : "",
      "recipient_name" : "asd",
      "recipient_phone" : "+12345677",
      "remarks" : null,
      "state" : null
   },
   "delivery_data" : {
      "hk_sfplus_home_region" : null,
      "location_code" : null,
      "location_name" : null,
      "name_translations" : {},
      "scheduled_delivery_date" : null,
      "store_address" : null,
      "time_slot_key" : null,
      "tracking_number" : null,
      "url" : null
   },
   "id" : "60b77715808cd8004387c6ed",
   "inspect_status" : null,
   "items" : [],
   "max_return_total" : {
      "cents" : 0,
      "currency_iso" : "HKD",
      "currency_symbol" : "HK$",
      "dollars" : 0,
      "label" : "HK$0.00"
   },
   "order" : null,
   "order_delivery" : null,
   "order_delivery_status" : null,
   "order_id" : "6049dff0647ad00045eed112",
   "order_payment" : null,
   "order_payment_status" : null,
   "promotion_items" : [],
   "return_order_number" : "2021060212182917",
   "returned_by" : "admin",
   "status" : "confirmed",
   "total" : {
      "cents" : 120502,
      "currency_iso" : "HKD",
      "currency_symbol" : "HK$",
      "dollars" : 1205.02,
      "label" : "HK$1,205.02"
   },
   "updated_at" : "2021-06-02T12:18:29.813+00:00"
}

Request Sample

curl --location --request POST '<<api_domain>>/v1/return_orders/' \
--header 'Authorization: Bearer ${token}' \
--header 'Content-Type: application/json' \
--data-raw '{
 "order_id":"6049dff0647ad00045eed112",
 "recipient_name":"asd",
 "recipient_phone":"+12345677",
 "delivery_option":{"id":"60a2189b8b89ac0045c15551"},
 "country":"TW",
 "address_1":"address1",
 "payment_option":{"id":"60a22b55e03fec0042c3a4d7", "key": "tw_711_c2b_nopay"},
 "subtotal_items":[{"id":"6049dff0647ad00045eed114",
 "quantity":1}],
 "returned_by":"admin"}'