«
body: { "member": "string", () // user người nhận voucher "bookCodes": ["string"] ()// Danh sách mã voucher } chủ phường có thể tặng voucher cho các thành viên. Không thể tặng quá số lượt tặng của voucher
| code | name | description | member |
|---|---|---|---|
| clan_01 | AutoTest | Call API | member1, member2, member3 |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}{
"title": "Bad Request"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | <tenant> |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}{
"title": "clan_not_found"
}| tenant | |
|---|---|
| null | |
| taolao |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | <tenant> |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}{
"title": "clan_not_found"
}| code | name | description | member |
|---|---|---|---|
| clan_02 | AutoTest | Call API | member1 |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| voucher02 | clan_02 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}{
"title": "user_not_owner"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
<jsonbody>{
"title": "<title>"
}| jsonbody | title | |
|---|---|---|
| {"member": null,"bookCodes": ["${voucher01}"]} | member_is_blank | |
| {"bookCodes": ["${voucher01}"]} | member_is_blank | |
| {"member": null,"bookCodes": null} | member_is_blank | |
| {"member": "member1","bookCodes": null} | book_code_is_null |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{"member": "lamgicocaiusernaydaumagui","bookCodes": ["${voucher01}"]}{
"title": "member_not_in_clan"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{"member": "pamiuoi","bookCodes": ["${voucher01}"]}{
"title": "member_not_in_clan"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{"member": "member1","bookCodes": ["lamgicocaivouchernaydauma"]}{
"title": "book_code_not_found"
}| code | name | description | member |
|---|---|---|---|
| clan_02 | AutoTest | Call API | member4 |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| voucher02 | clan_02 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher02}"]
}{
"title": "book_code_not_in_clan"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 1 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
} {
"member": "member2",
"bookCodes": ["${voucher01}"]
}{
"title": "out_of_voucher"
}(không tồn tại, voucher của phường khác)
| code | name | description | member |
|---|---|---|---|
| clan_02 | AutoTest | Call API | member4 |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| voucher02 | <clan> | 1 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}", "<voucher>"]
}{
"title": "<title>"
}| clan | voucher | title | |
|---|---|---|---|
| clan_01 | lamgico | book_code_not_found | |
| clan_02 | ${voucher02} | book_code_not_in_clan |
người nhận sẽ nhận được 1 mã voucher từ voucher gốc và có thông báo.
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_01}",
"received": "member1",
"sender": "ownerclan20",
"active": true
}
] {
"content": [
{
"username": "member1",
"event": "CLAN_ASSIGN_VOUCHER",
"content": "Chúc mừng! Chủ phường gửi tặng bạn 1 voucher đặc biệt để tận hưởng những ưu đãi hấp dẫn. Cùng khám phá và sử dụng nhé",
"title": "Quà Tặng Từ Chủ Phường!"
}
]
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| voucher02 | clan_01 | 5 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}", "${voucher02}"]
}[
{
"voucherItemCode": "${voucher01_01}",
"received": "member1",
"sender": "ownerclan20",
"active": true
},
{
"voucherItemCode": "${voucher02_01}",
"received": "member1",
"sender": "ownerclan20",
"active": true
}
]| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
} {
"member": "member2",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_02}",
"received": "member2",
"sender": "ownerclan20",
"active": true
}
]| code | validFrom | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|---|
| voucher01 | 2034-01-01T00:00:00Z | clan_01 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_02}",
"received": "member1",
"sender": "ownerclan20",
"active": true
}
]| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_01}",
"received": "member1",
"sender": "ownerclan20",
"active": true
}
] {
"member": "member1",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_02}",
"received": "member1",
"sender": "ownerclan20",
"active": true
}
]| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 1 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}", "${voucher01}"]
}{
"title": "book_code_is_duplicate"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "<member>",
"bookCodes": ["${voucher01}"]
}{
"title": "user_not_owner"
}| member | |
|---|---|
| member2 | |
| ownerclan20 |
| code | clan | validFrom | validTo | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 2024-01-01T00:00:00Z | 2024-09-01T00:00:00Z | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "member1",
"bookCodes": ["${voucher01}"]
}{
"title": "voucher_expired"
}| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| voucher01 | clan_01 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"member": "ownerclan20",
"bookCodes": ["${voucher01}"]
}[
{
"voucherItemCode": "${voucher01_01}",
"received": "ownerclan20",
"sender": "ownerclan20",
"active": true
}
]