创建退货单
POST https://{handle}.myshopline.com/admin/openapi/v20260301/return/create.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。创建退货单开放接口
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
- processed_at string退货实际发生时间,,格式:2023-04-12T22:59:52+08:00Example:
2023-04-12T22:59:52+08:00 return_line_itemsobject[] required
退货商品行信息line_item_id string required商品行IDExample:12321quantity integer required退货商品数量Example:2return_reason string商品行的退货原因: COLOR 颜色问题 DEFECTIVE 商品损坏或有缺陷 NOT_AS_DESCRIBED 商品与描述不符 OTHER 其他原因 SIZE_TOO_LARGE 尺寸太大 SIZE_TOO_SMALL 尺寸太小 STYLE 款式问题 UNWANTED 客户改变了主意 WRONG_ITEM 收到了错误的商品Example:NOT_AS_DESCRIBEDreturn_reason_note string商品行退货原因详细信息备注,最大支持128字符Example:Product does not match the descriptionfulfillment_id string required发货单号Example:23131- return_reason string退货原因Example:
7天无理由 - notify_customer boolean required是否将退货消息通知消费者 true(通知)\false(不通知)Example:
true - order_seq string required订单号Example:
2132131231232
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
returnobject
退货单信息return_reason string退货原因Example:no reasonstatus string退货单状态;OPEN(退货中),CLOSED(退货完成且已退款完成)Example:OPENcreated_at string退货单创建时间Example:2022-11-04T10:18:46+00:00id string退货单IDExample:2605860580357012238342order_id string订单IDExample:21058605762597644309430942return_line_itemsobject[]
退货商品信息fulfillment_id string退货单关联的发货单号Example:22058605790725653626950942fulfillment_line_itemobject
退货单关联的发货单信息quantity integer发货单发货数量Example:2line_itemobject
发货单商品行信息id string商品行idExample:405variant_id string商品sku序列号Example:18056898121355865678441487price string商品售价,商品详情页销售价格Example:100.0product_id stringspu序列号,商品唯一识别号Example:16056898121352174690861487variant_title string商品属性值, 多个以" / "分割Example:L/Redvendor string商品供应商Example:商品供应商location_id string1)本地配送场景下取货地点唯一编号 2)非本地场景下商品地点信息Example:5327026538935748524name stringsku标题,同titleExample:这是个好商品tax_linesobject[]
商品税费详细信息price string税费金额Example:18.00price_setobject
按照店铺币种和交易币种计价的税费金额presentment_moneyobject
交易币种amount string税费金额Example:18.00currency_code string币种Example:USDshop_moneyobject
店铺币种amount string税费金额Example:18.00currency_code string币种Example:USDrate double税率Example:10title string税费名称Example:CNMPtaxable boolean商品是否含税:false、trueExample:truefulfillable_quantity integer剩余需要履约的商品数量Example:1sku string商户自定义编号Example:SKU1234fulfillment_service string物流商名称Example:顺丰国际image_url string商品图片链接urlExample:https://image.shopline.com/abc.jpggift_card boolean是否为礼品卡商品:false、trueExample:truerequires_shipping string商品是否需要发货:false、trueExample:truefulfillment_status string商品行发货状态: fulfilled-已发货; partial-部分发货; null-未发货Example:fulfilledgrams double商品重量(克)Example:1quantity string商品数量Example:1title stringspu商品标题Example:这是个好商品propertiesobject[]
商品定制信息name string定制信息对象Example:文字type string定制信息类型:text、picture、link 1)当type为text时,取name和value; 2)当type为picture时,展示类型取name,同时取urls获取商品的详情缩略图 3)当type为link时,支持点击urls获取详情Example:texturls array地址链接信息Example:["https://image.shopline.com"]value string定制信息内容Example:自由tags string商品标签,当存在多个时用逗号分隔Example:salesattribute string商品属性信息:名称 - 属性值, 多个属性值时以逗号Example:颜色 - 红色, 尺寸 - Xid string退货商品行号Example:RDP5860580372212396041quantity integer退货单商品退货数量Example:1
API Explorer
调试台
这篇文章对你有帮助吗?