DescribeCoupon

Updated at:
Copy as MD

Queries the list of coupons.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:DescribeCoupon

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

EffectiveStartTime

integer

No

The effective start time, specified as a UNIX timestamp in milliseconds.

1684750028000

EffectiveEndTime

integer

No

The effective end time, specified as a UNIX timestamp in milliseconds.

1708423156000

ExpireStartDate

integer

No

The expiration start time, specified as a UNIX timestamp in milliseconds.

1684750028000

ExpireEndDate

integer

No

The expiration end time, specified as a UNIX timestamp in milliseconds.

1708423156000

Status

string

No

The status.

AVAILABLE

CouponType

string

No

The coupon type.

CERTAIN

Nbid

string

No

The level-1 site information.

2684201000001

CouponId

integer

No

The coupon ID.

351430260343

CouponNo

string

No

The coupon code.

554863270150

CurrentPage

integer

Yes

The current page number.

1

PageSize

integer

Yes

The number of items per page.

20

EcIdAccountIds

array<object>

No

The list of enterprises and accounts. If this parameter is left empty, the coupons of the current account are queried.

object

No

accountinfo

AccountIds

array

No

The list of accessed accounts. If this parameter is left empty, all accounts under the current entity ID are selected.

integer

No

The ID of the member accounts.

1501603440974415

EcId

string

No

The enterprise entity ID.

1501603440974415

MaxResults

integer

No

The maximum number of entries to return for a single query.

20

NextToken

string

No

The token used to start the next query. If this parameter is left empty, no more pages exist.

CouponTemplateIdList

array

No

The list of coupon template IDs.

integer

No

The coupon template ID.

ProductCode

string

No

The product code.

sfm

IncludeShare

boolean

No

Specifies whether to include shared coupons.

Response elements

Element

Type

Description

Example

object

BssApiPageResult

CurrentPage

integer

The current page number.

1

Data

array<object>

The data list.

array<object>

couponInfo

Amount

string

The face value.

9929.750000

CertainAmount

string

CertainAmount

100.00

CouponId

integer

The coupon ID.

59243658

CouponNo

string

The coupon code.

731074910070

CouponType

string

The coupon type.

CERTAIN

CouponTypeName

string

The coupon type name.

Threshold discount coupon

Currency

string

The currency.

CNY

EndTime

string

The end time in ISO 8601 format. The time zone is UTC.

2021-03-06T15:12Z

FirstBuy

boolean

Indicates whether a first-purchase limit applies.

GmtCreate

string

The time when the coupon was issued.

2021-03-02T15:12Z

ItemNames

array

The list of product codes.

string

The name of the applicable product.

Applicable to all products

MoneyLimit

string

The amount limit.

No order amount limit

OrderTimeRule

string

The order duration limit rule.

Subscription rule: The coupon can be used only for orders with a duration greater than 3,600 seconds

RemainAmount

string

The remaining amount.

100.00

Remark

string

The remark.

New purchase on the 28th

ShareUidList

array<object>

The list of shared accounts.

object

shareUidInfo

Uid

string

The Alibaba Cloud UID.

1902671110151254

UserNick

string

The Alibaba Cloud account.

Alibaba Cloud Computing Ltd

ShowSetDeductTagButton

boolean

Indicates whether the tag deduction button is displayed.

true

Site

string

The site.

CHINA

SiteName

string

The site name.

Official website direct sales

StartTime

string

The start time in ISO 8601 format. The time zone is UTC.

2021-03-02T15:12Z

Status

string

The status.

Available

SuitAccount

string

The applicable account.

1902671110151254

SuitItemType

string

The applicable product type. Valid values: all: Applicable to all products. white: Applicable to specified products. black: Not applicable to specified products.

all

UniversalType

string

The application scope of the coupon.

UNIVERSAL

YhOrderTypes

array

The list of applicable order types for the coupon.

string

The applicable order type.

New purchase

PageSize

integer

The number of items per page.

20

RequestId

string

The request ID.

C880B065-A781-4F19-B6DD-3E0E3B715C64

TotalCount

integer

The total number of records.

2

Examples

Success response

JSON format

{
  "CurrentPage": 1,
  "Data": [
    {
      "Amount": "9929.750000",
      "CertainAmount": "100.00",
      "CouponId": 59243658,
      "CouponNo": "731074910070",
      "CouponType": "CERTAIN",
      "CouponTypeName": "Threshold discount coupon",
      "Currency": "CNY",
      "EndTime": "2021-03-06T15:12Z",
      "FirstBuy": false,
      "GmtCreate": "2021-03-02T15:12Z\n",
      "ItemNames": [
        "Applicable to all products"
      ],
      "MoneyLimit": "No order amount limit",
      "OrderTimeRule": "Subscription rule: The coupon can be used only when the purchase order duration is greater than 3,600 seconds",
      "RemainAmount": "100.00",
      "Remark": "New purchase on the 28th",
      "ShareUidList": [
        {
          "Uid": "1902671110151254",
          "UserNick": "Alibaba Cloud Computing Ltd"
        }
      ],
      "ShowSetDeductTagButton": true,
      "Site": "CHINA",
      "SiteName": "Official website direct sales",
      "StartTime": "2021-03-02T15:12Z",
      "Status": "Available",
      "SuitAccount": "1902671110151254",
      "SuitItemType": "all",
      "UniversalType": "UNIVERSAL",
      "YhOrderTypes": [
        "New purchase"
      ]
    }
  ],
  "PageSize": 20,
  "RequestId": "C880B065-A781-4F19-B6DD-3E0E3B715C64",
  "TotalCount": 2
}

Error codes

HTTP status code

Error code

Error message

Description

400 AccountNoQueryPricePermission This page cannot be accessed because you do not have discount rights query permissions. Please contact the main account to go to the cost center for authorization. The permission point that needs authorization is queryprice. This page cannot be accessed because you do not have discount rights query permissions. Please contact the main account to go to the cost center for authorization. The permission point that needs authorization is queryprice.
400 SubAccountNoQueryPricePermission This page cannot be accessed because you do not have discount rights query permissions. Contact the main account to go to the RAM console for authorization. The Action to be authorized is bss:QueryPrice. This page cannot be accessed because you do not have discount rights query permissions. Contact the main account to go to the RAM console for authorization. The Action to be authorized is bss:QueryPrice.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.