Data dictionary

TemplateInfo

No

Name

Description

Type

Length

Required

Sample

1

requestId

Request ID, which supports idempotency.

string

64

M

211020000000000000044

2

name

Voucher template name

string

32

M

滿10減1夏日優惠券活動

3

voucherType

The type of the voucher:

  • FIXED_VOUCHER: The fixed face value

string

32

M

券类型:FIXED_VOUCHER=固定面额

4

startTime

Voucher release start time. The start time is not earlier than the current time and is not later than 30 days after the current time.

datetime

/

M

2011-07-04T12:08:56+05:30

5

endTime

Voucher release end time. You cannot issue vouchers later than this time. The end time must be later than the start time. The maximum available time is 180 days. The minimum validity interval is 1s.

datetime

/

M

2011-07-04T12:08:56+05:30

6

voucherRedemptionRules

Voucher redemption rules

voucherRedemptionRules

/

M

{

 "quantityBudget": "1000",

 "limitCountPerUser": "1",

 "dayLimitCountPerUser": "1"

}

7

voucherUsageRules

Voucher usage rules

VoucherUsageRules

/

M

{

 "minPayAmount": {

   "currency": "HKD",

   "value": "100"

 },

 "amount": {

   "currency": "HKD",

   "value": "10"

 },

 "validPeriod": {

   "type": "ABSOLUTE",

   "startTime": "2021-03-04T12:08:56+05:30",

   "endTime": "2021-04-07T12:08:56+05:30"

 }

}

8

displayInfo

Voucher information, which is displayed on the card voucher package and collection page.

Map<String,DisplayInfo>

/

M

{ "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"

]

}

}

9

creatorId

Creator ID

string

32

M

10

passThroughInfo

Pass-through fields for risk control and extension.

string

2048

O

{}

VoucherRedemptionRules

No

Name

Description

Type

Length

Required

Sample

1

quantityBudget

The total number of vouchers that are released during the activity period, ranges from 3 to 5000000.

number

10

M

1000

2

limitCountPerUser

The total number of vouchers that a user can obtain during the activity period, ranges from 1 to 50.

number

10

M

10

3

dayLimitCountPerUser

The total number of vouchers that a user can obtain one day, ranges from 1 to 50.

number

10

O

10

VoucherUsageRules

No

Name

Description

Type

Length

Required

Sample

1

amount

Voucher face value, ranges from 0.10 to 1000.00.

Money

/

M

amount:{

currency:"HKD",

value:"20":

}

2

minPayAmount

The threshold amount of the voucher. When the voucher is written off, the order amount must be equal to or higher than the threshold amount. ranges from 0.10 to 100000.00.

Money

/

M

minPayAmount:{

currency:"HKD",

value:"120":

}

3

validPeriod

Validity period configuration, including the activation and end time of the voucher.

ValidPeriod

/

M

{

"type":"ABSOLUTE",

"voucherStartTime":"2021-03-04T12:08:56+05:30",

"voucherEndTime":"2021-04-07T12:08:56+05:30"

}

DisplayInfo

No

Name

Description

Type

Length

Required

Remarks

Sample

1

merchantName

Merchant name.

Verification rules:

  • Up to 16 characters in traditional characters
  • Up to 32 characters in English

String

32

M

麦当劳

2

voucherDescription

Voucher description.

Verification rules:

  • Up to 28 characters in traditional characters
  • Up to 56 characters in English

String

56

M

麦当劳优惠券满10元可用

3

voucherUsageConditions

Voucher usage description.

Verification rules:

  • Up to 300 characters in traditional characters
  • Up to 600 characters in English

List<String>

600

M

If the line breaks, multiple array list values are passed in, and only one value is passed in the array without line breaks.

["商户自运营EFT商户","该红包适用于EFT","欢迎领劵使用"]

ValidPeriod

No

Name

Description

Type

Length

Required

Sample

1

type

Validity period type.

  • RELATIVE
  • ABSOLUTE

string

10

M

RELATIVE

2

startTime

The time when the voucher takes effect, the start time is not earlier than the current time, and the start time is not later than 180 days after the current time. This field is required when the type is ABSOLUTE.

datetime

/

O

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

3

endTime

The expiration time of the voucher, the end time must be later than the start time. This field is required when the type is ABSOLUTE.

datetime

/

O

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

4

startSeconds

The voucher takes effect in the Nth seconds, The minimum validity interval is 1s, the effective time must be less than the expiration time. This field is required when the type is

RELATIVE.

long

/

O

100

5

endSeconds

The voucher expires in the Nth seconds, the minimum validity interval is 1s.

This field is required when the type is

RELATIVE.

long

/

O

200

Money

No

Name

Description

Type

Length

Required

Sample

1

currency

Use the default currency by the tenant's location, for example, the AlipayHK tenant uses HKD.

string

3

M

HKD

2

value

The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge £100, a zero-decimal currency).

integer

16

M

100

Language

No

Name

Description

Type

Length

Required

Sample

1

zh_HK

The content is in Hong Kong traditional characters.

string

/

M

"文字實例"

2

en_US

The content is in English.

string

/

M

"sample"

TemplateSimpleInfo

No

Name

Description

Type

Length

Required

Remarks

Sample

1

merchantId

The ID of the voucher merchant.

string

32

M

"文字示例"

2

templateId

Voucher template ID

string

64

M

3

name

Voucher template name

string

32

M

4

status

The status of the voucher template

string

10

M

DRAFT

AUDIT

ACTIVITING

FAILED

ACTIVTED

PAUSED

CLOSED

ACTIVTED

StatusType

The status adjustment of the voucher template must conform to the following state machine.

image