This page was automatically generated from tracezilla’s Swagger API documentation 2026-06-04

PUT /invoices/{invoiceId}/status

Update status of existing orderInvoice

Parameters (path)

Name Required Description Values
invoiceId required Target Order Invoice.  

Request body

Description

Data to store.

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
{
  "properties": {
    "status": {
      "description": "Set the new status of an invoice",
      "type": "string",
      "format": "string",
      "enum": [
        "pending",
        "partially_paid",
        "paid",
        "overpaid",
        "written_off"
      ],
      "example": "paid"
    },
    "exchange_rate": {
      "description": "Set the final exchange rate of the invoice. Leave out to have the exchange rate untouched",
      "format": "double",
      "example": 100
    }
  },
  "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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
{
  "properties": {
    "required": [
      "order_id",
      "currency",
      "customer_id",
      "customer_location_id",
      "exchange_rate",
      "delivery_selection",
      "invoice_date",
      "payment_date",
      "payment_term_method",
      "payment_term_text",
      "payment_term_days"
    ],
    "properties": {
      "id": {
        "description": "Id of the invoice",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "contact_id": {
        "description": "Id of the partner contact to be used on the order",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "created_by_id": {
        "description": "Id of the user that created the order",
        "type": "integer",
        "format": "int32",
        "readOnly": true,
        "example": 1234
      },
      "credit_note_id": {
        "description": "Id of full credit not if any",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "currency": {
        "description": "ISO 4217 Currency Codes 3 letter currency code. This field is required if the *order_id* field has been omitted.",
        "type": "string",
        "format": "string",
        "example": "DKK"
      },
      "customer_country": {
        "description": "Country of the customer. Used for VAT rules",
        "type": "string",
        "format": "string",
        "readOnly": true,
        "example": "A string"
      },
      "customer_id": {
        "description": "Reference to the partner of the customer. This must be set if the *order_id* has not been set. Will create a collected invoice of all orders pending invoice for the selected customer.\nNotice that you will also have to set the currency attribute.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "customer_location_id": {
        "description": "Reference to the partner location of the customer. Will need to be set if *order_id* has been omitted.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "delivery_selection": {
        "description": "How delivery should be handled when creating the invoice. (Uninvoiced service lines will always be invoiced)\n- *deliver_order*: Deliver everything on the order and invoice everything uninvoiced.\n- *delivered*: Only invoice uninvoiced lot lines that have been delivered.\n- *all*: Invoice everything uninvoiced on the delivery, regardless of the delivery status. Do not deliver.",
        "type": "string",
        "format": "string",
        "enum": [
          "deliver_order",
          "delivered",
          "all"
        ],
        "example": "A string"
      },
      "department_code": {
        "description": "Department code.",
        "type": "string",
        "format": "string",
        "example": "ABC32324"
      },
      "credit_reason": {
        "description": "Credit reason GS1",
        "type": "string",
        "format": "string",
        "enum": [
          "108",
          "140",
          "141",
          "79E",
          "Z01",
          "Z02",
          "Z03",
          "Z04"
        ],
        "example": "108"
      },
      "exchange_rate": {
        "description": "The exchange rate to use for the invoice",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "ext_ref": {
        "description": "Customer reference",
        "type": "string",
        "format": "string",
        "example": "A string"
      },
      "gl_journal_id": {
        "description": "Id if gl journal",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "invoice_date": {
        "description": "The invoice date",
        "type": "string",
        "format": "date",
        "example": "2025-12-01"
      },
      "posting_date": {
        "description": "Posting date if different from invoice date",
        "type": "string",
        "format": "date",
        "example": "2025-12-14"
      },
      "last_sent_at": {
        "description": "When this invoice was last sent",
        "type": "string",
        "format": "date-time",
        "readOnly": true,
        "example": "2019-01-01T13:25:32.312Z"
      },
      "last_sent_by_id": {
        "description": "Id of the user that sent the invoice",
        "type": "integer",
        "format": "int32",
        "readOnly": true,
        "example": 1234
      },
      "last_sent_note": {
        "description": "Notes related to the last send of the invoice",
        "type": "string",
        "format": "string",
        "readOnly": true,
        "example": "A string"
      },
      "last_sent_using": {
        "description": "How this invoice was last sent",
        "type": "string",
        "format": "string",
        "readOnly": true,
        "example": "A string"
      },
      "locked": {
        "description": "If the invoice is locked and cannot be deleted",
        "type": "boolean",
        "format": "boolean",
        "readOnly": true,
        "example": true
      },
      "number": {
        "description": "Number of the invoice",
        "type": "integer",
        "format": "int32",
        "readOnly": true,
        "example": 1234
      },
      "ocr": {
        "description": "OCR string on the invoice",
        "type": "string",
        "format": "string",
        "example": "34"
      },
      "order_id": {
        "description": "Id of the order to invoice. This field is required unless the *customer_id, customer_location_id and currency* fields have been set.",
        "type": "string",
        "format": "uuid",
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "order_type": {
        "description": "Order type when doing collective invoicing. Will limit the invoicing to this specific order type",
        "type": "string",
        "format": "string",
        "example": "sales"
      },
      "payment_method_id": {
        "description": "Id of the partner payment method",
        "type": "string",
        "format": "uuid",
        "readOnly": true,
        "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
      },
      "payment_date": {
        "description": "The due date of the invoice",
        "type": "string",
        "format": "date",
        "example": "2019-01-01"
      },
      "payment_term_days": {
        "description": "Days of credit",
        "type": "integer",
        "format": "int32",
        "example": 1234
      },
      "payment_term_method": {
        "description": "The payment term on the order\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": "Text to use when the *payment_term_method* is set to custom",
        "type": "string",
        "format": "string",
        "example": "A string"
      },
      "status": {
        "description": "The status of the invoice. If different from *draft* and the invoice have not yet been booked, the invoice will be booked,",
        "type": "string",
        "format": "string",
        "enum": [
          "draft",
          "pending",
          "booking",
          "paid",
          "partially_paid",
          "overpaid",
          "written_off"
        ],
        "example": "pending"
      },
      "remark": {
        "description": "A remark for the invoice. Notice that *remark* have to be in the *include* parameter, for this data to be loaded\nwith the request",
        "type": "string",
        "format": "string",
        "example": "A comment on the order"
      },
      "invoice_sub_total": {
        "description": "Invoice sub total as shown on document",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "invoice_vats_total": {
        "description": "Invoice vats as shown on document",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "invoice_total": {
        "description": "Invoice total as shown on document",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "invoice_rounding_correction": {
        "description": "The rounding correction that was applied to the invoice total before rounding",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "cogs_actual_total": {
        "description": "Actual COGS calculated from expenses and overhead budgets.\ncogs_actual* need to parsed with *include* to have this in the response.\nOnly relevant if the actual cost pricing flow is used.",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "cogs_budget_total": {
        "description": "Budgetted COGS.\ncogs_budget* need to parsed with *include* to have this in the response.",
        "type": "number",
        "format": "double",
        "example": 1234.123
      },
      "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"
      },
      "send_by_email": {
        "description": "If the invoice should be send by email upon creation. Will send the mail upon creation",
        "type": "boolean",
        "format": "boolean",
        "readOnly": false,
        "writeOnly": true,
        "example": true
      },
      "send_by_edi": {
        "description": "If the invoice should be send by EDI through the accounting system after creation.\nThis feature requires that your connected accounting system supports electronic invoices",
        "type": "boolean",
        "format": "boolean",
        "readOnly": false,
        "writeOnly": true,
        "example": true
      },
      "edi_error": {
        "description": "This will contain an error message if there was a problem sending the electronic invoice",
        "type": "string",
        "format": "string",
        "readOnly": true
      },
      "lines_extract": {
        "description": "Extract of both order lot lines and service lines merged into one array.\nTo have this in the response you must include *lines_extract* in the *include*-parameter",
        "type": "array",
        "items": {
          "properties": {
            "id": {
              "description": "Id of the record",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "calculation": {
              "description": "The calculation method used for the invoice line",
              "type": "string",
              "format": "string",
              "example": "per_unit"
            },
            "category": {
              "description": "Category of the line. Primarily used with the service lines",
              "type": "string",
              "format": "string",
              "example": "financial"
            },
            "customer_edi_unit": {
              "description": "EDI unit code preferred by the customer",
              "type": "string",
              "format": "string",
              "example": "EA"
            },
            "customer_line_number": {
              "description": "Customer line number from sales order",
              "format": "",
              "example": ""
            },
            "customer_order_ean": {
              "description": "The ean number used by the customer",
              "type": "string",
              "format": "string",
              "example": "The gtin number send by the customer when ordering the item"
            },
            "customer_partner_id": {
              "description": "Id of customer partner of the customer on the order. Not the invoice to partner of the invoice!",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "customer_location_id": {
              "description": "Id of customer location of the customer on the order. Not the invoice to location of the invoice!",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "deliver_to_location_id": {
              "description": "The id of the deliver to location. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "deliver_to_partner_id": {
              "description": "The id of the deliver to partner. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "delivery_date": {
              "description": "The delivery date. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "date",
              "example": "2019-01-01"
            },
            "delivery_id": {
              "description": "Id of the delivery",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "delivery_lot_id": {
              "description": "Id of the lot line on the actual delivery",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "delivery_number": {
              "description": "Number of the delivery",
              "type": "integer",
              "format": "int32",
              "example": 1234
            },
            "delivery_term_incoterm": {
              "description": "Incoterm on the delivery",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "delivery_term_text": {
              "description": "Delivery term text",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "forwarder_location_id": {
              "description": "The id of the forwarder location. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "forwarder_partner_id": {
              "description": "The id of the forwarder partner. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "free_units": {
              "description": "Number of free units given on this invoice line",
              "type": "integer",
              "format": "int32",
              "example": 1234
            },
            "line_cogs_expected": {
              "description": "Line COGS expected",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "line_cogs_actual": {
              "description": "Line COGS actual",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "line_text": {
              "description": "Line text",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "line_total": {
              "description": "Line total excluding VAT",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "line_vat_amount": {
              "description": "Total VAT amount",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "line_vat_code": {
              "description": "VAT code",
              "type": "string",
              "format": "string",
              "example": "Reference code of the VAT appliued"
            },
            "line_vat_rate": {
              "description": "VAT rates",
              "type": "string",
              "format": "string",
              "example": "25"
            },
            "line_vat_text": {
              "description": "VAT texts",
              "type": "string",
              "format": "string",
              "example": "SWEDISH VAT"
            },
            "gl_account_earnings": {
              "description": "General ledger earnings account",
              "type": "string",
              "format": "string",
              "example": "ABC1234"
            },
            "gl_account_vat": {
              "description": "General ledger VAT account",
              "type": "string",
              "format": "string",
              "example": "ABC1234"
            },
            "gl_account_cogs": {
              "description": "General ledger VAT account",
              "type": "string",
              "format": "string",
              "example": "ABC1234"
            },
            "lot_id": {
              "description": "Id of the lot",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "order_id": {
              "description": "Id of the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "order_lot_id": {
              "description": "Id of the lot line on the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "order_marking": {
              "description": "Marking on the order",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "order_number": {
              "description": "Number of the order",
              "type": "integer",
              "format": "int32",
              "example": 1234
            },
            "order_service_line_id": {
              "description": "Id of the service line",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "order_type": {
              "description": "The order type invoiced",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "pickup_from_location_id": {
              "description": "The id of the pickup from location. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "pickup_from_partner_id": {
              "description": "The id of the pickup from partner. For lot lines this is taken from the actual delivery, for service lines this is taken\nfrom the order",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "quantity": {
              "description": "Quantity in the *base_unit*",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "quantity_parcels": {
              "description": "Quantity of parcels",
              "type": "integer",
              "format": "int32",
              "example": 1234
            },
            "base_unit": {
              "description": "Unit used for quantity",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "quantity_uom": {
              "description": "UoMs in the unit of measure of the SKU",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "service_id": {
              "description": "Id of the related service for service lines",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "customer_code_name": {
              "description": "The code name taken from the sku partner relation linked to the customer",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "customer_edi_unit_code": {
              "description": "The EDI unit code taken from the sku partner relation linked to the customer",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "customer_sku_ean": {
              "description": "The order EAN taken from the sku partner relation linked to the customer",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "customer_req_days_expiry": {
              "description": "Required days until expiry taken from the sku partner relation linked to the customer",
              "type": "integer",
              "format": "int32",
              "example": 1234
            },
            "customer_sku_code": {
              "description": "Customer SKU code from the sku partner relation linked to the customer",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "customer_sku_code_uom": {
              "description": "Customer SKU code of the UoM from the sku partner relation linked to the customer",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "sku_id": {
              "description": "Id of the SKU",
              "type": "string",
              "format": "uuid",
              "example": "be3233c4-c0a2-4f47-a62a-303492c20ba6"
            },
            "source": {
              "description": "Source",
              "type": "string",
              "format": "string",
              "example": "A string"
            },
            "unit_price": {
              "description": "Unit price in invoice currency",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "uom_conversion": {
              "description": "The conversion between one *base_unit* and one *UoM*",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "uoms_per_price_unit": {
              "description": "The number of uoms used for one price unit",
              "type": "number",
              "format": "double",
              "example": 1234.123
            },
            "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"
        },
        "readOnly": true
      }
    },
    "type": "object"
  },
  "type": "object"
}

403

Unauthorized request

406

not acceptable

500

Internal server error