For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI ReferenceWebhooks Reference
DocumentationAPI ReferenceWebhooks Reference
  • Ingest Reference
  • Main Reference
      • GETGet a list of documents
      • GETGet document info
      • GETGet document ocr info
      • GETGet document plain ocr text
      • PUTUpdate document information
      • PUTChange the type of a document
      • PUTChange the publicState of a document
LogoLogo
Main ReferenceDocuments

Update document information

PUT
https://api.invofox.com/documents/:id
PUT
/documents/:id
1const url = 'https://api.invofox.com/documents/id';
2const options = {
3 method: 'PUT',
4 headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
5 body: '{"data":{"documentNumber":{"value":"INV-2024-000123"},"issueDate":{"value":"2024-05-10"},"totalAmount":{"value":"1500.00"}},"clientData":{"reviewedBy":"jdoe","notes":"Corrected total amount after client confirmation"},"validationInfo":{"result":"valid","comments":"Reviewed and validated by finance team","validator":"user_789"},"publicState":"pendingCorrection"}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
1{
2 "_id": "52543ec6d13ac7000bb90823",
3 "company": "54aadbb7e79e2aba5d25f3e3",
4 "clientData": {
5 "reviewedBy": "jdoe",
6 "notes": "Corrected total amount after client confirmation"
7 },
8 "type": "invoice",
9 "name": "Invoice_INVCZ4761199.pdf",
10 "isGroundTruth": false,
11 "creation": "2022-04-11T14:44:22.785Z",
12 "images": [
13 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-1.png",
14 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-2.png",
15 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-3.png",
16 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-4.png",
17 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-5.png",
18 "https://kinequo.blob.core.windows.net/midas/invoices/images/63f34163e8a7430008b38007-6.png"
19 ],
20 "original": "https://kinequo.blob.core.windows.net/midas/invoices/originals/52543ec6d13ac7000bb90823?st=2022-04-29T07%3A16%3A58Z&se=2022-04-29T07%3A46%3A58Z&sp=r&sv=2018-03-28&sr=b&sig=%2FmjG8fY516G2E5qrKhGhg269uuNdq94CJKznssYYxDvI%3D",
21 "mimetype": "application/pdf",
22 "data": {
23 "currency": {
24 "value": "EUR",
25 "confidence": 1
26 },
27 "language": {
28 "value": "es",
29 "confidence": 1
30 },
31 "isCreditNote": {},
32 "numberFormat": {
33 "value": [
34 ".,"
35 ],
36 "confidence": 1
37 },
38 "seriesCode": {
39 "value": "",
40 "confidence": 0
41 },
42 "invoiceRef": {
43 "value": "",
44 "confidence": 0
45 },
46 "taxClass": {
47 "value": "IGIC",
48 "confidence": 1
49 },
50 "issuerCountry": {
51 "value": "ES",
52 "confidence": 1
53 },
54 "recipientCountry": {
55 "value": "ES",
56 "confidence": 0.9909
57 },
58 "issuerAddressDetails": {
59 "value": {
60 "text": "Avenida de América 115, 28042, Alameda de Osuna, Madrid, Comunidad de Madrid, ESP",
61 "addressNumber": "115",
62 "country": "ES",
63 "municipality": "Madrid",
64 "neighborhood": "Alameda de Osuna",
65 "postalCode": "28042",
66 "region": "Comunidad de Madrid",
67 "street": "Avenida de América",
68 "subRegion": "Madrid"
69 },
70 "confidence": 1
71 },
72 "recipientAddressDetails": {
73 "value": {
74 "text": "Calle de Bravo Murillo 102, 28020, Cuatro Caminos, Madrid, Comunidad de Madrid, ESP",
75 "addressNumber": "102",
76 "country": "ES",
77 "municipality": "Madrid",
78 "neighborhood": "Cuatro Caminos",
79 "postalCode": "28020",
80 "region": "Comunidad de Madrid",
81 "street": "Calle de Bravo Murillo",
82 "subRegion": "Madrid"
83 },
84 "confidence": 0.9909
85 },
86 "exchangeRate": {},
87 "companyActsLike": {
88 "value": "recipient",
89 "confidence": 1
90 },
91 "incoterms": {
92 "confidence": 0
93 },
94 "bankSortCode": {
95 "confidence": 0
96 },
97 "bankAccountNumber": {
98 "confidence": 0
99 },
100 "bankRoutingNumber": {
101 "confidence": 0
102 },
103 "bankAccountName": {
104 "confidence": 0
105 },
106 "paymentTerms": {
107 "confidence": 0
108 },
109 "additionalData": [
110 {
111 "_id": {
112 "$oid": "63f341716985fe00080a925f",
113 "values": {}
114 }
115 }
116 ],
117 "additionalDataMode": "global",
118 "lines": {
119 "group": {
120 "value": "",
121 "confidence": 0
122 },
123 "identifier": {
124 "value": "",
125 "confidence": 0
126 },
127 "description": {
128 "value": "Vodafone One Ilimitada Super (Fibra 600Mb) (681166545 - 912873472) Jun. a 21 Jul.)",
129 "confidence": 1
130 },
131 "date": {
132 "confidence": 0
133 },
134 "quantity": {
135 "value": 0.82,
136 "confidence": 1
137 },
138 "unitOfMeasurement": {
139 "value": "",
140 "confidence": 0
141 },
142 "grossUnitPrice": {
143 "value": 70.24,
144 "confidence": 1
145 },
146 "taxBaseUnitPrice": {
147 "confidence": 0
148 },
149 "totalUnitPrice": {
150 "confidence": 0
151 },
152 "discountAmount": {
153 "confidence": 0
154 },
155 "discountRate": {
156 "confidence": 0
157 },
158 "taxRate": {
159 "value": 21,
160 "confidence": 0.7125
161 },
162 "taxAmount": {
163 "value": 12.15,
164 "confidence": 0.85625
165 },
166 "taxBaseAmount": {
167 "value": 57.84,
168 "confidence": 1
169 },
170 "totalAmount": {
171 "value": 69.99,
172 "confidence": 0.928125
173 },
174 "grossAmount": {
175 "confidence": 0
176 },
177 "feesAmount": {
178 "confidence": 0
179 },
180 "feesRate": {
181 "confidence": 0
182 }
183 },
184 "breakdowns": {
185 "taxRate": {
186 "value": 21,
187 "confidence": 0.7916666666666666
188 },
189 "taxBaseAmount": {
190 "value": 99.56,
191 "confidence": 0.7916666666666666
192 },
193 "taxAmount": {
194 "value": 20.91,
195 "confidence": 0.7916666666666666
196 },
197 "totalAmount": {
198 "value": 120.47,
199 "confidence": 0.7916666666666666
200 },
201 "grossAmount": {
202 "value": 99.56,
203 "confidence": 0.7916666666666666
204 },
205 "RERate": {
206 "value": 0,
207 "confidence": 0.7916666666666666
208 },
209 "REAmount": {
210 "value": 0,
211 "confidence": 0.7916666666666666
212 },
213 "discountBaseAmount": {
214 "value": 0,
215 "confidence": 0.7916666666666666
216 },
217 "discountAmount": {
218 "value": 0,
219 "confidence": 0.7916666666666666
220 },
221 "discountRate": {
222 "value": 0,
223 "confidence": 0.7916666666666666
224 },
225 "feesBaseAmount": {
226 "value": 0,
227 "confidence": 0.7916666666666666
228 },
229 "feesAmount": {
230 "value": 0,
231 "confidence": 0.7916666666666666
232 },
233 "feesRate": {
234 "value": 0,
235 "confidence": 0.7916666666666666
236 }
237 },
238 "dues": {
239 "date": {
240 "value": "2023-01-31",
241 "confidence": 1
242 },
243 "amount": {
244 "confidence": 0
245 }
246 },
247 "IBAN": {},
248 "SWIFT": {},
249 "additionalNotes": {
250 "confidence": 0
251 },
252 "totalDueAmount": {
253 "value": 120.47,
254 "confidence": 0.7916666666666666
255 },
256 "clientCode": {
257 "confidence": 0
258 },
259 "contractRef": {
260 "confidence": 0
261 },
262 "deliveryNoteRef": {
263 "confidence": 0
264 },
265 "documentNumber": {
266 "value": "ZI20-002898113",
267 "confidence": 1
268 },
269 "documentReference": {},
270 "documentSeries": {
271 "confidence": 0
272 },
273 "documentType": {
274 "value": "normal",
275 "confidence": 1
276 },
277 "additionalChargesAmount": {
278 "value": 0,
279 "confidence": 0.7916666666666666
280 },
281 "additionalDiscountsAmount": {
282 "value": 0,
283 "confidence": 0.7916666666666666
284 },
285 "issueDate": {
286 "value": "2023-01-31",
287 "confidence": 1
288 },
289 "issuerAddress": {
290 "value": "Avenida de América 115, 28042, Madrid",
291 "confidence": 1
292 },
293 "issuerEmail": {
294 "confidence": 0
295 },
296 "issuerFax": {
297 "confidence": 0
298 },
299 "issuerName": {
300 "value": "VODAFONE SERVICIOS SLU",
301 "confidence": 0.9318181818181819
302 },
303 "issuerPhoneNumber": {
304 "confidence": 0
305 },
306 "issuerTaxId": {
307 "value": "ESB87539284",
308 "confidence": 0.9318181818181819
309 },
310 "issuerWebsite": {
311 "value": "vodafone.es",
312 "confidence": 1
313 },
314 "legalNotes": {
315 "confidence": 0
316 },
317 "orderRef": {
318 "confidence": 0
319 },
320 "paymentMethod": {
321 "value": "Domiciliación bancaria",
322 "confidence": 1
323 },
324 "recipientAddress": {
325 "value": "CL BRAVO MURILLO 102 2º IZ 28020 MADRID MADRID España",
326 "confidence": 1
327 },
328 "recipientEmail": {
329 "confidence": 0
330 },
331 "recipientFax": {
332 "confidence": 0
333 },
334 "recipientName": {
335 "value": "KINEQUO SL",
336 "confidence": 1
337 },
338 "recipientPhoneNumber": {
339 "confidence": 0
340 },
341 "shippingAddress": {
342 "confidence": 0
343 },
344 "recipientTaxId": {
345 "value": "ESB87334876",
346 "confidence": 1
347 },
348 "recipientWebsite": {
349 "confidence": 0
350 },
351 "withholdingTaxAmount": {
352 "value": 0,
353 "confidence": 0.7916666666666666
354 },
355 "withholdingTaxRate": {
356 "value": 0,
357 "confidence": 0.7916666666666666
358 },
359 "totalGrossAmount": {
360 "value": 99.56,
361 "confidence": 0.7916666666666666
362 },
363 "reimbursableExpensesAmount": {
364 "value": 0,
365 "confidence": 0.7916666666666666
366 },
367 "totalTaxBaseAmount": {
368 "value": 99.56,
369 "confidence": 0.7916666666666666
370 },
371 "totalAmount": {
372 "value": 120.47,
373 "confidence": 0.7916666666666666
374 },
375 "totalDiscountAmount": {
376 "value": 0,
377 "confidence": 0.7916666666666666
378 },
379 "totalFeesAmount": {
380 "value": 0,
381 "confidence": 0.7916666666666666
382 },
383 "totalTaxAmount": {
384 "value": 20.91,
385 "confidence": 0.7916666666666666
386 },
387 "serviceAddress": {
388 "values": "",
389 "confidence": 0
390 },
391 "supplyNumber": {
392 "value": 0,
393 "confidence": 0
394 },
395 "meterNumber": {
396 "value": 0,
397 "confidence": 0
398 },
399 "totalUsage": {
400 "value": "0,",
401 "confidence": 0
402 },
403 "usageUnitOfMeasurement": {
404 "value": 0,
405 "confidence": 0
406 },
407 "readings": {
408 "previous": {
409 "value": 0,
410 "confidence": 0
411 },
412 "current": {
413 "value": 0,
414 "confidence": 0
415 },
416 "usage": {
417 "value": 0,
418 "confidence": 0
419 }
420 }
421 },
422 "publicState": "pendingCorrection",
423 "confidence": "high",
424 "validationInfo": {
425 "errors": []
426 },
427 "approvalInfo": {
428 "beginning": "2024-01-15T09:30:00Z",
429 "result": "approved",
430 "steps": []
431 },
432 "import": {},
433 "exports": [],
434 "deleted": true
435}
Update the extracted data or custom metadata of a document. The document must be in `pendingCorrection` state. Documents in other states (such as `approved`) cannot be modified through this endpoint — a `403` error will be returned. To change a document's state, use the dedicated [Update document public state](/api-reference/main-reference/documents/change-the-public-state-of-a-document) endpoint.
Was this page helpful?
Previous

Change the type of a document

Next
Built with

Update the extracted data or custom metadata of a document. The document must be in pendingCorrection state. Documents in other states (such as approved) cannot be modified through this endpoint — a 403 error will be returned.

To change a document’s state, use the dedicated Update document public state endpoint.

Authentication

x-api-keystring
API Key authentication via header

Path parameters

idstringRequired
id of the document to modify

Request

This endpoint expects an object.
datamap from strings to objectsOptional
Document data to update. Can contain any field extracted from the document.
clientDatamap from strings to anyOptional
Custom metadata object for your application's use. This data is stored with the document but not processed by Invofox.

Response

Updated document
_idstringformat: "DocumentId"
accountstringformat: "AccountId"
Account the document belongs to.
environmentstringformat: "EnvironmentId"
Environment the document belongs to.
companystringformat: "CompanyId"
Company the document belongs to.
creatorstringformat: "UserId"
User that uploaded the document
clientDataobject

“Additional data to be added to each document. Must be an object or an array of objects. If data to be specified to each document is different, this parameter should have the following format: [ \{ _filename: \<name of the file to which attach this data>, <key>: <value> }, ... \{ _filename: \<name of the file to which attach this data>, <key>: <value> } ].”

typeenum
Allowed values:
namestring
Original name of the uploaded file
isGroundTruthboolean

Indicates the document is marked as Ground Truth (GT)

creationstringformat: "date-time"
Upload timestamp
imageslist of strings

Array of Azure Storage URLs (SAS) to access the document extracted images

originalstringformat: "URL"

Azure Storage URL (SAS) to access the original file

mimetypestring
datamap from strings to any
Extracted document data. Structure varies by document type.
publicStateenumDefaults to processing
confidenceenum
Allowed values:
processInfoobject
validationInfoobject
approvalInfoobject
importobject
exportslist of objects
geometryobject
deletedboolean
Indicates whether the document has been logically deleted
duplicatedbooleanDeprecated

Errors

400
Bad Request Error
403
Forbidden Error
410
Gone Error
429
Too Many Requests Error
500
Internal Server Error