alipay.intl.ipromomerchant.cashlessvoucher.template.detail

Overview

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

Use this interface to query the details of a cashless voucher template.

Function logic

Queries the details of a cashless voucher template, such as status, and budget.

Request

Request parameters

Body

No

Name

Description

Type

Length

Required

Sample

1

templateId

Voucher template ID

string

32

M

73708217433946187370821743394618

Sample

copy
POST: /api/open/v1/promotion/cashlessVoucher/template/detail 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=***
{
  "templateId": "73708217433946187370821743394618"
}

Response

Response parameters

Body

No

Name

Description

Type

Length

Required

Remarks

Sample

1

result

Result information

Result

/

M

{

 "resultStatus": "S",

 "resultCode": "SUCCESS",

 "resultMessage": "success"

}

2

templateInfo

Template information

TemplateInfo

/

M

{
"requestId": "211020000000000000044",
"name": "滿10減1夏日優惠券活動",
"voucherType": "FIXED_VOUCHER",
"startTime": "2021-03-04T12:08:56+05:30",
"endTime": "2021-07-04T12:08:56+05:30",
"voucherRedemptionRules": {
 "quantityBudget": "1000",
 "limitCountPerUser": "1",
 "dayLimitCountPerUser": "1"
},
"voucherUsageRules": {
 "minPayAmount": {
  "currency": "HK",
  "value": "100"
},
 "amount": {
  "currency": "HK",
  "value": "10"
},
 "canSuperpose": false,
 "refundBack": false,
 "validPeriod": {
  "type": "ABSOLUTE",
  "startTime": "2021-03-04T12:08:56+05:30",
  "endTime": "2021-04-07T12:08:56+05:30"
}
},
displayInfo: {
"zh_HK": {
"merchantName": "麦当劳",
 "voucherDescription": "消费满100即可自动扣减",
"voucherUsageConditions": [
"商户自运营EFT商户",
"该红包适用于EFT"
]
},
"en_US": {
"merchantName": "MacDonald",
 "voucherDescription": "Automatic deduction for consumption up to 100",
"voucherUsageConditions": [
"Businesses operating EFT businesses",
"A red envelope applies to EFT"
]
}
},
creatorId: "2160400000000122",
passThroughInfo: {

}
}

3

status

The status of the voucher template

string

10

M

DRAFT

AUDIT

ACTIVITING

FAILED

ACTIVTED

PAUSED

CLOSED

DRAFT

4

redemptionQuantity

The quantity of redemption vouchers

Integer

/

M

5

remainQuantity

Remaining coupon budget

Integer

/

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"
  },
  "templateInfo": {
    "id": "73708217433946187370821743394618",
    "name": "滿10減1夏日優惠券活動",
    "voucherType": "FIXED_VOUCHER",
    "startTime": "2021-03-04T12:08:56+05:30",
    "endTime": "2021-07-04T12:08:56+05:30",
    "voucherRedemptionRules": {
       "quantityBudget": "1000",
       "limitCountPerUser": "1",
       "dayLimitCountPerUser": "1"
    },
    "voucherUsageRules": {
       "minPayAmount": {
          "currency": "HK",
          "value": "100" 
      },
       "amount": {
          "currency": "HK",
          "value": "10" 
      },
       "canSuperpose": false,
       "refundBack": false,
       "validPeriod": {
          "type": "ABSOLUTE",
          "startTime": "2021-03-04T12:08:56+05:30",
          "endTime": "2021-04-07T12:08:56+05:30" 
      }
    },
    displayInfo: {
       "voucherName": "$10 礼券",
      "merchantName": "麦当劳",
       "voucherDescription": "消费满100即可自动扣减",
      "voucherUsageConditions": "此消费用于指定该商家消费满减劵"
    },
    creatorId: "2160400000000122",
    passThroughInfo: {
      
    }
  },
  redemptionQuantity: "100",
  remainQuantity: "900"
}

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

TEMPLATE_NOT_EXIST

F

The template data is invalid.

5

SERVICE_NOT_AVAILABLE

F

Service degradation not available.

6

MERCHANT_CONTRACT_NOT_EXIST

F

The merchant contract does not exist.

7

NO_MERCHANT_CONTRACT_BEEN_SIGNED

F

No product contract has been signed.

8

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.