alipay.intl.ipromomerchant.cashlessvoucher.template.list

Overview

URL: /api/open/v1/promotion/cashlessVoucher/template/list

Use this interface to query a cashless voucher template.

Function logic

A list of coupons is returned by using this interface, which is generally used on the coupon template list management page of the merchant.

Request

Request parameters

Body

No

Name

Description

Type

Length

Required

Sample

1

offset

The number of pages. The default value is 1.

Integer

M

1

2

pageSize

The number of entries per page. The maximum number cannot exceed 50.

Integer

M

10

3

startTime

The start time to query coupon template release, which must be smaller than the end time.

datetime

M

2021-03-04T12:08:56+05:30

4

endTime

The end time to query coupon template release. The difference between the start time and end time cannot exceed 365 days.

datetime

M

2021-03-05T12:08:56+05:30

5

status

The status of the voucher template. Possible values include:

  • DRAFT
  • AUDIT
  • ACTIVITING
  • FAILED
  • ACTIVTED
  • PAUSED
  • CLOSED

string

10

O

ACTIVE

Sample

copy
POST: /api/open/v1/promotion/cashlessVoucher/template/list HTTP/1.1
Content-Type: application/json; charset=UTF-8
Request-Time: 2020-04-29T17:18:47+08:00
client-id: 5J5XSU7Y2Y182W01981
Signature: algorithm=RSA256,keyVersion=1,signature=***
{
  "offset": "1",
  "pageSize": "10",
  "startTime": "2021-03-05T12:08:56+05:30",
  "endTime": "2021-08-05T12:08:56+05:30",
  "status": "ACTIVE"
}

Response

Response parameters

Body

No

Name

Description

Type

Length

Required

Sample

1

result

Request result

Result

/

M

{

"resultCode": "SUCCESS",

"resultMessage":"success",

 "resultStatus": "S"

}

2

total

The total number of templates that meet the requirements.

Integer

/

M

13

3

list

Coupon template details

List<TemplateSimpleInfo>

/

M

Sample

copy
client-id:TEST_5X00000000000000
content-type:application/json;charset=UTF-8
response-time:2020-03-13T09:59:22Z
signature:algorithm=RSA256,keyVersion=1,signature=rlux%2FDjx44EuIDEW3pEkttG1vw%2FAOdbyxHN7xF2SuHDJ8F%2BW4Q4fXZl7iVAn7zeR0CwWkqHZvJ6pdMVz5FNy7pFIQoACilNx1UJd3gT%2FNN0WLn%2BomEzTgBBu2oKy0nrE%2BHKZN9SbA0R9oWH2gpO1yiry%2FGZhW%2F9JYs2hHIufEx60MfAYaUOsU2m%2FpRpAgzsIV6Cxlb2bDaenMfUR8l1OtSfRp80jy%2BknR5JSQ77GKGU%2BXn6aFTJggnSTSqSO6MflWBQ8c1jF0%2BkN9u6KzSKRhNWuiBs3jQ80bt19xPyM8Du4FNKdAzGPkpIM7589Wa30XFdjnkSOmqJCmzr5UK5CXQ%3D%3D
tracerid:0be9923a15840935597895255e8e44.0.1.1
{
  "result": {
    "resultStatus": "S",
    "resultCode": "SUCCESS",
    "resultMessage": "success"
  },
  "total":2,
  "list": [
         {
        "merchantId": "2160400000000122",
        "templateId": "73708217433946187370821743394618",
        "name": "滿10減1夏日優惠券活動"
      },
      {
        "merchantId": "2160400000000122",
        "templateId": "7370821743394618737082174338000",
        "name": "滿20減1夏日優惠券活動"
      }  
    ]
}

Result codes

Business result codes

No

resultCode

resultStatus

resultMessage

1

SUCCESS

S

Success

2

UNKNOWN_EXCEPTION

U

API failed due to unknown reasons. Retry.

3

PARAM_ILLEGAL

F

Illegal parameters. For example, non-numeric input, invalid date. Non-empty check.

4

PAGE_PARAM_INCORRECT

F

Incorrect paging parameters

5

TEMPLATE_STATUS_NOT_SUPPORT

F

The template status does not support.

6

TEMPLATE_DATE_INCORRECT

F

The template date is incorrect, the start time can not be greater than the end time.

7

SERVICE_NOT_AVAILABLE

F

Service degradation not available.

8

MERCHANT_CONTRACT_NOT_EXIST

F

The merchant contract does not exist.

9

NO_MERCHANT_CONTRACT_BEEN_SIGNED

F

No product contract has been signed.

10

CONTRACT_INVALID

F

Invalid product contract

Supernet result codes

No

ResultCode

ResultStatus

resultMessage

1

INVALID_SIGNATURE

F

The signature is invalid.

2

PROCESS_FAIL

F

General business failure. No retry.

3

CLIENT_FORBIDDEN_ACCESS_API

F

Client is not authorized to use this API.

4

UNKNOWN_CLIENT

F

Unknown client

5

INVALID_CLIENT_STATUS

F

Invalid client status

6

REQUEST_TRAFFIC_EXCEED_LIMIT

F

Request traffic exceed limit.

7

KEY_NOT_FOUND

F

The key is not found.

8

ACCESS_DENIED

F

Access denied

9

API_IS_INVALID

F

API is invalid or not active.

10

UNKNOWN_EXCEPTION

F

API failed due to unknown reason.

11

OAUTH_FAILED

F

oAuth authentication failed.

12

NO_INTERFACE_DEF

F

API is not defined.