All Products
Search
Document Center

Expenses and Costs:QueryCashCoupons

Last Updated:Mar 04, 2025

Queries the information about vouchers.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
bss:DescribeCouponsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ExpiryTimeEndstringNo

The end time of the validity period of the voucher. Specify the parameter in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-08-01T00:00:00Z.

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

The start time of the validity period of the voucher. Specify the parameter in the yyyy-MM-ddTHH:mm:ssZ format. Example: 2018-08-01T00:00:00Z.

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

Specifies whether the voucher takes effect. Valid values:

  • true: The voucher takes effect.
  • false: The voucher does not take effect.
true

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code.

Success
Messagestring

The message returned.

Successful
RequestIdstring

The ID of the request.

147B566E-DB4C-4E43-BDBB-5DB1D9D268DB
Successboolean

Indicates whether the request is successful.

true
Dataarray<object>

The data returned.

CashCouponobject
Statusstring

The state of the voucher. Valid values:

  • Available: The voucher is valid.
  • Expired: The voucher has expired.
  • Cancelled: The voucher is canceled.
Available
ExpiryTimestring

The time when the voucher expired.

2019-01-29T15:15:50Z
GrantedTimestring

The time when the voucher was released.

2018-08-02T15:15:50Z
NominalValuestring

The denomination of the voucher.

100.00
EffectiveTimestring

The time when the voucher took effect.

2018-08-02T15:15:50Z
ApplicableScenariosstring

The scenario to which the voucher is applicable.

Pay for the pay-as-you-go bills of Alibaba Cloud services or purchase an instance of an Alibaba Cloud service
CashCouponIdlong

The ID of the voucher.

34534253254325
ApplicableProductsstring

The service to which the voucher is applicable.

All Alibaba Cloud services
CashCouponNostring

The code of the voucher.

Q-b1485def8f04a
Balancestring

The remaining quota of the voucher.

100.00
Descriptionstring

The description of the voucher.

This voucher is used for testing product function

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful",
  "RequestId": "147B566E-DB4C-4E43-BDBB-5DB1D9D268DB",
  "Success": true,
  "Data": {
    "CashCoupon": [
      {
        "Status": "Available",
        "ExpiryTime": "2019-01-29T15:15:50Z",
        "GrantedTime": "2018-08-02T15:15:50Z",
        "NominalValue": "100.00",
        "EffectiveTime": "2018-08-02T15:15:50Z",
        "ApplicableScenarios": "Pay for the pay-as-you-go bills of Alibaba Cloud services or purchase an instance of an Alibaba Cloud service\n",
        "CashCouponId": 34534253254325,
        "ApplicableProducts": "All Alibaba Cloud services\n",
        "CashCouponNo": "Q-b1485def8f04a",
        "Balance": "100.00",
        "Description": "This voucher is used for testing product function"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400NotApplicableThis API is not applicable for caller.
400NotAuthorizedThis API is not authorized for caller.
400MissingParameter Some parameters arte mandatoryfor this request.
400InvalidParameterSome parameter sare not valid.
400InvalidOwnerThe specifiedowner doesn’t belong to caller
400InternalErrorThe request processing has failed due to some unknown error, exception or failure.
500UndefinedErrorThe 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-07-19The Error code has changed. The response structure of the API has changedView Change Details