查询代金券信息
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
const columns = [
{
width: '20%',
title: '参数',
dataIndex: 'Name',
className: 'openapi-doc-parameter-table-name'
},
{
width: 130,
title: '类型',
dataIndex: 'DataType',
className: 'openapi-doc-parameter-table-type'
},
{
width: 90,
title: '是否必填',
dataIndex: 'IsRequired',
className: 'openapi-doc-parameter-table-required'
},
{
width: '20%',
title: '示例值',
dataIndex: 'Example',
className: 'openapi-doc-parameter-table-example'
},
{
title: '描述',
dataIndex: 'Description',
className: 'openapi-doc-parameter-table-description'
},
];
const data = [
{
rowKey: '->Action',
Name: 'Action',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"ListCoupons"} />,
Description: <RenderMd content={"要执行的操作,取值:ListCoupons。"} />,
children: [
]
},
{
rowKey: '->Version',
Name: 'Version',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"2022-01-01"} />,
Description: <RenderMd content={"API的版本,取值:2022-01-01。"} />,
children: [
]
},
{
rowKey: '->ValidBeginTime',
Name: 'ValidBeginTime',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"2022-02-02T12:00:00Z\n\n"} />,
Description: <RenderMd content={"代金券生效时间范围 开始时间\n"} />,
children: [
]
},
{
rowKey: '->ValidEndTime',
Name: 'ValidEndTime',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"2022-02-02T12:00:00Z\n\n"} />,
Description: <RenderMd content={"代金券生效时间范围 结束时间\n"} />,
children: [
]
},
{
rowKey: '->ProductCode',
Name: 'ProductCode',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"ECS"} />,
Description: <RenderMd content={"商品Code\n"} />,
children: [
]
},
{
rowKey: '->Status',
Name: 'Status',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"2"} />,
Description: <RenderMd content={"代金券状态(多个用英文逗号分隔)\n"} />,
children: [
]
},
{
rowKey: '->Limit',
Name: 'Limit',
DataType: 'Integer',
IsRequired: '否',
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"每页返回的数据量\n"} />,
children: [
]
},
{
rowKey: '->Offset',
Name: 'Offset',
DataType: 'Integer',
IsRequired: '否',
Example: <RenderMd content={"0"} />,
Description: <RenderMd content={"偏移量\n"} />,
children: [
]
},
{
rowKey: '->CouponID',
Name: 'CouponID',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"DT4CC6IB2IZB8D1H"} />,
Description: <RenderMd content={"代金券ID\n"} />,
children: [
]
},
];
return (<Table
rowKey="rowKey"
className="openapi-doc-parameter-table"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
const columns = [
{
width: '25%',
title: '参数',
dataIndex: 'Name',
className: 'openapi-doc-parameter-table-name',
},
{
width: 130,
title: '类型',
dataIndex: 'DataType',
className: 'openapi-doc-parameter-table-type'
},
{
width: '25%',
title: '示例值',
dataIndex: 'Example',
className: 'openapi-doc-parameter-table-example'
},
{
title: '描述',
dataIndex: 'Description',
className: 'openapi-doc-parameter-table-description'
},
];
const data = [
{
rowKey: "->List",
Name: "List",
DataType: "Array of Object",
Example: <RenderMd content={"[]"} />,
Description: <RenderMd content={"代金券列表\n"} />,
children: [
{
rowKey: "->List->ProductLimitList",
Name: "ProductLimitList",
DataType: "Array of Object",
Example: <RenderMd content={""} />,
Description: <RenderMd content={"适用商品配置范围"} />,
children: [
{
rowKey: "->List->ProductLimitList->ProductCode",
Name: "ProductCode",
DataType: 'String',
Example: <RenderMd content={"ECS"} />,
Description: <RenderMd content={"商品Code"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ProductName",
Name: "ProductName",
DataType: 'String',
Example: <RenderMd content={"云服务器"} />,
Description: <RenderMd content={"商品名称"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ConfigurationType",
Name: "ConfigurationType",
DataType: 'Integer',
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"适用配置类型 \n1:全部配置可用 \n2:全部预付费配置可用 \n3:全部后付费配置可用 \n4:指定配置可用"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ConfigurationCode",
Name: "ConfigurationCode",
DataType: 'String',
Example: <RenderMd content={"ecs.c3id.30xlarge\n"} />,
Description: <RenderMd content={"配置Code 只有ConfigurationType = 4 时才会有值"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ConfigurationName",
Name: "ConfigurationName",
DataType: 'String',
Example: <RenderMd content={"ecs.c3id.30xlarge\n"} />,
Description: <RenderMd content={"配置名称(只有ConfigurationType = 4 时才会有值)"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->TimeLimitLower",
Name: "TimeLimitLower",
DataType: 'Integer',
Example: <RenderMd content={"-1"} />,
Description: <RenderMd content={"预付费购买时长限制下限"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->BillingMethod",
Name: "BillingMethod",
DataType: 'String',
Example: <RenderMd content={"monthly"} />,
Description: <RenderMd content={"计费方式"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ChargeItemType",
Name: "ChargeItemType",
DataType: 'Integer',
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"计费项类型 \n0:全部计费项 \n1:指定计费项"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->ChargeItemCode",
Name: "ChargeItemCode",
DataType: 'String',
Example: <RenderMd content={"ecs.c3id_30xlarge_cn-shanghai\n"} />,
Description: <RenderMd content={"计费项编号 ChargeItemType=1 时才会有值"} />,
children: [
]
},
{
rowKey: "->List->ProductLimitList->TimeLimitUpper",
Name: "TimeLimitUpper",
DataType: 'Integer',
Example: <RenderMd content={"-1"} />,
Description: <RenderMd content={"预付费购买时长限制上限"} />,
children: [
]
},
]
},
{
rowKey: "->List->CouponID",
Name: "CouponID",
DataType: "String",
Example: <RenderMd content={"D6JVHMZ6WWQ1NVRW"} />,
Description: <RenderMd content={"代金券ID"} />,
children: [
]
},
{
rowKey: "->List->CouponName",
Name: "CouponName",
DataType: "String",
Example: <RenderMd content={"火山引擎代金券"} />,
Description: <RenderMd content={"代金券名称"} />,
children: [
]
},
{
rowKey: "->List->RemainingAmount",
Name: "RemainingAmount",
DataType: "Double",
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"代金券余额,单位“元”"} />,
children: [
]
},
{
rowKey: "->List->OrderTypeLimit",
Name: "OrderTypeLimit",
DataType: "String",
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"适用订单类型 \n1:新购 \n3:更配 \n4:续费 \n6:转正 \n9:临时升配"} />,
children: [
]
},
{
rowKey: "->List->AmountLimit",
Name: "AmountLimit",
DataType: "Double",
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"金额限制,单位“元”"} />,
children: [
]
},
{
rowKey: "->List->UsageLimit",
Name: "UsageLimit",
DataType: "Integer",
Example: <RenderMd content={"2"} />,
Description: <RenderMd content={"使用次数 \n1:单次使用 \n2:多次使用"} />,
children: [
]
},
{
rowKey: "->List->Status",
Name: "Status",
DataType: "Integer",
Example: <RenderMd content={"2"} />,
Description: <RenderMd content={"代金券状态 \n1:待生效\n2:生效中\n3:已失效\n4:已使用\n5:已作废"} />,
children: [
]
},
{
rowKey: "->List->PayTypeLimit",
Name: "PayTypeLimit",
DataType: "String",
Example: <RenderMd content={"all"} />,
Description: <RenderMd content={"适用付款方式 \nall:预付费&后付费\npre:预付费 \npost:后付费"} />,
children: [
]
},
{
rowKey: "->List->ExpiredTime",
Name: "ExpiredTime",
DataType: "String",
Example: <RenderMd content={"2024-10-17T11:14:53+08:00"} />,
Description: <RenderMd content={"有效期结束时间"} />,
children: [
]
},
{
rowKey: "->List->AcquireTime",
Name: "AcquireTime",
DataType: "String",
Example: <RenderMd content={"2024-10-17T11:14:53+08:00"} />,
Description: <RenderMd content={"发放时间"} />,
children: [
]
},
{
rowKey: "->List->BeginTime",
Name: "BeginTime",
DataType: "String",
Example: <RenderMd content={"2024-10-17T11:14:53+08:00"} />,
Description: <RenderMd content={"有效期开始时间"} />,
children: [
]
},
{
rowKey: "->List->TotalAmount",
Name: "TotalAmount",
DataType: "Double",
Example: <RenderMd content={"100"} />,
Description: <RenderMd content={"代金券面额,单位“元”"} />,
children: [
]
},
{
rowKey: "->List->AccountID",
Name: "AccountID",
DataType: "Long",
Example: <RenderMd content={"2000010593"} />,
Description: <RenderMd content={"代金券所属账号ID"} />,
children: [
]
},
{
rowKey: "->List->AssignedOwnerIDList",
Name: "AssignedOwnerIDList",
DataType: "Array of Long",
Example: <RenderMd content={"[2000010593]"} />,
Description: <RenderMd content={"指定适用账号 返回空表示不限制"} />,
children: [
]
},
{
rowKey: "->List->VoidReason",
Name: "VoidReason",
DataType: "String",
Example: <RenderMd content={"系统回收"} />,
Description: <RenderMd content={"作废原因"} />,
children: [
]
},
{
rowKey: "->List->Remark",
Name: "Remark",
DataType: "String",
Example: <RenderMd content={""} />,
Description: <RenderMd content={"备注"} />,
children: [
]
},
]
},
{
rowKey: "->Total",
Name: "Total",
DataType: "Integer",
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"总数\n"} />,
children: [
]
},
{
rowKey: "->Limit",
Name: "Limit",
DataType: "Integer",
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"Limit"} />,
children: [
]
},
{
rowKey: "->Offset",
Name: "Offset",
DataType: "Integer",
Example: <RenderMd content={"0"} />,
Description: <RenderMd content={"Offset"} />,
children: [
]
},
];
return (<Table
rowKey="rowKey"
className="openapi-doc-parameter-table"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);
POST /open-apis-v2/coupon?Action=ListCoupons&Version=2022-01-01 HTTP/1.1
Host:
Accept: application/json
Accept-Encoding: gzip
Authorization: ******
Content-Type: application/json; charset=utf-8
{
"Limit": 10,
"Offset": 0,
"ProductCode": "YJQceshi,on_line",
"ValidBeginTime": "2024-10-16T15:59:59Z",
"ValidEndTime": "2024-10-20T15:59:59Z"
}
{
"Metadata": {
"RequestId": "20250813192131978261F85B58C706552F",
"Action": "ListCoupons",
"Version": "2022-01-01",
"Service": "billing",
"Region": "cn-north-1",
"HTTPCode": 200
},
"Limit": 10,
"List": [
{
"AccountID": 2000010593,
"AcquireTime": "2024-10-17T11:14:53+08:00",
"AmountLimit": 0,
"AssignedOwnerIDList": [],
"BeginTime": "2024-10-17T11:14:53+08:00",
"CouponID": "D6JVHMZ6WWQ1NVRW",
"CouponName": "火山引擎代金券",
"ExpiredTime": "2024-10-20T23:59:59+08:00",
"OrderTypeLimit": "1,6,3,4,9",
"PayTypeLimit": "all",
"ProductLimitList": [
{
"BillingMethod": "",
"ChargeItemCode": "",
"ChargeItemType": 0,
"ConfigurationCode": "",
"ConfigurationName": "",
"ConfigurationType": 1,
"ProductCode": "YJQceshi",
"ProductName": "YJQceshi",
"TimeLimitLower": -1,
"TimeLimitUpper": -1
}
],
"RemainingAmount": 10,
"Remark": "系统回收",
"Status": 5,
"TotalAmount": 10,
"UsageLimit": 2
}
],
"Offset": 0,
"Total": 1
}
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
const columns = [
{
title: '状态码',
dataIndex: 'HttpCode',
width: '12%',
className: 'openapi-doc-errorcode-table-httpcode'
},
{
title: '错误码',
dataIndex: 'ErrorCode',
width: '22%',
className: 'openapi-doc-errorcode-table-errorcode'
},
{
title: '错误信息',
dataIndex: 'ErrorMessage',
width: '33%',
className: 'openapi-doc-errorcode-table-errormessage'
},
{
title: '说明',
dataIndex: 'Description',
width: '33%',
className: 'openapi-doc-errorcode-table-description'
},
];
const data = [
{
HttpCode: 400,
ErrorCode: 'InvalidParam',
ErrorMessage: <RenderMd content={"The parameter %s is invalid."} />,
Description: <RenderMd content={"参数无效"} />,
},
{
HttpCode: 500,
ErrorCode: 'InternalError',
ErrorMessage: <RenderMd content={"Service has some internal Error. Pls Contact With Admin."} />,
Description: <RenderMd content={"服务内部异常"} />,
},
];
return (<Table
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);