All Products
Search
Document Center

BSS OpenAPI:QueryPrepaidCards

Last Updated:Mar 01, 2024

Queries prepaid cards.

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:QueryPrepaidCardsREAD
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ExpiryTimeEndstringNo

The end of the expiration time of prepaid cards to query. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.

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

The start of the expiration time of prepaid cards to query. The value must be in the yyyy-MM-ddTHH:mm:ssZ format.

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

Specifies whether the prepaid card takes effect. Valid values:

  • true
  • false
true

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

Success
Messagestring

The message returned.

Successful
RequestIdstring

The ID of the request.

7EA6C02D-06D0-4213-9C3B-E67910F7D1EB
Successboolean

Indicates whether the request is successful.

true
Dataobject []

The data returned.

Statusstring

The status of the prepaid card. Valid values:

  • Available: The prepaid card is valid.
  • Expired: The prepaid card expired.
  • Cancelled: The prepaid card is invalid.
Available
ExpiryTimestring

The time when the prepaid card expired.

2019-08-04T01:39:11Z
GrantedTimestring

The time when the prepaid card was issued.

2018-08-03T01:39:11Z
NominalValuestring

The nominal value of the prepaid card.

100.00
EffectiveTimestring

The time when the prepaid card took effect.

2018-08-03T01:39:11Z
PrepaidCardNostring

The number of the prepaid card.

Q-7edaab979fc9
ApplicableScenariosstring

The scenario to which the prepaid card is applicable.

test
PrepaidCardIdlong

The ID of the prepaid card.

213432432
ApplicableProductsstring

The services to which the prepaid card is applicable.

All Alibaba Cloud services
Balancestring

The balance of the prepaid card.

100.00

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful",
  "RequestId": "7EA6C02D-06D0-4213-9C3B-E67910F7D1EB",
  "Success": true,
  "Data": {
    "PrepaidCard": [
      {
        "Status": "Available",
        "ExpiryTime": "2019-08-04T01:39:11Z",
        "GrantedTime": "2018-08-03T01:39:11Z",
        "NominalValue": "100.00",
        "EffectiveTime": "2018-08-03T01:39:11Z",
        "PrepaidCardNo": "Q-7edaab979fc9",
        "ApplicableScenarios": "test",
        "PrepaidCardId": 213432432,
        "ApplicableProducts": "All Alibaba Cloud services\n",
        "Balance": "100.00"
      }
    ]
  }
}

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 parameters are 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.