«
| account | permissionGroup | permissionGroupName | permission |
|---|---|---|---|
| supplier | supplier_group | supplier_group | trừ quyền voucher:create_book |
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"clanCode": "001",
"code": "NATRA",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}| X-Tenant | <tenant> |
|---|
{
"clanCode": "001",
"code": "NATRA",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"title": "clan_not_found"
}| tenant | |
|---|---|
| null | |
| linhtinh |
| X-Tenant | m26 |
|---|
{
"clanCode": "001",
"code": "NATRA",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}| X-Tenant | m26 |
|---|
{
"clanCode": "001",
"code": "NATRA",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}| X-Tenant | m26 |
|---|
{
"clanCode": "001",
"code": "NATRA",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"title": "clan_not_found"
}bao gồm: clanCode, code, title, validFrom, applyScopes, discountType, formula, customerLimit, numberOfVoucher, config, items, orderDiscount
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
<jsonBody>
}{
"violations": [
{
"field": "<field>",
"message": "<message>"
}
],
"title": "Constraint Violation"
}| field | message | jsonBody | |
|---|---|---|---|
| clanCode | must not be blank | "code":"${NATRA}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| code | must not be blank | "clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| title | must not be blank | "code":"${NATRA}","clanCode":"${001}","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| validFrom | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| applyScopes | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| discountType | must not be blank | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| formula | must not be blank | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| customerLimit | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| numberOfVoucher | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"config":{},"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| config | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"items":[{"fee":"standard_shipping"}],"orderDiscount":{} | |
| items | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"orderDiscount":{} | |
| orderDiscount | must not be null | "code":"${NATRA}","clanCode":"${001}","title":"Test Voucher","validFrom":"2024-09-24T08:07:37.001Z","applyScopes":["ORDER"],"discountType":"AMOUNT","formula":"5000","customerLimit":2,"numberOfVoucher":10,"config":{},"items":[{"fee":"standard_shipping"}] |
bao gồm: clanCode, code, title, validFrom, applyScopes, discountType, formula, customerLimit, numberOfVoucher, config, items, orderDiscount
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": <clanCode>,
"code": <code>,
"title": <title>,
"validFrom": <validFrom>,
"applyScopes": <applyScopes>,
"discountType": <discountType>,
"formula": <formula>,
"customerLimit": <customerLimit>,
"numberOfVoucher": <numberOfVoucher>,
"config": <config>,
"items": <items>,
"orderDiscount": <orderDiscount>
}{
"violations": [
{
"field": "<field>",
"message": "<message>"
}
],
"title": "Constraint Violation"
}| clanCode | code | title | validFrom | applyScopes | discountType | formula | config | customerLimit | numberOfVoucher | items | orderDiscount | field | message | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| null | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | clanCode | must not be blank | |
| "" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | clanCode | must not be blank | |
| "${001}" | null | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | code | must not be blank | |
| "${001}" | "" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | code | must not be blank | |
| "${001}" | "${NATRA}" | null | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | title | must not be blank | |
| "${001}" | "${NATRA}" | "test" | null | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | validFrom | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | null | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | applyScopes | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | null | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | discountType | must not be blank | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | null | {} | 2 | 10 | [{"fee":"standard_shipping"}] | {} | formula | must not be blank | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | null | 2 | 10 | [{"fee":"standard_shipping"}] | {} | config | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | null | 10 | [{"fee":"standard_shipping"}] | {} | customerLimit | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | null | [{"fee":"standard_shipping"}] | {} | numberOfVoucher | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | null | {} | items | must not be null | |
| "${001}" | "${NATRA}" | "test" | "2024-09-12T00:00:00Z" | ["ORDER"] | "PERCENT" | "5000" | {} | 2 | 10 | [{"fee":"standard_shipping"}] | null | orderDiscount | must not be null |
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "<validFrom>",
"validTo": "<validTo>",
"applyScopes": <applyScopes>,
"discountType": "AMOUNT",
"formula": "5000",
"config": <config>,
"customerLimit": <customerLimit>,
"numberOfVoucher": <numberOfVoucher>,
"items": <items>,
"orderDiscount": <orderDiscount>
}{
"title": "Bad Request"
}| validFrom | validTo | customerLimit | numberOfVoucher | items | applyScopes | config | orderDiscount | |
|---|---|---|---|---|---|---|---|---|
| 2024-09-04 05:35:23 | 2024-09-24T08:07:37.001Z | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| text | 2024-09-24T08:07:37.001Z | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2024-09-04 05:35:23 | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | text | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | "string" | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | 2 | "string" | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | 2 | 10 | "normal_shipping" | ["ORDER"] | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | 2 | 10 | [{"fee":"standard_shipping"}] | {} | {} | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | ["hidden": null] | {} | |
| 2024-09-24T08:07:37.001Z | 2025-09-24T08:07:37.001Z | 2 | 10 | [{"fee":"standard_shipping"}] | ["ORDER"] | {} | ["maxValue": 5000] |
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"config": {},
"customerLimit": <customerLimit>,
"numberOfVoucher": <numberOfVoucher>,
"items": [
{
"fee": "standard_shipping"
}
],
"orderDiscount": {}
}{
"title": "Constraint Violation",
"violations": [
{
"field": "<field>",
"message": "must be greater than or equal to 1"
}
]
}| customerLimit | numberOfVoucher | field | |
|---|---|---|---|
| -2 | 10 | customerLimit | |
| -2.4 | 10 | customerLimit | |
| 2 | -10 | numberOfVoucher | |
| 2 | -10.3 | numberOfVoucher |
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"config": {},
"customerLimit": 2.3,
"numberOfVoucher": 10.4,
"items": [
{
"fee": "standard_shipping"
}
],
"orderDiscount": {}
}{
"clanCode": "${001}",
"code": "${NATRA}",
"active": true,
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
]
}| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "<validFromApply>",
"validTo": "<validToApply>",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"title": "<message>"
}| validFrom | validTo | validFromApply | validToApply | message | |
|---|---|---|---|---|---|
| A+2 | A+1 | ${A+2} | ${A+1} | valid_from_not_greater_than_valid_to | |
| A-3 | A-1 | ${A-3} | ${A-1} | valid_to_not_greater_than_today |
| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| NATRA | 001 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "${A}",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"title": "voucher_code_exists"
}| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| NATRA | 001 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| code | name | description |
|---|---|---|
| 002 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${002}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "${A}",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
],
"config": {},
"orderDiscount": {}
}{
"clanCode": "${001}",
"code": "${NATRA}",
"active": true,
"title": "Test Voucher",
"validFrom": "${A}",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
]
}| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"config": {},
"items": [
{
"fee": "standard_shipping"
}
],
"orderDiscount": {}
}{
"clanCode": "${001}",
"code": "${NATRA}",
"active": true,
"title": "Test Voucher",
"description": null,
"validFrom": "2024-09-24T08:07:37.001Z",
"validTo": null,
"applyScopes": [
"ORDER"
],
"applyCondition": null,
"discountType": "AMOUNT",
"formula": "5000",
"orderCode": null,
"image": null,
"termsAndConditions": null,
"customerLimit": 2,
"numberOfVoucher": 10,
"maxValue": null,
"items": [
{
"fee": "standard_shipping",
"maxValue": null,
"discountLimit": null
}
],
"config": {
"hidden": null,
"single": null,
"showLimit": null,
"showRemaining": null,
"showCustomerLimit": null
},
"orderDiscount": {
"maxValue": null,
"discountLimit": null,
"orderDiscountType": null
}
}| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${NATRA}",
"title": "Test thui",
"description": "test api Na",
"validFrom": "${A-1}",
"validTo": "${A+10}",
"applyScopes": [
"ORDER"
],
"applyCondition": "totalWeight >= 1",
"discountType": "PERCENT",
"formula": "10",
"orderCode": "",
"image": "data:image/jpeg;base64…...",
"termsAndConditions": "<div style=\"text-align: start;color: rgba(0, 0, 0, 0.8);background-color: rgb(255, 255, 255);font-size: 14px;\"><strong>….",
"customerLimit": 2,
"numberOfVoucher": 10,
"maxValue": 5000,
"items": [
{
"fee": "standard_shipping",
"maxValue": 5000,
"discountLimit": 1000
}
],
"config": {
"hidden": true,
"single": true,
"showLimit": true,
"showRemaining": true,
"showCustomerLimit": true
},
"orderDiscount": {
"maxValue": 5000,
"discountLimit": 1000,
"orderDiscountType": "totalValue"
}
}{
"clanCode": "${001}",
"code": "${NATRA}",
"active": true,
"title": "Test thui",
"description": "test api Na",
"validFrom": "${A-1}",
"validTo": "${A+10}",
"applyScopes": [
"ORDER"
],
"applyCondition": "totalWeight >= 1",
"discountType": "PERCENT",
"formula": "10",
"orderCode": "",
"image": "data:image/jpeg;base64…...",
"termsAndConditions": "<div style=\"text-align: start;color: rgba(0, 0, 0, 0.8);background-color: rgb(255, 255, 255);font-size: 14px;\"><strong>….",
"customerLimit": 2,
"numberOfVoucher": 10,
"maxValue": 5000,
"items": [
{
"fee": "standard_shipping",
"maxValue": 5000,
"discountLimit": 1000
}
],
"config": {
"hidden": true,
"single": true,
"showLimit": true,
"showRemaining": true,
"showCustomerLimit": true
},
"orderDiscount": {
"maxValue": 5000,
"discountLimit": 1000,
"orderDiscountType": "totalValue"
}
}| code | name | description |
|---|---|---|
| 001 | AutoTest | Call API |
| code | clan | numberOfVoucher | condition | discountType | formula | items | orderDiscount |
|---|---|---|---|---|---|---|---|
| NATRA | 001 | 2 | totalWeight >= 1 | PERCENT | 10 | [{"fee": "shipping_fee"}] | {"maxValue": 5000,"discountLimit": 1000,"orderDiscountType": "totalValue"} |
| X-Tenant | m26 |
|---|
{
"clanCode": "${001}",
"code": "${DATKY}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"config": {},
"items": [
{
"fee": "standard_shipping"
}
],
"orderDiscount": {}
}{
"clanCode": "${001}",
"code": "${DATKY}",
"title": "Test Voucher",
"validFrom": "2024-09-24T08:07:37.001Z",
"applyScopes": [
"ORDER"
],
"discountType": "AMOUNT",
"formula": "5000",
"customerLimit": 2,
"numberOfVoucher": 10,
"items": [
{
"fee": "standard_shipping"
}
]
}