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

GET /services/{serviceId}

Get Services

Description

Returns Services

Parameters (path)

Name Required Description Values
serviceId required Target Service.  

Parameters (query)

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

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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
  "properties": {
    "required": [
      "name",
      "line_text",
      "order_type",
      "calculation",
      "category",
      "ref"
    ],
    "properties": {
      "id": {
        "description": "Id of the Service record",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "calculation": {
        "description": "How should the price be calculated by default for service lines using this service",
        "type": "string",
        "format": "string",
        "enum": [
          "fixed_price",
          "per_unit",
          "percentage",
          "percentage_2nd"
        ],
        "example": "per_unit"
      },
      "category": {
        "description": "The category that service lines should have by default when they use this service",
        "type": "string",
        "format": "string",
        "enum": [
          "analysis",
          "discount",
          "packaging",
          "freight",
          "labour",
          "machinery",
          "warehouse",
          "financial",
          "customs_duty",
          "purchase_price",
          "production",
          "overhead",
          "commission",
          "taxes",
          "other"
        ],
        "example": "discount"
      },
      "currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code. If this is different from the order currency, the exchange rate defined here will be used to convert the price to the order currency.",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "distribution_cost": {
        "description": "Cost of distribution. *Only relevant for sales-services*. Creates a budget line on the sales order.\nIf calculation is set to *per_unit* the cost will be multiplied with the quantity.\nThe cost is always in the local currency, and not the order currency",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "ean_unit": {
        "description": "EAN number of one unit",
        "type": "integer",
        "format": "int32",
        "example": 1234
      },
      "exchange_rate": {
        "description": "The exhcange rate to use, when service currency is different from the order currency",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "edi_unit_code": {
        "description": "Unit code used with edi",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "line_text": {
        "description": "The line text to place on the service line by default",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "locked": {
        "description": "If the service is locked it cannot be deleted. This usually happens when the service has been referenced on other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "name": {
        "description": "Name of the service. Only used for internalt purposes. Never shown on documents",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "order_type": {
        "description": "The order type where this should be used",
        "type": "string",
        "format": "string",
        "enum": [
          "purchase",
          "sales"
        ],
        "example": "sales"
      },
      "percentage": {
        "description": "The percentage to use when *calculation* is *percentage*",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "placement": {
        "description": "Currently not being used",
        "type": "string",
        "format": "string",
        "readOnly": true
      },
      "price": {
        "description": "The total price of the service",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "quantity": {
        "description": "Default quantity when the calculation is *per_unit*",
        "type": "number",
        "format": "double",
        "example": 1234567891234
      },
      "ref": {
        "description": "Alphanumeric reference code to be used for the service. Must be unique accross SKUs, Purchase services and Sales services",
        "type": "string",
        "format": "string",
        "example": "A string"
      },
      "show_button": {
        "description": "If a quick-create button should be shown in the toolbar on the order \nservice lines on the order view (not implemented yet)",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "unit": {
        "description": "The unit to used when the calculation is set to *per_unit*",
        "type": "string",
        "format": "string",
        "enum": [
          "pallet",
          "pcs",
          "hr",
          "colli",
          "m",
          "m2",
          "m3",
          "kg",
          "km"
        ],
        "example": "pcs"
      },
      "unit_price": {
        "description": "The unit price in the *currency* used when the calculation is set to *per_unit*",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "active": {
        "description": "Boolean indicating if the record is active and could be referenced from other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "tag_ids": {
        "description": "Tag ids related to the Service 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"
        }
      },
      "translations": {
        "description": "Translations of the Service entity. \nTranslations should be an object where the property name is the ISO 639-1 Code 2 letter language code and the value is the translation\nNotice that these will only be included if *translations* are included in the include parameter",
        "properties": {
          "da": {
            "type": "string",
            "format": "string",
            "example": "Rabat"
          },
          "de": {
            "type": "string",
            "format": "string",
            "example": "Rabatt"
          }
        },
        "type": "object"
      },
      "created_at": {
        "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "readOnly": true,
        "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",
        "readOnly": true,
        "example": "2020-01-01T13:25:32.312Z"
      }
    },
    "type": "object"
  },
  "type": "object"
}

406

not acceptable

500

internal server error

PUT /services/{serviceId}

Update existing Service

Description

Update the specified resource in storage.

Parameters (path)

Name Required Description Values
serviceId required Target Service.  

Request body

Description

Target Service.

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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
  "required": [
    "name",
    "line_text",
    "order_type",
    "calculation",
    "category",
    "ref"
  ],
  "properties": {
    "id": {
      "description": "Id of the Service record",
      "type": "string",
      "format": "uuid",
      "readOnly": true,
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "calculation": {
      "description": "How should the price be calculated by default for service lines using this service",
      "type": "string",
      "format": "string",
      "enum": [
        "fixed_price",
        "per_unit",
        "percentage",
        "percentage_2nd"
      ],
      "example": "per_unit"
    },
    "category": {
      "description": "The category that service lines should have by default when they use this service",
      "type": "string",
      "format": "string",
      "enum": [
        "analysis",
        "discount",
        "packaging",
        "freight",
        "labour",
        "machinery",
        "warehouse",
        "financial",
        "customs_duty",
        "purchase_price",
        "production",
        "overhead",
        "commission",
        "taxes",
        "other"
      ],
      "example": "discount"
    },
    "currency": {
      "description": "ISO 4217 Currency Codes 3 letter currency code. If this is different from the order currency, the exchange rate defined here will be used to convert the price to the order currency.",
      "type": "string",
      "format": "string",
      "example": "DKK"
    },
    "distribution_cost": {
      "description": "Cost of distribution. *Only relevant for sales-services*. Creates a budget line on the sales order.\nIf calculation is set to *per_unit* the cost will be multiplied with the quantity.\nThe cost is always in the local currency, and not the order currency",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "ean_unit": {
      "description": "EAN number of one unit",
      "type": "integer",
      "format": "int32",
      "example": 1234
    },
    "exchange_rate": {
      "description": "The exhcange rate to use, when service currency is different from the order currency",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "edi_unit_code": {
      "description": "Unit code used with edi",
      "type": "string",
      "format": "string",
      "example": "Super customer discount"
    },
    "line_text": {
      "description": "The line text to place on the service line by default",
      "type": "string",
      "format": "string",
      "example": "Super customer discount"
    },
    "locked": {
      "description": "If the service is locked it cannot be deleted. This usually happens when the service has been referenced on other entities",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "name": {
      "description": "Name of the service. Only used for internalt purposes. Never shown on documents",
      "type": "string",
      "format": "string",
      "example": "Super customer discount"
    },
    "order_type": {
      "description": "The order type where this should be used",
      "type": "string",
      "format": "string",
      "enum": [
        "purchase",
        "sales"
      ],
      "example": "sales"
    },
    "percentage": {
      "description": "The percentage to use when *calculation* is *percentage*",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "placement": {
      "description": "Currently not being used",
      "type": "string",
      "format": "string",
      "readOnly": true
    },
    "price": {
      "description": "The total price of the service",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "quantity": {
      "description": "Default quantity when the calculation is *per_unit*",
      "type": "number",
      "format": "double",
      "example": 1234567891234
    },
    "ref": {
      "description": "Alphanumeric reference code to be used for the service. Must be unique accross SKUs, Purchase services and Sales services",
      "type": "string",
      "format": "string",
      "example": "A string"
    },
    "show_button": {
      "description": "If a quick-create button should be shown in the toolbar on the order \nservice lines on the order view (not implemented yet)",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "unit": {
      "description": "The unit to used when the calculation is set to *per_unit*",
      "type": "string",
      "format": "string",
      "enum": [
        "pallet",
        "pcs",
        "hr",
        "colli",
        "m",
        "m2",
        "m3",
        "kg",
        "km"
      ],
      "example": "pcs"
    },
    "unit_price": {
      "description": "The unit price in the *currency* used when the calculation is set to *per_unit*",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "active": {
      "description": "Boolean indicating if the record is active and could be referenced from other entities",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "tag_ids": {
      "description": "Tag ids related to the Service 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"
      }
    },
    "translations": {
      "description": "Translations of the Service entity. \nTranslations should be an object where the property name is the ISO 639-1 Code 2 letter language code and the value is the translation\nNotice that these will only be included if *translations* are included in the include parameter",
      "properties": {
        "da": {
          "type": "string",
          "format": "string",
          "example": "Rabat"
        },
        "de": {
          "type": "string",
          "format": "string",
          "example": "Rabatt"
        }
      },
      "type": "object"
    },
    "created_at": {
      "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "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",
      "readOnly": true,
      "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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
  "properties": {
    "required": [
      "name",
      "line_text",
      "order_type",
      "calculation",
      "category",
      "ref"
    ],
    "properties": {
      "id": {
        "description": "Id of the Service record",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "calculation": {
        "description": "How should the price be calculated by default for service lines using this service",
        "type": "string",
        "format": "string",
        "enum": [
          "fixed_price",
          "per_unit",
          "percentage",
          "percentage_2nd"
        ],
        "example": "per_unit"
      },
      "category": {
        "description": "The category that service lines should have by default when they use this service",
        "type": "string",
        "format": "string",
        "enum": [
          "analysis",
          "discount",
          "packaging",
          "freight",
          "labour",
          "machinery",
          "warehouse",
          "financial",
          "customs_duty",
          "purchase_price",
          "production",
          "overhead",
          "commission",
          "taxes",
          "other"
        ],
        "example": "discount"
      },
      "currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code. If this is different from the order currency, the exchange rate defined here will be used to convert the price to the order currency.",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "distribution_cost": {
        "description": "Cost of distribution. *Only relevant for sales-services*. Creates a budget line on the sales order.\nIf calculation is set to *per_unit* the cost will be multiplied with the quantity.\nThe cost is always in the local currency, and not the order currency",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "ean_unit": {
        "description": "EAN number of one unit",
        "type": "integer",
        "format": "int32",
        "example": 1234
      },
      "exchange_rate": {
        "description": "The exhcange rate to use, when service currency is different from the order currency",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "edi_unit_code": {
        "description": "Unit code used with edi",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "line_text": {
        "description": "The line text to place on the service line by default",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "locked": {
        "description": "If the service is locked it cannot be deleted. This usually happens when the service has been referenced on other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "name": {
        "description": "Name of the service. Only used for internalt purposes. Never shown on documents",
        "type": "string",
        "format": "string",
        "example": "Super customer discount"
      },
      "order_type": {
        "description": "The order type where this should be used",
        "type": "string",
        "format": "string",
        "enum": [
          "purchase",
          "sales"
        ],
        "example": "sales"
      },
      "percentage": {
        "description": "The percentage to use when *calculation* is *percentage*",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "placement": {
        "description": "Currently not being used",
        "type": "string",
        "format": "string",
        "readOnly": true
      },
      "price": {
        "description": "The total price of the service",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "quantity": {
        "description": "Default quantity when the calculation is *per_unit*",
        "type": "number",
        "format": "double",
        "example": 1234567891234
      },
      "ref": {
        "description": "Alphanumeric reference code to be used for the service. Must be unique accross SKUs, Purchase services and Sales services",
        "type": "string",
        "format": "string",
        "example": "A string"
      },
      "show_button": {
        "description": "If a quick-create button should be shown in the toolbar on the order \nservice lines on the order view (not implemented yet)",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "unit": {
        "description": "The unit to used when the calculation is set to *per_unit*",
        "type": "string",
        "format": "string",
        "enum": [
          "pallet",
          "pcs",
          "hr",
          "colli",
          "m",
          "m2",
          "m3",
          "kg",
          "km"
        ],
        "example": "pcs"
      },
      "unit_price": {
        "description": "The unit price in the *currency* used when the calculation is set to *per_unit*",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "active": {
        "description": "Boolean indicating if the record is active and could be referenced from other entities",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "tag_ids": {
        "description": "Tag ids related to the Service 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"
        }
      },
      "translations": {
        "description": "Translations of the Service entity. \nTranslations should be an object where the property name is the ISO 639-1 Code 2 letter language code and the value is the translation\nNotice that these will only be included if *translations* are included in the include parameter",
        "properties": {
          "da": {
            "type": "string",
            "format": "string",
            "example": "Rabat"
          },
          "de": {
            "type": "string",
            "format": "string",
            "example": "Rabatt"
          }
        },
        "type": "object"
      },
      "created_at": {
        "description": "The time when the record was created in UTC date & time (Iso8601 ZuluString)",
        "type": "string",
        "format": "date-time",
        "readOnly": true,
        "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",
        "readOnly": true,
        "example": "2020-01-01T13:25:32.312Z"
      }
    },
    "type": "object"
  },
  "type": "object"
}

403

Unauthorized request

406

not acceptable

500

Internal server error

DELETE /services/{serviceId}

Delete Services

Description

Remove the specified resource from storage.

Parameters (path)

Name Required Description Values
serviceId required Target Service.  

Responses

204

The service was deleted

403

Unauthorized request

406

not acceptable

500

Internal server error