Skip to content

关于 退货

访问范围

需要多个访问范围—请参阅每个端点以了解访问范围要求。

需要访问受保护的客户数据。

退款管理是 Genstore 交易系统的重要组成部分,它提供了规范化的退款处理流程和管理能力。通过标准化的退款处理机制,帮助商户高效处理各类退款场景,提升售后服务质量。

核心功能

  • 创建退款:创建退款申请、指定退款金额、设置退款原因和方式
  • 管理退款状态:更新退款状态、跟踪退款进度
  • 查询退款信息:查询退款单详情、查询退款列表、查询订单关联退款

使用场景

  • 售后退款处理:客服团队可快速响应退款申请、跟进退款进度、维护退款记录,确保高效的售后服务体验。
  • 退款风控管理:风控团队可审核异常退款、监控退款趋势、识别欺诈风险,保障交易安全。
  • 财务对账核算:财务团队可统计退款数据、核对退款明细、生成对账报表,实现准确的财务管理。
  • 经营分析决策:运营团队可分析退款原因、评估服务质量、优化商品策略,提升经营效率。

退货业务对象 对象

退货退款业务对象

属性

refundobject
退货信息。
- 收起属性
idnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。
refundPricenumber
这是退款的申请金额。
bash
{
  "refund": {
    "lineItems": [
      {
        "line_item": "",
        "line_item_id": "",
        "quantity": "",
        "subtotal": "10.00",
        "id": "",
        "total_tax": "0.00",
        "location_id": ""
      }
    ],
    "note": "Note",
    "createTime": "2013-06-27T08:48:27-04:00",
    "customerId": "1020000013594",
    "updateTime": "2012-08-24T14:01:46-04:00",
    "id": "1000069823694",
    "refundPrice": "10.00",
    "customer": {
      "lastName": "Terry",
      "note": "This is Note.",
      "updatedTime": "2012-08-24T14:01:46-04:00",
      "addresses": "",
      "taxExempt": "",
      "taxExemptions": "",
      "tags": "",
      "firstName": "",
      "phone": "",
      "createdTime": "2013-06-27T08:48:27-04:00",
      "currency": "",
      "id": "",
      "state": "",
      "email": "",
      "verifiedEmail": "",
      "defaultAddress": ""
    }
  }
}

POST 创建退款

创建退款。

访问范围

需要以下任意访问权限: write_refunds

接口

POST /api/202412/refunds 

请求参数

refundobject
退货信息。
- 收起属性
refundIdnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。

响应数据

refundobject
退货信息。
- 收起属性
refundIdnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/refunds" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"refund":{
		"lineItems":[
			{
				"line_item":"{}",
				"line_item_id":"128323456",
				"quantity":"12",
				"subtotal":"1",
				"id":"209341123",
				"total_tax":"0.00",
				"location_id":"40642626"
			}
		],
		"note":"Item was damaged during shipping",
		"createTime":"2008-01-10T11:00:00-05:00",
		"customerId":"238478920",
		"updateTime":"2008-01-10T11:00:00-05:00",
		"refundId":"255858046",
		"customer":{
			"lastName":"John",
			"note":"A note about the customer.",
			"addresses":"address",
			"taxExempt":"true",
			"taxExemptions":"[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
			"tags":"black",
			"createdAt":"2013-06-27T08:48:27-04:00",
			"firstName":"Norman",
			"phone":"16135551111",
			"currency":"JPY",
			"id":"207119551",
			"state":"disabled",
			"email":"[email protected]",
			"updatedAt":"2012-08-24T14:01:46-04:00",
			"verifiedEmail":"true",
			"defaultAddress":"11"
		}
	}
}'
json
HTTP/1.1 200 OK
{
  "refund": {
    "lineItems": [
      {
        "line_item": "{}",
        "line_item_id": "128323456",
        "quantity": "12",
        "subtotal": "1",
        "id": "209341123",
        "total_tax": "0.00",
        "location_id": "40642626"
      }
    ],
    "note": "Item was damaged during shipping",
    "createTime": "2008-01-10T11:00:00-05:00",
    "customerId": "238478920",
    "updateTime": "2008-01-10T11:00:00-05:00",
    "refundId": "255858046",
    "customer": {
      "lastName": "John",
      "note": "A note about the customer.",
      "addresses": "address",
      "taxExempt": "true",
      "taxExemptions": "[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
      "tags": "black",
      "createdAt": "2013-06-27T08:48:27-04:00",
      "firstName": "Norman",
      "phone": "16135551111",
      "currency": "JPY",
      "id": "207119551",
      "state": "disabled",
      "email": "[email protected]",
      "updatedAt": "2012-08-24T14:01:46-04:00",
      "verifiedEmail": "true",
      "defaultAddress": "111"
    }
  }
}

PUT 更新退款状态

更新退款状态。

访问范围

需要以下任意访问权限: write_refunds

接口

PUT /api/202412/refunds/{refundId} 

请求参数

orderIdstring
订单号。
refundIdstring
退款单号。
statusnumber
退款状态

响应数据

refundobject
退货信息。
- 收起属性
refundIdnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/refunds/{refundId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"orderId":"39072856",
	"refundId":"255858046",
	"status":"1"
}'
json
HTTP/1.1 200 OK
{
  "refund": {
    "lineItems": [
      {
        "line_item": "{}",
        "line_item_id": "128323456",
        "quantity": "12",
        "subtotal": "1",
        "id": "209341123",
        "total_tax": "0.00",
        "location_id": "40642626"
      }
    ],
    "note": "Item was damaged during shipping",
    "createTime": "2008-01-10T11:00:00-05:00",
    "customerId": "238478920",
    "updateTime": "2008-01-10T11:00:00-05:00",
    "refundId": "255858046",
    "customer": {
      "lastName": "John",
      "note": "A note about the customer.",
      "addresses": "address",
      "taxExempt": "true",
      "taxExemptions": "[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
      "tags": "black",
      "createdAt": "2013-06-27T08:48:27-04:00",
      "firstName": "Norman",
      "phone": "16135551111",
      "currency": "JPY",
      "id": "207119551",
      "state": "disabled",
      "email": "[email protected]",
      "updatedAt": "2012-08-24T14:01:46-04:00",
      "verifiedEmail": "true",
      "defaultAddress": "111"
    }
  }
}

GET 获取退款信息

获取指定退款信息。

访问范围

需要以下任意访问权限: write_refunds read_refunds

接口

GET /api/202412/refunds?ids={refundIds} 

请求参数

orderIdnumber
订单号。
fieldsobject
检索字段
refundIdsarray
退款单号集合

响应数据

refundobject
退货信息。
- 收起属性
refundIdnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/refunds?ids={refundIds}" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "refund": {
    "lineItems": [
      {
        "line_item": "{}",
        "line_item_id": "128323456",
        "quantity": "12",
        "subtotal": "1",
        "id": "209341123",
        "total_tax": "0.00",
        "location_id": "40642626"
      }
    ],
    "note": "Item was damaged during shipping",
    "createTime": "2008-01-10T11:00:00-05:00",
    "customerId": "238478920",
    "updateTime": "2008-01-10T11:00:00-05:00",
    "refundId": "255858046",
    "customer": {
      "lastName": "John",
      "note": "A note about the customer.",
      "addresses": "address",
      "taxExempt": "true",
      "taxExemptions": "[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
      "tags": "black",
      "createdAt": "2013-06-27T08:48:27-04:00",
      "firstName": "Norman",
      "phone": "16135551111",
      "currency": "JPY",
      "id": "207119551",
      "state": "disabled",
      "email": "[email protected]",
      "updatedAt": "2012-08-24T14:01:46-04:00",
      "verifiedEmail": "true",
      "defaultAddress": "111"
    }
  }
}

GET 获取订单退款列表

根据订单查询退款信息。

访问范围

需要以下任意访问权限: write_refunds read_refunds

接口

GET /api/202412/orders/{orderId}/refunds 

请求参数

orderIdnumber
订单号。
limitnumber
每页显示的数据条数,默认为 50,最多可设为 250
fieldsobject
检索字段

响应数据

refundsarray
退款信息。
- 收起属性
refundIdnumber
退款单号。
customerIdnumber
客户唯一标识。
customerobject
客户信息。
+ 展开属性
lineItemsarray
退款行。
+ 展开属性
notestring
退款备注。
createTimestring
创建时间。
updateTimestring
更新时间。
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/orders/{orderId}/refunds" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "refunds": [
    {
      "lineItems": [
        {
          "line_item": "{}",
          "line_item_id": "128323456",
          "quantity": "12",
          "subtotal": "1",
          "id": "209341123",
          "total_tax": "0.00",
          "location_id": "40642626"
        }
      ],
      "note": "Item was damaged during shipping",
      "createTime": "2008-01-10T11:00:00-05:00",
      "customerId": "238478920",
      "updateTime": "2008-01-10T11:00:00-05:00",
      "refundId": "255858046",
      "customer": {
        "lastName": "John",
        "note": "A note about the customer.",
        "addresses": "address",
        "taxExempt": "true",
        "taxExemptions": "[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
        "tags": "Norman",
        "createdAt": "2013-06-27T08:48:27-04:00",
        "firstName": "Norman",
        "phone": "16135551111",
        "currency": "JPY",
        "id": "207119551",
        "state": "disabled",
        "email": "[email protected]",
        "updatedAt": "2012-08-24T14:01:46-04:00",
        "verifiedEmail": "true",
        "defaultAddress": "defaultAddress"
      }
    }
  ]
}