All Products
Search
Document Center

BSS OpenAPI:QueryRedeem

Last Updated:Mar 01, 2024

Queries the information about a redemption coupon.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
bssapi:QueryRedeemRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ExpiryTimeStartstringNo

The start time when the redemption coupon expires. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.

2018-08-01T00:00:00Z
ExpiryTimeEndstringNo

The end time when the redemption coupon expires. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.

2018-08-01T00:00:00Z
EffectiveOrNotbooleanNo

Specifies whether the redemption coupon takes effect. Valid values:

  • true
  • false

Default value: false.

true
PageNumintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

10

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

Success
Messagestring

The message returned.

Successful
RequestIdstring

The ID of the request.

E503DC7B-E4F0-4B3C-BC89-BCECF1338F0B
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data returned.

PageNumlong

The page number of the returned page.

1
PageSizelong

The number of entries returned per page.

10
TotalCountlong

The total number of returned entries.

1
Redeemobject []

The details of the redemption coupon.

ExpiryTimestring

The time when the redemption coupon expired.

2018-06-13 20:25:00
GrantedTimestring

The time when the redemption coupon was issued.

2018-05-14 20:25:00
Statusstring

The status of the redemption coupon. Valid values:

  • Generated
  • CallBack
  • RefundPending
  • Canceled
  • Order_Canceled
  • ActivePending
  • ActiveSuccess
  • ExchangePending
  • ExchangeSuccess
  • Expired
Generated
Specificationstring

The specifications of the redemption coupon.

N/A
NominalValuestring

The nominal value of the redemption coupon.

0
EffectiveTimestring

The time when the redemption coupon took effect.

2018-05-14 20:25:00
RedeemIdstring

The ID of the redemption coupon.

1342
RedeemNostring

The number of the redemption coupon.

4889*****1610
ApplicableProductsstring

The services to which the redemption coupon is applicable.

Elastic Compute Service (ECS)
Balancestring

The balance of the redemption coupon.

0

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful",
  "RequestId": "E503DC7B-E4F0-4B3C-BC89-BCECF1338F0B",
  "Success": true,
  "Data": {
    "PageNum": 1,
    "PageSize": 10,
    "TotalCount": 1,
    "Redeem": {
      "Redeem": [
        {
          "ExpiryTime": "2018-06-13 20:25:00",
          "GrantedTime": "2018-05-14 20:25:00",
          "Status": "Generated",
          "Specification": "N/A\n",
          "NominalValue": "0",
          "EffectiveTime": "2018-05-14 20:25:00",
          "RedeemId": "1342",
          "RedeemNo": "4889*****1610",
          "ApplicableProducts": "Elastic Compute Service (ECS)\n",
          "Balance": "0"
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError message
400NotAuthorizedThis API is not authorized for caller.
400NotApplicableThis API is not applicable for caller.
400InvalidOwnerThe specified owner doesn't belong to caller.
500InternalErrorThe request processing has failed due to some unknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-08API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500