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

GET /partners/{partnerId}

Get partner

Description

Returns partner

Parameters (path)

Name Required Description Values
partnerId required Target partner.  

Parameters (query)

Name Required Description Values
include optional The resources that can be included in this request, delimited by a comma: locations, contacts, comments, price_list_sales, price_list_purchase, relations, tags, sku_partner_codes, comments_count, owned_by, latest_sales_delivery_date  

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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
{
  "properties": {
    "required": [
      "name",
      "country"
    ],
    "properties": {
      "id": {
        "description": "Id of the parter record",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "association_id": {
        "description": "Id of the branch association",
        "type": "string",
        "format": "string"
      },
      "association_member_id": {
        "description": "Id of membership within branch association",
        "type": "string",
        "format": "string"
      },
      "blocked": {
        "description": "If this partner is blocked - when blocked the partner can no longer be used on new orders",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "country": {
        "description": "ISO 3166-1 alpha-2 Country Code",
        "type": "string",
        "format": "string",
        "example": "DK"
      },
      "creditor_no": {
        "description": "Creidtor number in accounting system",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "customer_stage": {
        "description": "Customer life cycle stage of the partner\n- *active*: The partner is considered an active customer\n- *discovery*: The partner has not been qualified as a lead yet\n- *lead*: The partner has qualified as a lead that might have an interest in the UVP\n- *opportunity*: The partner has qualified as an oppertunity that does have an interest in the UVP\n- *prospect*: A concrete oppertunity have been identified and offered to the partner\n- *closed_lost*: The partner is not considered a potential customer at all",
        "type": "string",
        "format": "string",
        "default": "active",
        "enum": [
          "active",
          "discovery",
          "lead",
          "opportunity",
          "prospect",
          "closed_lost"
        ],
        "example": "discovery"
      },
      "debtor_balance": {
        "description": "The current debtor balance from a connected accounting system",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "debtor_balance_source": {
        "description": "Where the debtor balance came from",
        "type": "string",
        "format": "string",
        "example": "economic"
      },
      "debtor_balance_updated_at": {
        "description": "When the debitor balance was last updated",
        "type": "string",
        "format": "date-time",
        "readOnly": true,
        "example": "2019-01-01T13:25:32.312Z"
      },
      "debtor_no": {
        "description": "Debtor number in accounting system",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "default_location_id": {
        "description": "Id of the partner location that should be selected by default when a new order is created",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "delivery_term_incoterm": {
        "description": "The default delivery incoterm to put on orders.",
        "type": "string",
        "format": "string",
        "enum": [
          "Ex Works",
          "FCA",
          "FAS",
          "FOB",
          "CFR",
          "CIF",
          "CPT",
          "CIP",
          "DAT",
          "DAP",
          "DDP"
        ],
        "example": "FOB"
      },
      "delivery_term_text": {
        "description": "A default standalone delivery term text or a text to displayed with the selected incoterm",
        "type": "string",
        "format": "string",
        "example": "Hamburg"
      },
      "einvoice_id": {
        "description": "E-invoicing id - used for electronic invoicing in some countries",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "email": {
        "description": "A valid e-mail address",
        "type": "string",
        "format": "email",
        "example": "test@test.test"
      },
      "eori": {
        "description": "Economic Operators Registration and Identification number (EORI)",
        "type": "string",
        "format": "string",
        "example": "DK00000000"
      },
      "fax": {
        "description": "Fax number of the partner",
        "type": "string",
        "format": "string",
        "example": "+45 00000000"
      },
      "free_text_1": {
        "description": "Free text value 1",
        "type": "string",
        "format": "string",
        "example": "abc"
      },
      "free_text_2": {
        "description": "Free text value 2",
        "type": "string",
        "format": "string",
        "example": "def"
      },
      "hide_traceability": {
        "description": "If this partner should not see traceability information on documents by default.",
        "type": "boolean",
        "format": "boolean",
        "default": false,
        "example": true
      },
      "invoice_action": {
        "description": "The default invoice action to use for this partner right after an invoice has been created\n- *email*: Open a modal that allows the user to send the invoice as an email\n- *goto*: Go to the invoice page in tracezilla\n- *pdf*: Show a PDF of the invoice\n- *integration.b2bbackbone*: Send the invoice through the b2bbackbone EDI network",
        "type": "string",
        "format": "string",
        "enum": [
          "goto",
          "pdf",
          "email",
          "integration.b2bbackbone"
        ],
        "example": "email"
      },
      "is_reseller": {
        "description": "If this partner is a reseller. When the partner is set as a customer or invoice-to on a sales order\nthe logo and partner info will be used as sender info",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "language": {
        "description": "ISO 639-1 Code 2 letter language code",
        "type": "string",
        "format": "string",
        "example": "da"
      },
      "locked": {
        "description": "If this partner is locked. Usually because other entities reference the partner. When the partner is locked it cannot be deleted.",
        "type": "boolean",
        "format": "boolean",
        "default": false,
        "readOnly": true,
        "example": true
      },
      "logo": {
        "description": "Filename of logo",
        "type": "string",
        "format": "string",
        "readOnly": true,
        "example": "xyz.png"
      },
      "name": {
        "description": "The name of the partner",
        "type": "string",
        "format": "string",
        "example": "Acme Inc"
      },
      "number": {
        "description": "Auto-incrementing number set by the system",
        "type": "integer",
        "format": "int32",
        "readOnly": true,
        "example": 1234
      },
      "owned_by_id": {
        "description": "Id of the user that owns the partner. Will be used for orders.",
        "type": "integer",
        "format": "int32",
        "example": 1234
      },
      "payment_term_days": {
        "description": "Days of credit",
        "type": "integer",
        "format": "int32",
        "example": 8
      },
      "payment_term_method": {
        "description": "The default payment term of the partner\n- *days*: Days from the *delivery date* of the order (*pickup date* for *Ex Works* orders)\n- *month_days*: Days from beginning of next month\n- *week_mon_days*: Days from coming week (week starting on mondays)\n- *week_sun_days*: Days from coming week (week starting on sundays)\n- *pia*: Payment in advance - specify a due date\n- *custom*: A due date will need to be specified manualle each time an order or invoice is created",
        "type": "string",
        "format": "string",
        "default": "custom",
        "enum": [
          "days",
          "month_days",
          "week_mon_days",
          "week_sun_days",
          "pia",
          "custom"
        ],
        "example": "days"
      },
      "payment_term_text": {
        "description": "A description to use when the custom payment term has been selected",
        "type": "string",
        "format": "string",
        "example": "50 percent up front. Rest upon delivery"
      },
      "phone": {
        "description": "The primary phone number of the partner",
        "type": "string",
        "format": "string",
        "example": "+45 00 00 00 00"
      },
      "price_list_purchase_id": {
        "description": "A reference to the purchase price list that should be used for purchase and production orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "price_list_sales_id": {
        "description": "A reference to the sales price list that should be used for sales orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "ref": {
        "description": "A reference code for this partner that can be used to identify the partner accross applications.",
        "type": "string",
        "format": "string",
        "example": "BD01"
      },
      "parent_id": {
        "description": "Id of the parent partner record",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "replaced_by_id": {
        "description": "Is this partner is blocked a reference to a replacement partner can be specified in this field.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "req_days_expiry": {
        "description": "Expiry days requirement",
        "type": "integer",
        "format": "int32",
        "example": 8
      },
      "retail_price_currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code. Retail prices on the skus in this currency will be shown on documents.\nLeave empty to not show retail prices",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "type": {
        "description": "The type of partner",
        "type": "string",
        "format": "string",
        "default": "organization",
        "enum": [
          "organization",
          "person",
          "umbrella"
        ],
        "example": "organization"
      },
      "vat_id": {
        "description": "The VAT id of the partner",
        "type": "string",
        "format": "string",
        "example": "DK 00000000"
      },
      "vat_id_validated": {
        "description": "When the VAT id was last validated",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "vat_id_validated_at": {
        "description": "When the VAT id was last validated",
        "type": "string",
        "format": "date-time",
        "example": "2019-01-01T13:25:32.312Z"
      },
      "www": {
        "description": "The official webpage of the partner. Must be a correctly formatted http or https address",
        "type": "string",
        "format": "string",
        "example": "https://www.tracezilla.com"
      },
      "tag_ids": {
        "description": "Tag ids related to the partner model. \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"
        }
      },
      "relations": {
        "description": "Relations defines the default partners and locations that should be selected for the *invoice_to*, *forwarder*, *pickup_from* and *deliver_to* roles on orders when this partner is selected as the primary partner on the order, eg. *supplier*, *customer*, *producer*.\nNotice that these will only be included if *relations* have been passed to the include parameter\n\nIf no relations have been defined the order will fall back to the relations set on the partner that is owned by the tracezilla organisation",
        "type": "array",
        "items": {
          "properties": {
            "order_type": {
              "description": "if left empty this rule will apply to all order types",
              "type": "string",
              "format": "string",
              "enum": [
                "sales",
                "purchase",
                "warehouse",
                "production"
              ],
              "example": "sales"
            },
            "role": {
              "type": "string",
              "format": "string",
              "enum": [
                "invoice_to",
                "pickup_from",
                "deliver_to",
                "forwarder"
              ],
              "example": "invoice_to"
            },
            "partner_id": {
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "location_id": {
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            }
          },
          "type": "object"
        }
      },
      "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 /partners/{partnerId}

Update existing partner

Description

Create a new partner

Parameters (path)

Name Required Description Values
partnerId required Target partner.  

Request body

Description

Target partner.

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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
{
  "required": [
    "name",
    "country"
  ],
  "properties": {
    "id": {
      "description": "Id of the parter record",
      "type": "string",
      "format": "uuid",
      "readOnly": true,
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "association_id": {
      "description": "Id of the branch association",
      "type": "string",
      "format": "string"
    },
    "association_member_id": {
      "description": "Id of membership within branch association",
      "type": "string",
      "format": "string"
    },
    "blocked": {
      "description": "If this partner is blocked - when blocked the partner can no longer be used on new orders",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "country": {
      "description": "ISO 3166-1 alpha-2 Country Code",
      "type": "string",
      "format": "string",
      "example": "DK"
    },
    "creditor_no": {
      "description": "Creidtor number in accounting system",
      "type": "string",
      "format": "string",
      "example": "123ABC"
    },
    "currency": {
      "description": "ISO 4217 Currency Codes 3 letter currency code",
      "type": "string",
      "format": "string",
      "example": "DKK"
    },
    "customer_stage": {
      "description": "Customer life cycle stage of the partner\n- *active*: The partner is considered an active customer\n- *discovery*: The partner has not been qualified as a lead yet\n- *lead*: The partner has qualified as a lead that might have an interest in the UVP\n- *opportunity*: The partner has qualified as an oppertunity that does have an interest in the UVP\n- *prospect*: A concrete oppertunity have been identified and offered to the partner\n- *closed_lost*: The partner is not considered a potential customer at all",
      "type": "string",
      "format": "string",
      "default": "active",
      "enum": [
        "active",
        "discovery",
        "lead",
        "opportunity",
        "prospect",
        "closed_lost"
      ],
      "example": "discovery"
    },
    "debtor_balance": {
      "description": "The current debtor balance from a connected accounting system",
      "type": "number",
      "format": "double",
      "example": 1234.123
    },
    "debtor_balance_source": {
      "description": "Where the debtor balance came from",
      "type": "string",
      "format": "string",
      "example": "economic"
    },
    "debtor_balance_updated_at": {
      "description": "When the debitor balance was last updated",
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "example": "2019-01-01T13:25:32.312Z"
    },
    "debtor_no": {
      "description": "Debtor number in accounting system",
      "type": "string",
      "format": "string",
      "example": "123ABC"
    },
    "default_location_id": {
      "description": "Id of the partner location that should be selected by default when a new order is created",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "delivery_term_incoterm": {
      "description": "The default delivery incoterm to put on orders.",
      "type": "string",
      "format": "string",
      "enum": [
        "Ex Works",
        "FCA",
        "FAS",
        "FOB",
        "CFR",
        "CIF",
        "CPT",
        "CIP",
        "DAT",
        "DAP",
        "DDP"
      ],
      "example": "FOB"
    },
    "delivery_term_text": {
      "description": "A default standalone delivery term text or a text to displayed with the selected incoterm",
      "type": "string",
      "format": "string",
      "example": "Hamburg"
    },
    "einvoice_id": {
      "description": "E-invoicing id - used for electronic invoicing in some countries",
      "type": "string",
      "format": "string",
      "example": "123ABC"
    },
    "email": {
      "description": "A valid e-mail address",
      "type": "string",
      "format": "email",
      "example": "test@test.test"
    },
    "eori": {
      "description": "Economic Operators Registration and Identification number (EORI)",
      "type": "string",
      "format": "string",
      "example": "DK00000000"
    },
    "fax": {
      "description": "Fax number of the partner",
      "type": "string",
      "format": "string",
      "example": "+45 00000000"
    },
    "free_text_1": {
      "description": "Free text value 1",
      "type": "string",
      "format": "string",
      "example": "abc"
    },
    "free_text_2": {
      "description": "Free text value 2",
      "type": "string",
      "format": "string",
      "example": "def"
    },
    "hide_traceability": {
      "description": "If this partner should not see traceability information on documents by default.",
      "type": "boolean",
      "format": "boolean",
      "default": false,
      "example": true
    },
    "invoice_action": {
      "description": "The default invoice action to use for this partner right after an invoice has been created\n- *email*: Open a modal that allows the user to send the invoice as an email\n- *goto*: Go to the invoice page in tracezilla\n- *pdf*: Show a PDF of the invoice\n- *integration.b2bbackbone*: Send the invoice through the b2bbackbone EDI network",
      "type": "string",
      "format": "string",
      "enum": [
        "goto",
        "pdf",
        "email",
        "integration.b2bbackbone"
      ],
      "example": "email"
    },
    "is_reseller": {
      "description": "If this partner is a reseller. When the partner is set as a customer or invoice-to on a sales order\nthe logo and partner info will be used as sender info",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "language": {
      "description": "ISO 639-1 Code 2 letter language code",
      "type": "string",
      "format": "string",
      "example": "da"
    },
    "locked": {
      "description": "If this partner is locked. Usually because other entities reference the partner. When the partner is locked it cannot be deleted.",
      "type": "boolean",
      "format": "boolean",
      "default": false,
      "readOnly": true,
      "example": true
    },
    "logo": {
      "description": "Filename of logo",
      "type": "string",
      "format": "string",
      "readOnly": true,
      "example": "xyz.png"
    },
    "name": {
      "description": "The name of the partner",
      "type": "string",
      "format": "string",
      "example": "Acme Inc"
    },
    "number": {
      "description": "Auto-incrementing number set by the system",
      "type": "integer",
      "format": "int32",
      "readOnly": true,
      "example": 1234
    },
    "owned_by_id": {
      "description": "Id of the user that owns the partner. Will be used for orders.",
      "type": "integer",
      "format": "int32",
      "example": 1234
    },
    "payment_term_days": {
      "description": "Days of credit",
      "type": "integer",
      "format": "int32",
      "example": 8
    },
    "payment_term_method": {
      "description": "The default payment term of the partner\n- *days*: Days from the *delivery date* of the order (*pickup date* for *Ex Works* orders)\n- *month_days*: Days from beginning of next month\n- *week_mon_days*: Days from coming week (week starting on mondays)\n- *week_sun_days*: Days from coming week (week starting on sundays)\n- *pia*: Payment in advance - specify a due date\n- *custom*: A due date will need to be specified manualle each time an order or invoice is created",
      "type": "string",
      "format": "string",
      "default": "custom",
      "enum": [
        "days",
        "month_days",
        "week_mon_days",
        "week_sun_days",
        "pia",
        "custom"
      ],
      "example": "days"
    },
    "payment_term_text": {
      "description": "A description to use when the custom payment term has been selected",
      "type": "string",
      "format": "string",
      "example": "50 percent up front. Rest upon delivery"
    },
    "phone": {
      "description": "The primary phone number of the partner",
      "type": "string",
      "format": "string",
      "example": "+45 00 00 00 00"
    },
    "price_list_purchase_id": {
      "description": "A reference to the purchase price list that should be used for purchase and production orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "price_list_sales_id": {
      "description": "A reference to the sales price list that should be used for sales orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "ref": {
      "description": "A reference code for this partner that can be used to identify the partner accross applications.",
      "type": "string",
      "format": "string",
      "example": "BD01"
    },
    "parent_id": {
      "description": "Id of the parent partner record",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "replaced_by_id": {
      "description": "Is this partner is blocked a reference to a replacement partner can be specified in this field.",
      "type": "string",
      "format": "uuid",
      "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
    },
    "req_days_expiry": {
      "description": "Expiry days requirement",
      "type": "integer",
      "format": "int32",
      "example": 8
    },
    "retail_price_currency": {
      "description": "ISO 4217 Currency Codes 3 letter currency code. Retail prices on the skus in this currency will be shown on documents.\nLeave empty to not show retail prices",
      "type": "string",
      "format": "string",
      "example": "DKK"
    },
    "type": {
      "description": "The type of partner",
      "type": "string",
      "format": "string",
      "default": "organization",
      "enum": [
        "organization",
        "person",
        "umbrella"
      ],
      "example": "organization"
    },
    "vat_id": {
      "description": "The VAT id of the partner",
      "type": "string",
      "format": "string",
      "example": "DK 00000000"
    },
    "vat_id_validated": {
      "description": "When the VAT id was last validated",
      "type": "boolean",
      "format": "boolean",
      "example": true
    },
    "vat_id_validated_at": {
      "description": "When the VAT id was last validated",
      "type": "string",
      "format": "date-time",
      "example": "2019-01-01T13:25:32.312Z"
    },
    "www": {
      "description": "The official webpage of the partner. Must be a correctly formatted http or https address",
      "type": "string",
      "format": "string",
      "example": "https://www.tracezilla.com"
    },
    "tag_ids": {
      "description": "Tag ids related to the partner model. \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"
      }
    },
    "relations": {
      "description": "Relations defines the default partners and locations that should be selected for the *invoice_to*, *forwarder*, *pickup_from* and *deliver_to* roles on orders when this partner is selected as the primary partner on the order, eg. *supplier*, *customer*, *producer*.\nNotice that these will only be included if *relations* have been passed to the include parameter\n\nIf no relations have been defined the order will fall back to the relations set on the partner that is owned by the tracezilla organisation",
      "type": "array",
      "items": {
        "properties": {
          "order_type": {
            "description": "if left empty this rule will apply to all order types",
            "type": "string",
            "format": "string",
            "enum": [
              "sales",
              "purchase",
              "warehouse",
              "production"
            ],
            "example": "sales"
          },
          "role": {
            "type": "string",
            "format": "string",
            "enum": [
              "invoice_to",
              "pickup_from",
              "deliver_to",
              "forwarder"
            ],
            "example": "invoice_to"
          },
          "partner_id": {
            "type": "string",
            "format": "uuid",
            "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
          }
        },
        "type": "object"
      }
    },
    "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
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
{
  "properties": {
    "required": [
      "name",
      "country"
    ],
    "properties": {
      "id": {
        "description": "Id of the parter record",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "association_id": {
        "description": "Id of the branch association",
        "type": "string",
        "format": "string"
      },
      "association_member_id": {
        "description": "Id of membership within branch association",
        "type": "string",
        "format": "string"
      },
      "blocked": {
        "description": "If this partner is blocked - when blocked the partner can no longer be used on new orders",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "country": {
        "description": "ISO 3166-1 alpha-2 Country Code",
        "type": "string",
        "format": "string",
        "example": "DK"
      },
      "creditor_no": {
        "description": "Creidtor number in accounting system",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "customer_stage": {
        "description": "Customer life cycle stage of the partner\n- *active*: The partner is considered an active customer\n- *discovery*: The partner has not been qualified as a lead yet\n- *lead*: The partner has qualified as a lead that might have an interest in the UVP\n- *opportunity*: The partner has qualified as an oppertunity that does have an interest in the UVP\n- *prospect*: A concrete oppertunity have been identified and offered to the partner\n- *closed_lost*: The partner is not considered a potential customer at all",
        "type": "string",
        "format": "string",
        "default": "active",
        "enum": [
          "active",
          "discovery",
          "lead",
          "opportunity",
          "prospect",
          "closed_lost"
        ],
        "example": "discovery"
      },
      "debtor_balance": {
        "description": "The current debtor balance from a connected accounting system",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "debtor_balance_source": {
        "description": "Where the debtor balance came from",
        "type": "string",
        "format": "string",
        "example": "economic"
      },
      "debtor_balance_updated_at": {
        "description": "When the debitor balance was last updated",
        "type": "string",
        "format": "date-time",
        "readOnly": true,
        "example": "2019-01-01T13:25:32.312Z"
      },
      "debtor_no": {
        "description": "Debtor number in accounting system",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "default_location_id": {
        "description": "Id of the partner location that should be selected by default when a new order is created",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "delivery_term_incoterm": {
        "description": "The default delivery incoterm to put on orders.",
        "type": "string",
        "format": "string",
        "enum": [
          "Ex Works",
          "FCA",
          "FAS",
          "FOB",
          "CFR",
          "CIF",
          "CPT",
          "CIP",
          "DAT",
          "DAP",
          "DDP"
        ],
        "example": "FOB"
      },
      "delivery_term_text": {
        "description": "A default standalone delivery term text or a text to displayed with the selected incoterm",
        "type": "string",
        "format": "string",
        "example": "Hamburg"
      },
      "einvoice_id": {
        "description": "E-invoicing id - used for electronic invoicing in some countries",
        "type": "string",
        "format": "string",
        "example": "123ABC"
      },
      "email": {
        "description": "A valid e-mail address",
        "type": "string",
        "format": "email",
        "example": "test@test.test"
      },
      "eori": {
        "description": "Economic Operators Registration and Identification number (EORI)",
        "type": "string",
        "format": "string",
        "example": "DK00000000"
      },
      "fax": {
        "description": "Fax number of the partner",
        "type": "string",
        "format": "string",
        "example": "+45 00000000"
      },
      "free_text_1": {
        "description": "Free text value 1",
        "type": "string",
        "format": "string",
        "example": "abc"
      },
      "free_text_2": {
        "description": "Free text value 2",
        "type": "string",
        "format": "string",
        "example": "def"
      },
      "hide_traceability": {
        "description": "If this partner should not see traceability information on documents by default.",
        "type": "boolean",
        "format": "boolean",
        "default": false,
        "example": true
      },
      "invoice_action": {
        "description": "The default invoice action to use for this partner right after an invoice has been created\n- *email*: Open a modal that allows the user to send the invoice as an email\n- *goto*: Go to the invoice page in tracezilla\n- *pdf*: Show a PDF of the invoice\n- *integration.b2bbackbone*: Send the invoice through the b2bbackbone EDI network",
        "type": "string",
        "format": "string",
        "enum": [
          "goto",
          "pdf",
          "email",
          "integration.b2bbackbone"
        ],
        "example": "email"
      },
      "is_reseller": {
        "description": "If this partner is a reseller. When the partner is set as a customer or invoice-to on a sales order\nthe logo and partner info will be used as sender info",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "language": {
        "description": "ISO 639-1 Code 2 letter language code",
        "type": "string",
        "format": "string",
        "example": "da"
      },
      "locked": {
        "description": "If this partner is locked. Usually because other entities reference the partner. When the partner is locked it cannot be deleted.",
        "type": "boolean",
        "format": "boolean",
        "default": false,
        "readOnly": true,
        "example": true
      },
      "logo": {
        "description": "Filename of logo",
        "type": "string",
        "format": "string",
        "readOnly": true,
        "example": "xyz.png"
      },
      "name": {
        "description": "The name of the partner",
        "type": "string",
        "format": "string",
        "example": "Acme Inc"
      },
      "number": {
        "description": "Auto-incrementing number set by the system",
        "type": "integer",
        "format": "int32",
        "readOnly": true,
        "example": 1234
      },
      "owned_by_id": {
        "description": "Id of the user that owns the partner. Will be used for orders.",
        "type": "integer",
        "format": "int32",
        "example": 1234
      },
      "payment_term_days": {
        "description": "Days of credit",
        "type": "integer",
        "format": "int32",
        "example": 8
      },
      "payment_term_method": {
        "description": "The default payment term of the partner\n- *days*: Days from the *delivery date* of the order (*pickup date* for *Ex Works* orders)\n- *month_days*: Days from beginning of next month\n- *week_mon_days*: Days from coming week (week starting on mondays)\n- *week_sun_days*: Days from coming week (week starting on sundays)\n- *pia*: Payment in advance - specify a due date\n- *custom*: A due date will need to be specified manualle each time an order or invoice is created",
        "type": "string",
        "format": "string",
        "default": "custom",
        "enum": [
          "days",
          "month_days",
          "week_mon_days",
          "week_sun_days",
          "pia",
          "custom"
        ],
        "example": "days"
      },
      "payment_term_text": {
        "description": "A description to use when the custom payment term has been selected",
        "type": "string",
        "format": "string",
        "example": "50 percent up front. Rest upon delivery"
      },
      "phone": {
        "description": "The primary phone number of the partner",
        "type": "string",
        "format": "string",
        "example": "+45 00 00 00 00"
      },
      "price_list_purchase_id": {
        "description": "A reference to the purchase price list that should be used for purchase and production orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "price_list_sales_id": {
        "description": "A reference to the sales price list that should be used for sales orders.\nIf a value have been specified in this field, prices from global price lists will no longer be used.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "ref": {
        "description": "A reference code for this partner that can be used to identify the partner accross applications.",
        "type": "string",
        "format": "string",
        "example": "BD01"
      },
      "parent_id": {
        "description": "Id of the parent partner record",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "replaced_by_id": {
        "description": "Is this partner is blocked a reference to a replacement partner can be specified in this field.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "req_days_expiry": {
        "description": "Expiry days requirement",
        "type": "integer",
        "format": "int32",
        "example": 8
      },
      "retail_price_currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code. Retail prices on the skus in this currency will be shown on documents.\nLeave empty to not show retail prices",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "type": {
        "description": "The type of partner",
        "type": "string",
        "format": "string",
        "default": "organization",
        "enum": [
          "organization",
          "person",
          "umbrella"
        ],
        "example": "organization"
      },
      "vat_id": {
        "description": "The VAT id of the partner",
        "type": "string",
        "format": "string",
        "example": "DK 00000000"
      },
      "vat_id_validated": {
        "description": "When the VAT id was last validated",
        "type": "boolean",
        "format": "boolean",
        "example": true
      },
      "vat_id_validated_at": {
        "description": "When the VAT id was last validated",
        "type": "string",
        "format": "date-time",
        "example": "2019-01-01T13:25:32.312Z"
      },
      "www": {
        "description": "The official webpage of the partner. Must be a correctly formatted http or https address",
        "type": "string",
        "format": "string",
        "example": "https://www.tracezilla.com"
      },
      "tag_ids": {
        "description": "Tag ids related to the partner model. \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"
        }
      },
      "relations": {
        "description": "Relations defines the default partners and locations that should be selected for the *invoice_to*, *forwarder*, *pickup_from* and *deliver_to* roles on orders when this partner is selected as the primary partner on the order, eg. *supplier*, *customer*, *producer*.\nNotice that these will only be included if *relations* have been passed to the include parameter\n\nIf no relations have been defined the order will fall back to the relations set on the partner that is owned by the tracezilla organisation",
        "type": "array",
        "items": {
          "properties": {
            "order_type": {
              "description": "if left empty this rule will apply to all order types",
              "type": "string",
              "format": "string",
              "enum": [
                "sales",
                "purchase",
                "warehouse",
                "production"
              ],
              "example": "sales"
            },
            "role": {
              "type": "string",
              "format": "string",
              "enum": [
                "invoice_to",
                "pickup_from",
                "deliver_to",
                "forwarder"
              ],
              "example": "invoice_to"
            },
            "partner_id": {
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "location_id": {
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            }
          },
          "type": "object"
        }
      },
      "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

422

Has validation errors

500

Internal server error

DELETE /partners/{partnerId}

Delete partner

Description

Remove the specified resource from storage.

Parameters (path)

Name Required Description Values
partnerId required Id of partner.  

Responses

204

Delete was succesfull

403

Unauthorized request

406

not acceptable

500

Internal server error