All Products
Search
Document Center

BSS OpenAPI:QueryCashCoupons

Last Updated:Jul 18, 2024

Queries the information about vouchers.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

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.

object
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