This page was automatically generated from tracezilla’s Swagger API documentation 2026-01-26
GET /contracts/{scope}/{contractId}
Get Contracts
Description
Returns Contracts
Parameters (path)
| Name | Required | Description | Values |
|---|---|---|---|
| scope | required | Scope. Can be either purchase or sales | purchase, sales |
| contractId | required | Target Contract. | Â |
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
"properties": {
"required": [
"ref",
"remark",
"partner_id",
"target",
"type"
],
"properties": {
"id": {
"description": "Id of the record",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"currency": {
"description": "ISO 4217 Currency Codes 3 letter currency code",
"type": "string",
"format": "string",
"example": "DKK"
},
"delivered_from": {
"description": "Orders delivered from that date will be covered by the contract",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"delivered_to": {
"description": "Orders delivered to that date will be covered by the framework agreement",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"deliver_to_partner_id": {
"description": "Only include orders delivered to partners with this ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"deliver_to_location_id": {
"description": "Only include orders delivered to partners with this location ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"delivery_term_incoterm": {
"description": "Incoterm to put on the order, when the order is created directly from this contract.",
"type": "string",
"format": "string",
"enum": [
"Ex Works",
"FCA",
"FAS",
"FOB",
"CFR",
"CIF",
"CPT",
"CIP",
"DAT",
"DAP",
"DDP"
],
"example": "FOB"
},
"delivery_term_text": {
"description": "A standalone delivery term text or a text to displayed with the selected incoterm",
"type": "string",
"format": "string",
"example": "Hamburg"
},
"exchange_rate": {
"description": "Exchange rate when the currency on the contract is different from the local currency",
"type": "number",
"format": "double",
"example": 1234.123
},
"order_tag_id": {
"description": "Limit this contract to only cover orders with this order tag. If null, all orders will be covered.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"partner_id": {
"description": "Reference to the partner model of the customer or supplier",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"quota": {
"description": "If this contract is a quota and thereby the target should be considered a limit",
"type": "boolean",
"format": "boolean",
"example": true
},
"ref": {
"description": "A reference code for this contract",
"type": "string",
"format": "string",
"example": "A string"
},
"remark": {
"description": "A remark for the contract",
"type": "string",
"format": "string",
"example": "A string"
},
"scope": {
"description": "If this contract covers *purchase*- or *sales*-orders",
"type": "string",
"format": "string",
"enum": [
"sales",
"purchase"
],
"example": "sales"
},
"sku_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"sku_tag_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"target": {
"description": "See *type* for further explanation",
"type": "number",
"format": "double",
"example": 1234.123
},
"progress_share": {
"description": "The total progess share of the *target*. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"progress_total": {
"description": "The total progress. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"type": {
"description": "How to measure target achievement. \n- *sku*: target will be a the quantity og UoMs of the sku specified in *sku_id*\n- *sku_tag*: target will be the total net weight of skus with the tag given in *sku_tag_id*\n- *revenue*: target will be the total revenue regardless of sku",
"type": "string",
"format": "string",
"enum": [
"sku",
"sku_tag",
"revenue"
],
"example": "sku"
},
"tag_ids": {
"description": "Tag ids related to the Order entity. \nNotice that these will only be included if *tags* are included in the include parameter",
"type": "array",
"items": {
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
}
},
"archived_at": {
"description": "The time when the record was marked as archived in UTC date & time (Iso8601 ZuluString)",
"type": "string",
"format": "date-time",
"example": "2019-01-01T13:25:32.312Z"
},
"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 /contracts/{scope}/{contractId}
Update existing Contract
Description
Update the specified resource in storage.
Parameters (path)
| Name | Required | Description | Values |
|---|---|---|---|
| scope | required | Scope. Can be either purchase or sales | purchase, sales |
| contractId | required | Target Contract. | Â |
Request body
Description
Target Contract.
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"required": [
"ref",
"remark",
"partner_id",
"target",
"type"
],
"properties": {
"id": {
"description": "Id of the record",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"currency": {
"description": "ISO 4217 Currency Codes 3 letter currency code",
"type": "string",
"format": "string",
"example": "DKK"
},
"delivered_from": {
"description": "Orders delivered from that date will be covered by the contract",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"delivered_to": {
"description": "Orders delivered to that date will be covered by the framework agreement",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"deliver_to_partner_id": {
"description": "Only include orders delivered to partners with this ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"deliver_to_location_id": {
"description": "Only include orders delivered to partners with this location ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"delivery_term_incoterm": {
"description": "Incoterm to put on the order, when the order is created directly from this contract.",
"type": "string",
"format": "string",
"enum": [
"Ex Works",
"FCA",
"FAS",
"FOB",
"CFR",
"CIF",
"CPT",
"CIP",
"DAT",
"DAP",
"DDP"
],
"example": "FOB"
},
"delivery_term_text": {
"description": "A standalone delivery term text or a text to displayed with the selected incoterm",
"type": "string",
"format": "string",
"example": "Hamburg"
},
"exchange_rate": {
"description": "Exchange rate when the currency on the contract is different from the local currency",
"type": "number",
"format": "double",
"example": 1234.123
},
"order_tag_id": {
"description": "Limit this contract to only cover orders with this order tag. If null, all orders will be covered.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"partner_id": {
"description": "Reference to the partner model of the customer or supplier",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"quota": {
"description": "If this contract is a quota and thereby the target should be considered a limit",
"type": "boolean",
"format": "boolean",
"example": true
},
"ref": {
"description": "A reference code for this contract",
"type": "string",
"format": "string",
"example": "A string"
},
"remark": {
"description": "A remark for the contract",
"type": "string",
"format": "string",
"example": "A string"
},
"scope": {
"description": "If this contract covers *purchase*- or *sales*-orders",
"type": "string",
"format": "string",
"enum": [
"sales",
"purchase"
],
"example": "sales"
},
"sku_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"sku_tag_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"target": {
"description": "See *type* for further explanation",
"type": "number",
"format": "double",
"example": 1234.123
},
"progress_share": {
"description": "The total progess share of the *target*. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"progress_total": {
"description": "The total progress. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"type": {
"description": "How to measure target achievement. \n- *sku*: target will be a the quantity og UoMs of the sku specified in *sku_id*\n- *sku_tag*: target will be the total net weight of skus with the tag given in *sku_tag_id*\n- *revenue*: target will be the total revenue regardless of sku",
"type": "string",
"format": "string",
"enum": [
"sku",
"sku_tag",
"revenue"
],
"example": "sku"
},
"tag_ids": {
"description": "Tag ids related to the Order entity. \nNotice that these will only be included if *tags* are included in the include parameter",
"type": "array",
"items": {
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
}
},
"archived_at": {
"description": "The time when the record was marked as archived in UTC date & time (Iso8601 ZuluString)",
"type": "string",
"format": "date-time",
"example": "2019-01-01T13:25:32.312Z"
},
"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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
"properties": {
"required": [
"ref",
"remark",
"partner_id",
"target",
"type"
],
"properties": {
"id": {
"description": "Id of the record",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"currency": {
"description": "ISO 4217 Currency Codes 3 letter currency code",
"type": "string",
"format": "string",
"example": "DKK"
},
"delivered_from": {
"description": "Orders delivered from that date will be covered by the contract",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"delivered_to": {
"description": "Orders delivered to that date will be covered by the framework agreement",
"type": "string",
"format": "date",
"example": "2019-01-01"
},
"deliver_to_partner_id": {
"description": "Only include orders delivered to partners with this ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"deliver_to_location_id": {
"description": "Only include orders delivered to partners with this location ID. If null, all orders will be included.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"delivery_term_incoterm": {
"description": "Incoterm to put on the order, when the order is created directly from this contract.",
"type": "string",
"format": "string",
"enum": [
"Ex Works",
"FCA",
"FAS",
"FOB",
"CFR",
"CIF",
"CPT",
"CIP",
"DAT",
"DAP",
"DDP"
],
"example": "FOB"
},
"delivery_term_text": {
"description": "A standalone delivery term text or a text to displayed with the selected incoterm",
"type": "string",
"format": "string",
"example": "Hamburg"
},
"exchange_rate": {
"description": "Exchange rate when the currency on the contract is different from the local currency",
"type": "number",
"format": "double",
"example": 1234.123
},
"order_tag_id": {
"description": "Limit this contract to only cover orders with this order tag. If null, all orders will be covered.",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"partner_id": {
"description": "Reference to the partner model of the customer or supplier",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"quota": {
"description": "If this contract is a quota and thereby the target should be considered a limit",
"type": "boolean",
"format": "boolean",
"example": true
},
"ref": {
"description": "A reference code for this contract",
"type": "string",
"format": "string",
"example": "A string"
},
"remark": {
"description": "A remark for the contract",
"type": "string",
"format": "string",
"example": "A string"
},
"scope": {
"description": "If this contract covers *purchase*- or *sales*-orders",
"type": "string",
"format": "string",
"enum": [
"sales",
"purchase"
],
"example": "sales"
},
"sku_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"sku_tag_id": {
"description": "No description is available",
"type": "string",
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
},
"target": {
"description": "See *type* for further explanation",
"type": "number",
"format": "double",
"example": 1234.123
},
"progress_share": {
"description": "The total progess share of the *target*. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"progress_total": {
"description": "The total progress. *progress* needs to be included in the *include*-parameter",
"type": "number",
"format": "double",
"readOnly": true,
"example": 1234.123
},
"type": {
"description": "How to measure target achievement. \n- *sku*: target will be a the quantity og UoMs of the sku specified in *sku_id*\n- *sku_tag*: target will be the total net weight of skus with the tag given in *sku_tag_id*\n- *revenue*: target will be the total revenue regardless of sku",
"type": "string",
"format": "string",
"enum": [
"sku",
"sku_tag",
"revenue"
],
"example": "sku"
},
"tag_ids": {
"description": "Tag ids related to the Order entity. \nNotice that these will only be included if *tags* are included in the include parameter",
"type": "array",
"items": {
"format": "uuid",
"example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
}
},
"archived_at": {
"description": "The time when the record was marked as archived in UTC date & time (Iso8601 ZuluString)",
"type": "string",
"format": "date-time",
"example": "2019-01-01T13:25:32.312Z"
},
"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