How Staple’s APIs may be used to automate specific tasks?
In this section, we describe the API process for sending a document to Staple, and immediately receiving Staple's predicted data for the document without any human intervention. Scanning a document is a primary function of Staple. Here is an example of a flow where a user scans an invoice document using the API calls.
To register an account via the API, navigate to the endpoint that belongs to the Registration of the user (Staple API documentation > Users > Registration). Hover over to the request section and go to the “Body” tab. This tab consists of a request sent to the server. Fill out the information in all required fields. The optional fields can be blank, but we recommend filling in all user details. An example of the Registration is shown below.
After editing the code, send the request by clicking on the “Send” button. It sends the request to the server and accepts a response with the requested data. A response with two fields, an access token (accessToken) and a refresh token (refreshToken), is generated.
The access token is used for the authentication of the user. Once a user is registered and logged in, the access token is used in identifying the user. Any request sent by this user has the access token in its header. This helps the server to identify which user is making the request.
The access token is short-lived. It can be used only for some time after which the user will have to re-authenticate themselves and generate a new access token. This can be skipped using the refresh token. It requests the API to get a new access token that allows the user to continue accessing the application resources.
Once a user is registered, they can log in to the server using the credentials used in the registration. Navigate to the endpoint that belongs to logging in the user. In the request section, open the tab containing the body of the request and enter the credentials.
This creates a response and gives tokens to the user. Here, an additional token (apiKey) is generated. The api key is used for uniquely identifying the user and authenticating its requests and access to resources.
To upload a document to a user’s account, a group must be present. A group contains a queue which holds similar types of documents. If a group is not present, the user has to create a group. An endpoint is curated for the same.
In the endpoint, the user needs to fill out the required fields in the headers section. The headers are an important part of the API request and response as they contain meta-data associated with the request and response. For the user to have access to the resources to be accessed by the request, some fields of the headers should be updated.
The mandatory fields are “Authorization” and “x-api-key”.
In the "Authorization" of the Headers section, replace the token variable with the value of the access token generated after logging in and keep the word “Bearer” undisturbed. Next, edit the value column for the key named “x-api-key” to the value of generated apiKey. Each step after this will need the x-api-key and Authorization values to be altered. It ensures that the current user has access to the operations being performed via the request. In the Body section, fill in the required fields.
This generates a response with details of the created group. The “id” field holds the unique id for the generated group.
To create a queue, follow the same steps as above in the code for creating a group. Set the qid field to the id of the desired group in integer format. Then, fill out the fields in the body section. Users can set the optional fields to null or leave them untouched.
This generates the response with details of the queue created.
There are various ways to upload a document. Users can upload multiple documents or upload each document by the document type. Navigate to the code section corresponding to uploading documents. Here, fill out the required headers. There are two fields to be filled up in the body section. The "qid" is the id of the queue where the documents have to be uploaded while the "files" rows take a file as its input. To do so, we need to change the data type of “files” to Files. Click on the empty space beside “files” in the same cell. A dropdown showing data types will be displayed. Select Files from the same. Then, choose the file from the device.
The generated response will be:
Another method to upload documents is by scanning the document according to its document type.
This returns a response as
1{
2 "scanDocuments": {
3 "data": {
4 "num_pages": 1,
5 "Type": "invoice_pdf",
6 "DocSize": [[2000, 1546]],
7 "Customer": null,
8 "Supplier": null,
9 "TableDetected": true,
10 "DetectedText": "Invoice Date 13 Nov 2018 Invoice Number INV-4412 Sleek Tech Pte Ltd. 28C Stanley Street 068737 SINGAPORE EA 1758937 NOTARUM PTE LTD 32 Carpenter street ] # 03-01 SINGAPORE 059911 SINGAPORE Description Quantity Unit Price Amount SGD Corporate Secretary 1.00 800.00 800.00 Incorporation Discount 1.00 ( 500.00 ) ( 500.00 ) Subtotal 300.00 TOTAL TAX 0.00 TOTAL SGD 300.00 Less Amount Paid 300.00 AMOUNT DUE SGD 0.00 Due Date: 13 Nov 2018 Customer Invoice Number NOTARUM PTE LTD INV-4412 Amount Due Due Date 0.00 13 Nov 2018 To Sleek Tech Pte.Ltd. 28C Stanley Street 068737 SINGAPORE EA 1758937 Amount Enclosed Enter the amount you are paying above Company Registration No 201708433H.Registered Office: 28C Stanley Street ,068737 Singapore. ",
11 "InvoiceNumber": {
12 "matches": [
13 {
14 "match": "INV-4412",
15 "matchmulti": null,
16 "value": [
17 1078,
18 1557,
19 1170,
20 1576,
21 1124,
22 1566.5,
23 "INV-4412",
24 "INV-4412"
25 ],
26 "keyword": [
27 863,
28 1553,
29 1020,
30 1577,
31 941.5,
32 1565,
33 "Invoice Number",
34 "Invoice Number"
35 ],
36 "page": 0
37 }
38 ],
39 "UICategory": "Basic Information",
40 "UIName": "Invoice Number",
41 "UIType": "Text"
42 },
43 "PONumber": {
44 "matches": [
45 {
46 "match": null,
47 "value": null,
48 "keyword": null,
49 "page": null
50 }
51 ],
52 "UICategory": "Vendor & Customer",
53 "UIName": "PO Number",
54 "UIType": "Text"
55 },
56 "AccountNumber": {
57 "matches": [
58 {
59 "match": null,
60 "value": null,
61 "keyword": null,
62 "page": null
63 }
64 ],
65 "UICategory": "Payment Instructions",
66 "UIName": "Account Number",
67 "UIType": "Text"
68 },
69 "AccountName": {
70 "matches": [
71 {
72 "match": null,
73 "value": null,
74 "keyword": null,
75 "page": null
76 }
77 ],
78 "UICategory": "Payment Instructions",
79 "UIName": "Account Name",
80 "UIType": "Text"
81 },
82 "SwiftCode": {
83 "matches": [
84 {
85 "match": null,
86 "value": null,
87 "keyword": null,
88 "page": null
89 }
90 ],
91 "UICategory": "Payment Instructions",
92 "UIName": "Swift Code",
93 "UIType": "Text"
94 },
95 "IBAN": {
96 "matches": [
97 {
98 "match": null,
99 "value": null,
100 "keyword": null,
101 "page": null
102 }
103 ],
104 "UICategory": "Payment Instructions",
105 "UIName": "IBAN",
106 "UIType": "Text"
107 },
108 "Email": {
109 "matches": [
110 {
111 "match": null,
112 "value": null,
113 "keyword": null,
114 "page": null
115 }
116 ],
117 "UICategory": "Vendor & Customer",
118 "UIName": "Email",
119 "UIType": "Text"
120 },
121 "URL": {
122 "matches": [
123 {
124 "match": null,
125 "value": null,
126 "keyword": null,
127 "page": null
128 }
129 ],
130 "UICategory": "Vendor & Customer",
131 "UIName": "URL",
132 "UIType": "Text"
133 },
134 "Total": {
135 "matches": [
136 {
137 "match": 300,
138 "matchmulti": null,
139 "value": [
140 1355,
141 1028,
142 1422,
143 1051,
144 1388.5,
145 1039.5,
146 "300.00",
147 "300.00"
148 ],
149 "keyword": [
150 1092,
151 914,
152 1218,
153 935,
154 1155,
155 1037.5,
156 "TOTAL SGD",
157 "TOTAL SGD"
158 ],
159 "page": 0
160 }
161 ],
162 "UICategory": "VAT & Amounts",
163 "UIName": "Total",
164 "UIType": "Amount"
165 },
166 "Subtotal": {
167 "matches": [
168 {
169 "match": 300,
170 "matchmulti": null,
171 "value": [1356, 916, 1423, 936, 1389.5, 926, "300.00", "300.00"],
172 "keyword": [
173 1139,
174 800,
175 1219,
176 821,
177 1179,
178 923.5,
179 "Subtotal",
180 "Subtotal"
181 ],
182 "page": 0
183 }
184 ],
185 "UICategory": "VAT & Amounts",
186 "UIName": "Subtotal",
187 "UIType": "Amount"
188 },
189 "TaxTotal": {
190 "matches": [
191 {
192 "match": 0,
193 "matchmulti": null,
194 "value": [1380, 971, 1421, 989, 1400.5, 980, "0.00", "0.00"],
195 "keyword": [
196 1091,
197 970,
198 1219,
199 989,
200 1155,
201 979.5,
202 "TOTAL TAX",
203 "TOTAL TAX"
204 ],
205 "page": 0
206 }
207 ],
208 "UICategory": "VAT & Amounts",
209 "UIName": "Tax Total",
210 "UIType": "Amount"
211 },
212 "Currency": {
213 "matches": [
214 {
215 "match": "SGD",
216 "matchmulti": null,
217 "value": [
218 1092,
219 1027,
220 1218,
221 1048,
222 1155,
223 1037.5,
224 "TOTAL SGD",
225 "TOTAL SGD"
226 ],
227 "keyword": [
228 1092,
229 1027,
230 1218,
231 1048,
232 1155,
233 1037.5,
234 "TOTAL SGD",
235 "TOTAL SGD"
236 ],
237 "page": 0
238 },
239 {
240 "match": "SGD",
241 "matchmulti": null,
242 "value": [
243 1011,
244 1125,
245 1217,
246 1147,
247 1114,
248 1136,
249 "AMOUNT DUE SGD",
250 "AMOUNT DUE SGD"
251 ],
252 "keyword": [
253 1011,
254 1125,
255 1217,
256 1147,
257 1114,
258 1136,
259 "AMOUNT DUE SGD",
260 "AMOUNT DUE SGD"
261 ],
262 "page": 0
263 }
264 ],
265 "UICategory": "VAT & Amounts",
266 "UIName": "Currency",
267 "UIType": "Text"
268 },
269 "Tables": [
270 {
271 "header": [77, 727, 1430, 768],
272 "GridX": [82, 564, 1071, 1256.5, 1525],
273 "GridY": [800, 856, 897],
274 "headernum": 4,
275 "HeaderPage": 0,
276 "GridYPages": [0, 0, 0]
277 }
278 ],
279 "LineItems": [
280 [
281 {
282 "Description ": ["Corporate Secretary"],
283 "Quantity ": ["1.00"],
284 "Unit Price ": ["800.00"],
285 "Amount SGD ": ["800.00"]
286 },
287 {
288 "Description ": ["Incorporation Discount"],
289 "Quantity ": ["1.00"],
290 "Unit Price ": ["( 500.00 )"],
291 "Amount SGD ": ["( 500.00 )"]
292 }
293 ]
294 ],
295 "LineItems_standardHeader": [
296 [
297 {
298 "Description": "Corporate Secretary",
299 "Quantity": 1,
300 "UnitAmount": 800,
301 "LineAmount": 800
302 },
303 {
304 "Description": "Incorporation Discount",
305 "Quantity": 1,
306 "UnitAmount": 500,
307 "LineAmount": 500
308 }
309 ]
310 ],
311 "Freight": {
312 "matches": [
313 {
314 "match": null,
315 "value": null,
316 "keyword": null,
317 "page": null
318 }
319 ],
320 "UICategory": "VAT & Amounts",
321 "UIName": "Freight",
322 "UIType": "Amount"
323 },
324 "BillingAddress": {
325 "matches": [
326 {
327 "match": null,
328 "value": null,
329 "keyword": null,
330 "page": null
331 }
332 ],
333 "UICategory": "Vendor & Customer",
334 "UIName": "Billing Address",
335 "UIType": "Text"
336 },
337 "ShippingAddress": {
338 "matches": [
339 {
340 "match": null,
341 "value": null,
342 "keyword": null,
343 "page": null
344 }
345 ],
346 "UICategory": "Vendor & Customer",
347 "UIName": "Shipping Address",
348 "UIType": "Text"
349 },
350 "CompanyName": {
351 "matches": [
352 {
353 "match": "Sleek Tech Pte Ltd.",
354 "matchmulti": null,
355 "value": [
356 1199,
357 300,
358 1402,
359 451,
360 1300.5,
361 375.5,
362 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
363 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
364 ],
365 "keyword": [
366 1199,
367 300,
368 1402,
369 451,
370 1300.5,
371 375.5,
372 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
373 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
374 ],
375 "page": 0
376 }
377 ],
378 "UICategory": "Vendor & Customer",
379 "UIName": "Vendor Name",
380 "UIType": "Text"
381 },
382 "SenderAddress": {
383 "matches": [
384 {
385 "match": "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
386 "matchmulti": null,
387 "value": [
388 1199,
389 300,
390 1402,
391 451,
392 1300.5,
393 375.5,
394 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
395 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
396 ],
397 "keyword": [
398 1199,
399 300,
400 1402,
401 451,
402 1300.5,
403 375.5,
404 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
405 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
406 ],
407 "page": 0
408 }
409 ],
410 "UICategory": "Vendor & Customer",
411 "UIName": "Vendor Address",
412 "UIType": "Text"
413 },
414 "OtherAddress": {
415 "matches": [
416 {
417 "match": "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE",
418 "matchmulti": null,
419 "value": [
420 148,
421 380,
422 367,
423 534,
424 257.5,
425 457,
426 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE",
427 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE"
428 ],
429 "keyword": [
430 148,
431 380,
432 367,
433 534,
434 257.5,
435 457,
436 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE",
437 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE"
438 ],
439 "page": 0
440 }
441 ],
442 "UICategory": "Vendor & Customer",
443 "UIName": "Other Address",
444 "UIType": "Text"
445 },
446 "InvoiceDate": {
447 "matches": [
448 {
449 "match": "2018-11-13",
450 "matchmulti": null,
451 "value": [
452 921,
453 322,
454 1046,
455 343,
456 983.5,
457 332.5,
458 "13 Nov 2018",
459 "13 Nov 2018"
460 ],
461 "keyword": [
462 921,
463 295,
464 1044,
465 316,
466 982.5,
467 305.5,
468 "Invoice Date",
469 "Invoice Date"
470 ],
471 "page": 0
472 }
473 ],
474 "UICategory": "Basic Information",
475 "UIName": "Invoice Date",
476 "UIType": "Date"
477 },
478 "PaymentDate": {
479 "matches": [
480 {
481 "match": "2018-11-13",
482 "matchmulti": null,
483 "value": [
484 71,
485 1233,
486 353,
487 1258,
488 212,
489 1245.5,
490 "Due Date: 13 Nov 2018",
491 "Due Date: 13 Nov 2018"
492 ],
493 "keyword": [
494 71,
495 1233,
496 353,
497 1258,
498 212,
499 1245.5,
500 "Due Date: 13 Nov 2018",
501 "Due Date: 13 Nov 2018"
502 ],
503 "page": 0
504 }
505 ],
506 "UICategory": "Basic Information",
507 "UIName": "Payment Date",
508 "UIType": "Date"
509 },
510 "OtherDate": {
511 "matches": [
512 {
513 "match": null,
514 "value": null,
515 "keyword": null,
516 "page": null
517 }
518 ],
519 "UICategory": "Basic Information",
520 "UIName": "Other Date",
521 "UIType": "Date"
522 },
523 "SmallBoxes": [
524 {
525 "box": [
526 921,
527 295,
528 1044,
529 316,
530 982.5,
531 305.5,
532 "Invoice Date",
533 "Invoice Date"
534 ],
535 "page": 0
536 },
537 {
538 "box": [
539 921,
540 322,
541 1046,
542 343,
543 983.5,
544 332.5,
545 "13 Nov 2018",
546 "13 Nov 2018"
547 ],
548 "page": 0
549 },
550 {
551 "box": [
552 920,
553 367,
554 1077,
555 389,
556 998.5,
557 378,
558 "Invoice Number",
559 "Invoice Number"
560 ],
561 "page": 0
562 },
563 {
564 "box": [920, 394, 1012, 415, 966, 404.5, "INV-4412", "INV-4412"],
565 "page": 0
566 },
567 {
568 "box": [
569 1200,
570 300,
571 1402,
572 321,
573 1301,
574 310.5,
575 "Sleek Tech Pte Ltd.",
576 "Sleek Tech Pte Ltd."
577 ],
578 "page": 0
579 },
580 {
581 "box": [
582 1200,
583 333,
584 1388,
585 360,
586 1294,
587 346.5,
588 "28C Stanley Street",
589 "28C Stanley Street"
590 ],
591 "page": 0
592 },
593 {
594 "box": [1199, 365, 1273, 387, 1236, 376, "068737", "068737"],
595 "page": 0
596 },
597 {
598 "box": [1199, 396, 1332, 420, 1265.5, 408, "SINGAPORE", "SINGAPORE"],
599 "page": 0
600 },
601 {
602 "box": [
603 1200,
604 431,
605 1323,
606 451,
607 1261.5,
608 441,
609 "EA 1758937",
610 "EA 1758937"
611 ],
612 "page": 0
613 },
614 {
615 "box": [
616 150,
617 380,
618 367,
619 403,
620 258.5,
621 391.5,
622 "NOTARUM PTE LTD",
623 "NOTARUM PTE LTD"
624 ],
625 "page": 0
626 },
627 {
628 "box": [
629 149,
630 413,
631 348,
632 441,
633 248.5,
634 427,
635 "32 Carpenter street ]",
636 "32 Carpenter street ]"
637 ],
638 "page": 0
639 },
640 {
641 "box": [148, 445, 214, 467, 181, 456, "# 03-01", "# 03-01"],
642 "page": 0
643 },
644 {
645 "box": [
646 148,
647 478,
648 360,
649 501,
650 254,
651 489.5,
652 "SINGAPORE 059911",
653 "SINGAPORE 059911"
654 ],
655 "page": 0
656 },
657 {
658 "box": [148, 511, 280, 534, 214, 522.5, "SINGAPORE", "SINGAPORE"],
659 "page": 0
660 },
661 {
662 "box": [82, 729, 193, 757, 137.5, 743, "Description", "Description"],
663 "page": 0
664 },
665 {
666 "box": [935, 737, 1017, 766, 976, 751.5, "Quantity", "Quantity"],
667 "page": 0
668 },
669 {
670 "box": [
671 1125,
672 741,
673 1221,
674 762,
675 1173,
676 751.5,
677 "Unit Price",
678 "Unit Price"
679 ],
680 "page": 0
681 },
682 {
683 "box": [
684 1292,
685 742,
686 1425,
687 764,
688 1358.5,
689 753,
690 "Amount SGD",
691 "Amount SGD"
692 ],
693 "page": 0
694 },
695 {
696 "box": [
697 81,
698 788,
699 284,
700 816,
701 182.5,
702 802,
703 "Corporate Secretary",
704 "Corporate Secretary"
705 ],
706 "page": 0
707 },
708 {
709 "box": [976, 798, 1016, 817, 996, 807.5, "1.00", "1.00"],
710 "page": 0
711 },
712 {
713 "box": [1153, 798, 1220, 820, 1186.5, 809, "800.00", "800.00"],
714 "page": 0
715 },
716 {
717 "box": [1357, 800, 1424, 821, 1390.5, 810.5, "800.00", "800.00"],
718 "page": 0
719 },
720 {
721 "box": [
722 80,
723 845,
724 305,
725 870,
726 192.5,
727 857.5,
728 "Incorporation Discount",
729 "Incorporation Discount"
730 ],
731 "page": 0
732 },
733 {
734 "box": [976, 855, 1015, 873, 995.5, 864, "1.00", "1.00"],
735 "page": 0
736 },
737 {
738 "box": [
739 1138,
740 854,
741 1219,
742 882,
743 1178.5,
744 868,
745 "( 500.00 )",
746 "( 500.00 )"
747 ],
748 "page": 0
749 },
750 {
751 "box": [
752 1342,
753 856,
754 1423,
755 884,
756 1382.5,
757 870,
758 "( 500.00 )",
759 "( 500.00 )"
760 ],
761 "page": 0
762 },
763 {
764 "box": [1139, 913, 1219, 934, 1179, 923.5, "Subtotal", "Subtotal"],
765 "page": 0
766 },
767 {
768 "box": [1356, 916, 1423, 936, 1389.5, 926, "300.00", "300.00"],
769 "page": 0
770 },
771 {
772 "box": [1091, 970, 1219, 989, 1155, 979.5, "TOTAL TAX", "TOTAL TAX"],
773 "page": 0
774 },
775 {
776 "box": [1380, 971, 1421, 989, 1400.5, 980, "0.00", "0.00"],
777 "page": 0
778 },
779 {
780 "box": [
781 1092,
782 1027,
783 1218,
784 1048,
785 1155,
786 1037.5,
787 "TOTAL SGD",
788 "TOTAL SGD"
789 ],
790 "page": 0
791 },
792 {
793 "box": [1355, 1028, 1422, 1051, 1388.5, 1039.5, "300.00", "300.00"],
794 "page": 0
795 },
796 {
797 "box": [
798 1037,
799 1067,
800 1217,
801 1091,
802 1127,
803 1079,
804 "Less Amount Paid",
805 "Less Amount Paid"
806 ],
807 "page": 0
808 },
809 {
810 "box": [1355, 1070, 1422, 1091, 1388.5, 1080.5, "300.00", "300.00"],
811 "page": 0
812 },
813 {
814 "box": [
815 1011,
816 1125,
817 1217,
818 1147,
819 1114,
820 1136,
821 "AMOUNT DUE SGD",
822 "AMOUNT DUE SGD"
823 ],
824 "page": 0
825 },
826 {
827 "box": [1378, 1130, 1421, 1149, 1399.5, 1139.5, "0.00", "0.00"],
828 "page": 0
829 },
830 {
831 "box": [
832 71,
833 1233,
834 353,
835 1258,
836 212,
837 1245.5,
838 "Due Date: 13 Nov 2018",
839 "Due Date: 13 Nov 2018"
840 ],
841 "page": 0
842 },
843 {
844 "box": [862, 1521, 960, 1541, 911, 1531, "Customer", "Customer"],
845 "page": 0
846 },
847 {
848 "box": [
849 863,
850 1553,
851 1020,
852 1577,
853 941.5,
854 1565,
855 "Invoice Number",
856 "Invoice Number"
857 ],
858 "page": 0
859 },
860 {
861 "box": [
862 1078,
863 1520,
864 1295,
865 1544,
866 1186.5,
867 1532,
868 "NOTARUM PTE LTD",
869 "NOTARUM PTE LTD"
870 ],
871 "page": 0
872 },
873 {
874 "box": [1078, 1557, 1170, 1576, 1124, 1566.5, "INV-4412", "INV-4412"],
875 "page": 0
876 },
877 {
878 "box": [
879 861,
880 1599,
881 986,
882 1619,
883 923.5,
884 1609,
885 "Amount Due",
886 "Amount Due"
887 ],
888 "page": 0
889 },
890 {
891 "box": [862, 1633, 955, 1654, 908.5, 1643.5, "Due Date", "Due Date"],
892 "page": 0
893 },
894 {
895 "box": [1075, 1599, 1117, 1618, 1096, 1608.5, "0.00", "0.00"],
896 "page": 0
897 },
898 {
899 "box": [
900 1077,
901 1634,
902 1201,
903 1655,
904 1139,
905 1644.5,
906 "13 Nov 2018",
907 "13 Nov 2018"
908 ],
909 "page": 0
910 },
911 {
912 "box": [145, 1589, 170, 1608, 157.5, 1598.5, "To", "To"],
913 "page": 0
914 },
915 {
916 "box": [
917 189,
918 1589,
919 390,
920 1610,
921 289.5,
922 1599.5,
923 "Sleek Tech Pte.Ltd.",
924 "Sleek Tech Pte.Ltd."
925 ],
926 "page": 0
927 },
928 {
929 "box": [
930 188,
931 1622,
932 377,
933 1647,
934 282.5,
935 1634.5,
936 "28C Stanley Street",
937 "28C Stanley Street"
938 ],
939 "page": 0
940 },
941 {
942 "box": [188, 1656, 261, 1676, 224.5, 1666, "068737", "068737"],
943 "page": 0
944 },
945 {
946 "box": [188, 1687, 320, 1710, 254, 1698.5, "SINGAPORE", "SINGAPORE"],
947 "page": 0
948 },
949 {
950 "box": [
951 188,
952 1722,
953 313,
954 1741,
955 250.5,
956 1731.5,
957 "EA 1758937",
958 "EA 1758937"
959 ],
960 "page": 0
961 },
962 {
963 "box": [
964 860,
965 1677,
966 1036,
967 1698,
968 948,
969 1687.5,
970 "Amount Enclosed",
971 "Amount Enclosed"
972 ],
973 "page": 0
974 },
975 {
976 "box": [
977 1073,
978 1718,
979 1423,
980 1744,
981 1248,
982 1731,
983 "Enter the amount you are paying above",
984 "Enter the amount you are paying above"
985 ],
986 "page": 0
987 },
988 {
989 "box": [
990 64,
991 1887,
992 871,
993 1917,
994 467.5,
995 1902,
996 "Company Registration No 201708433H.Registered Office: 28C Stanley Street ,068737 Singapore.",
997 "Company Registration No 201708433H.Registered Office: 28C Stanley Street ,068737 Singapore."
998 ],
999 "page": 0
1000 }
1001 ],
1002 "BigBoxes": [
1003 {
1004 "box": [
1005 921,
1006 295,
1007 1046,
1008 343,
1009 983.5,
1010 319,
1011 "Invoice Date\n13 Nov 2018",
1012 "Invoice Date\n13 Nov 2018"
1013 ],
1014 "page": 0
1015 },
1016 {
1017 "box": [
1018 920,
1019 367,
1020 1077,
1021 415,
1022 998.5,
1023 391,
1024 "Invoice Number\nINV-4412",
1025 "Invoice Number\nINV-4412"
1026 ],
1027 "page": 0
1028 },
1029 {
1030 "box": [
1031 1199,
1032 300,
1033 1402,
1034 451,
1035 1300.5,
1036 375.5,
1037 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
1038 "Sleek Tech Pte Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
1039 ],
1040 "page": 0
1041 },
1042 {
1043 "box": [
1044 148,
1045 380,
1046 367,
1047 534,
1048 257.5,
1049 457,
1050 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE",
1051 "NOTARUM PTE LTD\n32 Carpenter street ]\n# 03-01\nSINGAPORE 059911\nSINGAPORE"
1052 ],
1053 "page": 0
1054 },
1055 {
1056 "box": [82, 729, 193, 757, 137.5, 743, "Description", "Description"],
1057 "page": 0
1058 },
1059 {
1060 "box": [935, 737, 1017, 766, 976, 751.5, "Quantity", "Quantity"],
1061 "page": 0
1062 },
1063 {
1064 "box": [
1065 1125,
1066 741,
1067 1221,
1068 762,
1069 1173,
1070 751.5,
1071 "Unit Price",
1072 "Unit Price"
1073 ],
1074 "page": 0
1075 },
1076 {
1077 "box": [
1078 1292,
1079 742,
1080 1425,
1081 764,
1082 1358.5,
1083 753,
1084 "Amount SGD",
1085 "Amount SGD"
1086 ],
1087 "page": 0
1088 },
1089 {
1090 "box": [
1091 81,
1092 788,
1093 284,
1094 816,
1095 182.5,
1096 802,
1097 "Corporate Secretary",
1098 "Corporate Secretary"
1099 ],
1100 "page": 0
1101 },
1102 {
1103 "box": [976, 798, 1016, 817, 996, 807.5, "1.00", "1.00"],
1104 "page": 0
1105 },
1106 {
1107 "box": [1153, 798, 1220, 820, 1186.5, 809, "800.00", "800.00"],
1108 "page": 0
1109 },
1110 {
1111 "box": [1357, 800, 1424, 821, 1390.5, 810.5, "800.00", "800.00"],
1112 "page": 0
1113 },
1114 {
1115 "box": [
1116 80,
1117 845,
1118 305,
1119 870,
1120 192.5,
1121 857.5,
1122 "Incorporation Discount",
1123 "Incorporation Discount"
1124 ],
1125 "page": 0
1126 },
1127 {
1128 "box": [976, 855, 1015, 873, 995.5, 864, "1.00", "1.00"],
1129 "page": 0
1130 },
1131 {
1132 "box": [
1133 1138,
1134 854,
1135 1219,
1136 882,
1137 1178.5,
1138 868,
1139 "( 500.00 )",
1140 "( 500.00 )"
1141 ],
1142 "page": 0
1143 },
1144 {
1145 "box": [
1146 1342,
1147 856,
1148 1423,
1149 884,
1150 1382.5,
1151 870,
1152 "( 500.00 )",
1153 "( 500.00 )"
1154 ],
1155 "page": 0
1156 },
1157 {
1158 "box": [1139, 913, 1219, 934, 1179, 923.5, "Subtotal", "Subtotal"],
1159 "page": 0
1160 },
1161 {
1162 "box": [1356, 916, 1423, 936, 1389.5, 926, "300.00", "300.00"],
1163 "page": 0
1164 },
1165 {
1166 "box": [1091, 970, 1219, 989, 1155, 979.5, "TOTAL TAX", "TOTAL TAX"],
1167 "page": 0
1168 },
1169 {
1170 "box": [1380, 971, 1421, 989, 1400.5, 980, "0.00", "0.00"],
1171 "page": 0
1172 },
1173 {
1174 "box": [
1175 1092,
1176 1027,
1177 1218,
1178 1048,
1179 1155,
1180 1037.5,
1181 "TOTAL SGD",
1182 "TOTAL SGD"
1183 ],
1184 "page": 0
1185 },
1186 {
1187 "box": [1355, 1028, 1422, 1051, 1388.5, 1039.5, "300.00", "300.00"],
1188 "page": 0
1189 },
1190 {
1191 "box": [
1192 1037,
1193 1067,
1194 1217,
1195 1091,
1196 1127,
1197 1079,
1198 "Less Amount Paid",
1199 "Less Amount Paid"
1200 ],
1201 "page": 0
1202 },
1203 {
1204 "box": [1355, 1070, 1422, 1091, 1388.5, 1080.5, "300.00", "300.00"],
1205 "page": 0
1206 },
1207 {
1208 "box": [
1209 1011,
1210 1125,
1211 1217,
1212 1147,
1213 1114,
1214 1136,
1215 "AMOUNT DUE SGD",
1216 "AMOUNT DUE SGD"
1217 ],
1218 "page": 0
1219 },
1220 {
1221 "box": [1378, 1130, 1421, 1149, 1399.5, 1139.5, "0.00", "0.00"],
1222 "page": 0
1223 },
1224 {
1225 "box": [
1226 71,
1227 1233,
1228 353,
1229 1258,
1230 212,
1231 1245.5,
1232 "Due Date: 13 Nov 2018",
1233 "Due Date: 13 Nov 2018"
1234 ],
1235 "page": 0
1236 },
1237 {
1238 "box": [
1239 862,
1240 1521,
1241 1020,
1242 1577,
1243 941,
1244 1549,
1245 "Customer\nInvoice Number",
1246 "Customer\nInvoice Number"
1247 ],
1248 "page": 0
1249 },
1250 {
1251 "box": [
1252 1078,
1253 1520,
1254 1295,
1255 1576,
1256 1186.5,
1257 1548,
1258 "NOTARUM PTE LTD\nINV-4412",
1259 "NOTARUM PTE LTD\nINV-4412"
1260 ],
1261 "page": 0
1262 },
1263 {
1264 "box": [
1265 861,
1266 1599,
1267 986,
1268 1654,
1269 923.5,
1270 1626.5,
1271 "Amount Due\nDue Date",
1272 "Amount Due\nDue Date"
1273 ],
1274 "page": 0
1275 },
1276 {
1277 "box": [
1278 1075,
1279 1599,
1280 1201,
1281 1655,
1282 1138,
1283 1627,
1284 "0.00\n13 Nov 2018",
1285 "0.00\n13 Nov 2018"
1286 ],
1287 "page": 0
1288 },
1289 {
1290 "box": [
1291 145,
1292 1589,
1293 390,
1294 1741,
1295 267.5,
1296 1665,
1297 "To Sleek Tech Pte.Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937",
1298 "To Sleek Tech Pte.Ltd.\n28C Stanley Street\n068737\nSINGAPORE\nEA 1758937"
1299 ],
1300 "page": 0
1301 },
1302 {
1303 "box": [
1304 860,
1305 1677,
1306 1036,
1307 1698,
1308 948,
1309 1687.5,
1310 "Amount Enclosed",
1311 "Amount Enclosed"
1312 ],
1313 "page": 0
1314 },
1315 {
1316 "box": [
1317 1073,
1318 1718,
1319 1423,
1320 1744,
1321 1248,
1322 1731,
1323 "Enter the amount you are paying above",
1324 "Enter the amount you are paying above"
1325 ],
1326 "page": 0
1327 },
1328 {
1329 "box": [
1330 64,
1331 1887,
1332 871,
1333 1917,
1334 467.5,
1335 1902,
1336 "Company Registration No 201708433H.Registered Office: 28C Stanley Street ,068737 Singapore.",
1337 "Company Registration No 201708433H.Registered Office: 28C Stanley Street ,068737 Singapore."
1338 ],
1339 "page": 0
1340 }
1341 ]
1342 },
1343 "docId": 8721,
1344 "status": "COMPLETED"
1345 }
1346 }
1347
To get a document in JSON format, go to the endpoint named “Get document”. This is a Get request fetching information from the server. In this case, it returns the scanned document. Users can also export the document. The difference between the two is that the get request returns the document in a rich format while export is mostly used for automation solutions. Fill up the "x-api-key" and "accessKey" in the headers. In the request URL, replace the docID variable with the id of the document to be accessed. Send the request and the response containing all the information is received.
The changes will be reflected in the account.
Users can export the document once it is completed. The endpoint “Export Document by ID” facilitates this. To complete the request, users have to add the two headers of “API key” and “Authorization”. Following this, the user has to enter their document ID in the URL.
To move document/s to the completed tab, users can resort to the “Change multiple Documents to complete” endpoint. The headers required to complete this request are the “API key” and the “Authorization token”. The document/s to be moved are specified in the request payload. Here, users can mention an array of all the documents to be moved.
Request:
Response: