更新时间:2024-01-02 GMT+08:00
查询退款订单的金额详情

查询退款订单的金额详情

功能介绍

客户在伙伴销售平台查询某次退订订单或者降配订单的退款金额来自哪些资源和对应订单。

注意事项:

  • 该接口可以使用客户AK/SK或者Token调用。
  • 可以在调用完“退订包年/包月资源”接口生成退订订单ID后,调用该接口查询退订订单对应的金额所属资源和订单。例如,调用“退订包年/包月资源”接口退订资源及其已续费周期后,您可以调用本小节的接口查询到退订金额归属的原开通订单ID和原续费订单ID。
  • 2018年5月份之后退订的订单才能查询到归属的原订单ID。

    该接口即将下线,“查询退款订单的金额详情”接口请参考查询退款订单的金额详情

URI

GET /v1.0/{domain_id}/common/order-mgr/orders/refund-order

参数说明请参见下表。

表1 路径参数

参数

是否必选

取值范围

描述

domain_id

最大长度:64

表2 查询参数

参数

是否必选

参数类型

取值范围

描述

order_id

String

最大长度:64

退订订单或者降配订单ID。

请求消息

请求参数

无。

请求示例

GET https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/common/order-mgr/orders/refund-order?order_id=CS1*****GT HTTP/1.1
Content-Type: application/json
X-Auth-TokenMIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

响应消息

响应参数

参数

是否必选

参数类型

描述

error_code

String

状态码。

具体请参见状态码

error_msg

String

错误描述信息。

total_count

Integer

查询总数。

resource_info_list

List<ResourceInfo>

资源信息列表。

具体请参见表3

表3 ResourceInfo

参数

是否必选

参数类型

描述

id

String

该记录的ID。

resource_id

String

资源ID。

如果资源没有ID号,该字段为空。

该字段先预留,目前暂不返回。

amount

BigDecimal

金额。

  • 金额为负数,表示退订金额。
  • 金额为正数,表示收取的退订手续费。

measure_id

String

度量单位。

  • 1:元
  • 2:角
  • 3:分

customer_id

String

客户ID。

resourceType

String

资源类型编码,例如ECS的VM为“hws.resource.type.vm”。您可以调用查询资源类型列表接口获取。

cloudServiceType

String

云服务类型编码,例如OBS的云服务类型编码为“hws.service.type.obs”。您可以调用查询云服务类型列表接口获取。

regionCode

String

云服务区编码,例如:“ap-southeast-1”。具体请参见地区和终端节点对应云服务的“区域”列的值。

preOrderId

String

退订金额、已消费金额或收取退订手续费对应的原订单ID。

响应示例

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  

{
    "error_code": "CBC.0000",
    "error_msg": "success",
    "total_count": 3,
    "resource_info_list": [
        {
            "id": "0b8**c**f3",
            "amount": -288,
            "resourceType": "hws.resource.type.volume",
            "cloudServiceType": "hws.service.type.ebs",
            "regionCode": "cn-north-1",
            "preOrderId": "CS1806201614MS037",
            "resource_id": null,
            "measure_id": "3",
            "customer_id": "f8*****231d"
        },
        {
            "id": "2ba*****2a9",
            "amount": 28,
            "resourceType": "hws.resource.type.volume",
            "cloudServiceType": "hws.service.type.ebs",
            "regionCode": "cn-north-1",
            "preOrderId": "CS18062016100U54J",
            "resource_id": null,
            "measure_id": "3",
            "customer_id": "f80*****31d"
        },
        {
            "id": "abe3*****5312",
            "amount": -260,
            "resourceType": "hws.resource.type.volume",
            "cloudServiceType": "hws.service.type.ebs",
            "regionCode": "cn-north-1",
            "preOrderId": "CS18062016100U54J",
            "resource_id": null,
            "measure_id": "3",
            "customer_id": "f80*****31d"
        }
    ]
}

状态码

  • 状态码4xx:由于明显的客户端错误(例如,格式错误的请求语法、参数错误等),华为云会返回4xx错误码,请及时检查请求消息的正确性,重新发起请求。
  • 状态码5xx:由于华为云系统原因,导致无法完成明显有效请求的处理,可及时联系华为云客服处理。

HTTP状态码

错误码

描述

200

CBC.0000

成功。

500

CBC.0999

其他错误。

400

CBC.0100

参数错误。

403

CBC.0151

访问拒绝。

200

CBC.5026

该订单不是降配或者退订订单。