Accounting system integration

If you need to do bookkeeping in another system then you can get a list of pending invoices through the tracezilla API.

After booking the invoice in another system, you can mark the invoice as booked through the tracezilla API so it no longer appears on the list of pending invoices.

Prerequisites

Get pending invoices

Base URL

Find the base API URL for your company:

1
https://app.tracezilla.com/api/v1/example-company/

Endpoint

Read the Swagger API documentation, or tech docs if you’re not logged in, for this endpoint.

1
GET /invoices

URI encoded parameters (query)

1
?booked_status%5Beq%5D=pending

Full URL

1
https://app.tracezilla.com/api/v1/example-company/invoices?booked_status%5Beq%5D=pending

Curl GET request with your Bearer token

Fill in example-company and {yourBearerToken} removing the curly brackets.

Here we include extra data with the include URL parameter:

&include=customer,customer_location,lines_extract, lines_extract.sku,lines_extract.service,cogs_budget_total

lines_extract combines both service lines and lot lines.

lines_extract.sku will include nested information on the SKU.

lines_extract.service will include nested information on the service.

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/invoices?booked_status%5Beq%5D=pending&include=customer,customer_location,lines_extract, lines_extract.sku,cogs_budget_total,lines_extract.service' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

200 success example response

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
{
  "data": [
    {
      "id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "contact_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "created_by_id": 1234,
      "credit_note_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "currency": "DKK",
      "customer_country": "A string",
      "customer_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "customer_location_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "delivery_selection": "A string",
      "credit_reason": "108",
      "exchange_rate": 1234.123,
      "ext_ref": "A string",
      "gl_journal_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "invoice_date": "2025-12-01",
      "posting_date": "2025-12-14",
      "last_sent_at": "2019-01-01T13:25:32.312Z",
      "last_sent_by_id": 1234,
      "last_sent_note": "A string",
      "last_sent_using": "A string",
      "locked": true,
      "number": 1234,
      "ocr": "34",
      "order_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "order_type": "sales",
      "payment_method_id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "payment_date": "2019-01-01",
      "payment_term_days": 1234,
      "payment_term_method": "days",
      "payment_term_text": "A string",
      "status": "pending",
      "remark": "A comment on the order",
      "invoice_sub_total": 1234.123,
      "invoice_vats_total": 1234.123,
      "invoice_total": 1234.123,
      "invoice_rounding_correction": 1234.123,
      "cogs_actual_total": 1234.123,
      "cogs_budget_total": 1234.123,
      "created_at": "2019-01-01T13:25:32.312Z",
      "updated_at": "2020-01-01T13:25:32.312Z",
      "edi_error": "string",
      "customer": {
        "id": "ae2b80eb-2c5b-4547-bfa7-4d2a09f30bbd",
        "number": 2,
        "type": "organization",
        "name": "Cafe Krummen",
        "ref": null,
        "country": "DK",
        "language": "da",
        "currency": "DKK",
        "default_location_id": "12391ac5-fd38-416d-a4d7-d80aa52a3e3d",
        "www": "",
        "phone": "",
        "fax": "",
        "email": "",
        "vat_id": "",
        "eori": null,
        "payment_term_method": "days",
        "invoice_action": "email",
        "payment_term_text": "",
        "payment_term_days": 8,
        "delivery_term_incoterm": "",
        "delivery_term_text": "",
        "price_list_sales_id": null,
        "price_list_purchase_id": null,
        "hide_traceability": false,
        "req_days_expiry": null,
        "has_logo": false,
        "locked": true,
        "blocked": false,
        "replaced_by_id": null,
        "creditor_no": null,
        "debtor_no": null,
        "debtor_balance": 0,
        "debtor_balance_source": null,
        "debtor_balance_updated_at": null,
        "credit_limit": null,
        "vat_id_validated": null,
        "vat_id_validated_at": null,
        "parent_id": null,
        "owned_by_id": null,
        "tracezilla_member": false,
        "einvoice_id": null,
        "retail_price_currency": null,
        "customer_stage": "active",
        "cost_category": null,
        "expense_gl_account_id": null,
        "is_supplier": true,
        "is_producer": true,
        "is_customer": true,
        "is_forwarder": true,
        "is_reseller": false,
        "free_text_1": null,
        "free_text_2": null,
        "created_at": "2026-01-06T09:16:02Z",
        "updated_at": "2026-01-12T11:07:32Z"
      },
      "customer_location": {
        "id": "12391ac5-fd38-416d-a4d7-d80aa52a3e3d",
        "number": 5,
        "partner_id": "ae2b80eb-2c5b-4547-bfa7-4d2a09f30bbd",
        "name": "Butik",
        "recipient_name": null,
        "ref": null,
        "gln": null,
        "peppol_id": null,
        "edi_method": null,
        "country": "DK",
        "contact": null,
        "cell": null,
        "phone": null,
        "email": null,
        "address": null,
        "address_line_2": null,
        "city": null,
        "state": "",
        "state_code": null,
        "zip": null,
        "gls_parcel_shop_number": null,
        "is_primary": true,
        "is_warehouse": true,
        "is_invoice_to": false,
        "delivery_term_incoterm": null,
        "delivery_term_text": null,
        "blocked": false,
        "www": null,
        "no_traceability": false,
        "coords": {
          "lat": 55.670249148751,
          "lng": 10.33332824707
        },
        "emcs_trader_id": null,
        "emcs_authority_id": null,
        "association_id": null,
        "association_member_id": null,
        "edi_autosend_desadv": false,
        "is_person": false,
        "owner_partner_id": null,
        "owner_location_id": null,
        "pallet_reg_no": null,
        "free_text_1": null,
        "free_text_2": null,
        "capacity_limit_1": null,
        "capacity_limit_2": null,
        "replaced_by_id": null,
        "created_at": "2026-01-06T09:16:18Z",
        "updated_at": "2026-01-06T09:16:55Z"
      },
      "lines_extract": [
        {
          "id": "e7238ef5-c226-4a16-8f84-a8db5f4fd3bc",
          "calculation": "per_unit",
          "category": "sales_price",
          "customer_edi_unit": null,
          "customer_line_number": null,
          "customer_order_ean": null,
          "customer_partner_id": "ae2b80eb-2c5b-4547-bfa7-4d2a09f30bbd",
          "customer_location_id": "12391ac5-fd38-416d-a4d7-d80aa52a3e3d",
          "deliver_to_location_id": "12391ac5-fd38-416d-a4d7-d80aa52a3e3d",
          "deliver_to_partner_id": "ae2b80eb-2c5b-4547-bfa7-4d2a09f30bbd",
          "delivery_date": "2026-01-06",
          "delivery_id": "671ef79f-ef3c-4385-b819-2ca94b2ca19c",
          "delivery_lot_id": "2cc6d241-05ac-4a01-b25d-1c621ef1cd76",
          "delivery_number": 14,
          "delivery_term_incoterm": null,
          "delivery_term_text": null,
          "forwarder_location_id": "12391ac5-fd38-416d-a4d7-d80aa52a3e3d",
          "forwarder_partner_id": "ae2b80eb-2c5b-4547-bfa7-4d2a09f30bbd",
          "free_units": 2,
          "line_text": "",
          "line_total": 0,
          "line_vat_amount": null,
          "line_vat_rates": null,
          "line_vat_texts": null,
          "lot_id": "85759d95-8807-425a-8e36-b07af0041218",
          "order_id": "358db22f-72cd-4d52-b752-35c9956f86e1",
          "order_lot_id": "3ca32028-e919-407b-9acb-487eef4e7bc4",
          "order_marking": null,
          "order_number": 2,
          "order_service_line_id": null,
          "order_type": "sales",
          "pickup_from_location_id": "4383ced8-b332-4c3f-892e-71064dfc7448",
          "pickup_from_partner_id": "0525b995-c994-4b5b-aac2-01e80ec92cc5",
          "quantity": 2,
          "quantity_parcels": 0,
          "base_unit": "colli",
          "quantity_uom": 20,
          "service_id": null,
          "customer_code_name": null,
          "customer_edi_unit_code": null,
          "customer_sku_ean": null,
          "customer_req_days_expiry": 0,
          "customer_sku_code": null,
          "customer_sku_code_uom": null,
          "sku_id": "053b1b5d-97aa-496a-8222-f69a54c91ad2",
          "source": "OrderInvoiceLot",
          "unit_price": 0,
          "uom_conversion": 10,
          "uoms_per_price_unit": 10,
          "created_at": "2026-01-06T09:24:12Z",
          "updated_at": "2026-01-06T09:24:12Z"
        }
      ]
    }
  ],
  "links": {
    "first": "string",
    "last": "string",
    "next": "string",
    "prev": "string"
  },
  "meta": {
    "current_page": 0,
    "from": 0,
    "last_page": 0,
    "path": "string",
    "per_page": 0,
    "to": 0,
    "total": 0
  }
}

Read the Swagger API documentation, or tech docs if you’re not logged in, for more info about responses for this endpoint.



Mark invoice as booked

After marking an invoice as booked, it will no longer be returned as a pending invoice from the API.

Endpoint

Read the Swagger API documentation, or tech docs if you’re not logged in, for this endpoint.

1
PUT /invoices/{invoiceId}/booked

Request body

1
2
3
{
  "booked_at": "2025-02-21T10:14:22Z"
}

Curl PUT request

Fill in example-company, {invoiceId} and {yourBearerToken} removing the curly brackets.

1
2
3
4
5
6
7
8
curl -X 'PUT' \
  'https://app.tracezilla.com/api/v1/example-company/invoices/{invoiceId}/booked' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}' \
  -d '{
    "booked_at": "2025-02-21T10:14:22Z"
  }'

204 Success

If marking the invoice as booked succeeded, you should get the response code 204.

Read the Swagger API documentation, or tech docs if you’re not logged in, for more info about response codes for this endpoint.