This page was automatically generated from tracezilla’s Swagger API documentation 2026-01-26

GET /discounts/{scope}/{discountId}

Get Discount

Description

Returns Discount

Parameters (path)

Name Required Description Values
discountId required Target PriceListDiscount.  

Parameters (query)

Name Required Description Values
include optional The resources that can be included in this request, delimited by a comma: sku, price_list  

Responses

200

successful operation

Response content JSON schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
  "properties": {
    "properties": {
      "id": {
        "description": "Id of the record",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "composite_id": {
        "description": "Unique id created as a compund key from the criterias",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "delivered_from": {
        "description": "Delivered from date",
        "type": "string",
        "format": "date",
        "example": "2019-01-01"
      },
      "delivered_to": {
        "description": "Delivered to date",
        "type": "string",
        "format": "date",
        "example": "2019-01-01"
      },
      "discount_percentage": {
        "description": "The discount percentage to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "price_list_id": {
        "description": "Id of the price list this discount belongs to",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "quantity_from": {
        "description": "Lower quantity limit for this discount",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "quantity_to": {
        "description": "Upper quantity limit for this discount",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "sku_id": {
        "description": "Id of the SKU",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "unit_price_from": {
        "description": "Lower limit for unit price for this discount to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "unit_price_to": {
        "description": "Upper limit for unit price for this discount to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "uoms_per_price_unit": {
        "description": "Number of UoMs per one price unit",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "weight": {
        "description": "The order-weight of this discount rule",
        "type": "integer",
        "format": "int2",
        "default": 0,
        "example": 0
      },
      "active": {
        "description": "Boolean indicating if the record is active and could be referenced from other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "created_at": {
        "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "example": "2019-01-01T13:25:32.312Z"
      },
      "updated_at": {
        "description": "The time when the record was last updated in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "example": "2020-01-01T13:25:32.312Z"
      }
    },
    "type": "object"
  },
  "type": "object"
}

406

not acceptable

500

internal server error

PUT /discounts/{scope}/{discountId}

Update existing Discount

Description

Update the specified resource in storage.

Parameters (path)

Name Required Description Values
scope optional Discount scope. sales
priceId required Target PriceListDiscount.  

Request body

Description

Target PriceListDiscount.

Required

This parameter is required.

Request body JSON schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
  "properties": {
    "id": {
      "description": "Id of the record",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "composite_id": {
      "description": "Unique id created as a compund key from the criterias",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "delivered_from": {
      "description": "Delivered from date",
      "type": "string",
      "format": "date",
      "example": "2019-01-01"
    },
    "delivered_to": {
      "description": "Delivered to date",
      "type": "string",
      "format": "date",
      "example": "2019-01-01"
    },
    "discount_percentage": {
      "description": "The discount percentage to apply",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "price_list_id": {
      "description": "Id of the price list this discount belongs to",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "quantity_from": {
      "description": "Lower quantity limit for this discount",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "quantity_to": {
      "description": "Upper quantity limit for this discount",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "sku_id": {
      "description": "Id of the SKU",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "unit_price_from": {
      "description": "Lower limit for unit price for this discount to apply",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "unit_price_to": {
      "description": "Upper limit for unit price for this discount to apply",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "uoms_per_price_unit": {
      "description": "Number of UoMs per one price unit",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "weight": {
      "description": "The order-weight of this discount rule",
      "type": "integer",
      "format": "int2",
      "default": 0,
      "example": 0
    },
    "active": {
      "description": "Boolean indicating if the record is active and could be referenced from other entities",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "created_at": {
      "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
      "type": "string",
      "format": "date-time",
      "example": "2019-01-01T13:25:32.312Z"
    },
    "updated_at": {
      "description": "The time when the record was last updated in UTC date & time (Iso8601 ZuluString)",
      "type": "string",
      "format": "date-time",
      "example": "2020-01-01T13:25:32.312Z"
    }
  },
  "type": "object"
}

Responses

200

successful operation

Response content JSON schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
  "properties": {
    "properties": {
      "id": {
        "description": "Id of the record",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "composite_id": {
        "description": "Unique id created as a compund key from the criterias",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "delivered_from": {
        "description": "Delivered from date",
        "type": "string",
        "format": "date",
        "example": "2019-01-01"
      },
      "delivered_to": {
        "description": "Delivered to date",
        "type": "string",
        "format": "date",
        "example": "2019-01-01"
      },
      "discount_percentage": {
        "description": "The discount percentage to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "price_list_id": {
        "description": "Id of the price list this discount belongs to",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "quantity_from": {
        "description": "Lower quantity limit for this discount",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "quantity_to": {
        "description": "Upper quantity limit for this discount",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "sku_id": {
        "description": "Id of the SKU",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "unit_price_from": {
        "description": "Lower limit for unit price for this discount to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "unit_price_to": {
        "description": "Upper limit for unit price for this discount to apply",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "uoms_per_price_unit": {
        "description": "Number of UoMs per one price unit",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "weight": {
        "description": "The order-weight of this discount rule",
        "type": "integer",
        "format": "int2",
        "default": 0,
        "example": 0
      },
      "active": {
        "description": "Boolean indicating if the record is active and could be referenced from other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "created_at": {
        "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "example": "2019-01-01T13:25:32.312Z"
      },
      "updated_at": {
        "description": "The time when the record was last updated in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "example": "2020-01-01T13:25:32.312Z"
      }
    },
    "type": "object"
  },
  "type": "object"
}

403

Unauthorized request

406

not acceptable

500

Internal server error