@veryfi/veryfi-sdk 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +443 -145
  2. package/lib/anydocs/deleteAnyDocument.js +12 -0
  3. package/lib/anydocs/getAnyDocument.js +22 -0
  4. package/lib/anydocs/getAnyDocuments.js +30 -0
  5. package/lib/anydocs/processAnyDocument.js +33 -0
  6. package/lib/anydocs/processAnyDocumentBase64.js +31 -0
  7. package/lib/anydocs/processAnyDocumentStream.js +33 -0
  8. package/lib/anydocs/processAnyDocumentUrl.js +30 -0
  9. package/lib/bankstatements/deleteBankStatement.js +12 -0
  10. package/lib/bankstatements/getBankStatement.js +24 -0
  11. package/lib/bankstatements/getBankStatements.js +28 -0
  12. package/lib/bankstatements/processBankStatement.js +33 -0
  13. package/lib/bankstatements/processBankStatementBase64.js +31 -0
  14. package/lib/bankstatements/processBankStatementStream.js +31 -0
  15. package/lib/bankstatements/processBankStatementUrl.js +30 -0
  16. package/lib/businesscards/deleteBusinessCard.js +12 -0
  17. package/lib/businesscards/getBusinessCard.js +24 -0
  18. package/lib/businesscards/getBusinessCards.js +28 -0
  19. package/lib/businesscards/processBusinessCard.js +27 -0
  20. package/lib/businesscards/processBusinessCardBase64.js +25 -0
  21. package/lib/businesscards/processBusinessCardStream.js +25 -0
  22. package/lib/businesscards/processBusinessCardUrl.js +24 -0
  23. package/lib/checks/deleteCheck.js +12 -0
  24. package/lib/checks/getCheck.js +24 -0
  25. package/lib/checks/getChecks.js +28 -0
  26. package/lib/checks/processCheck.js +33 -0
  27. package/lib/checks/processCheckBase64.js +31 -0
  28. package/lib/checks/processCheckStream.js +31 -0
  29. package/lib/checks/processCheckUrl.js +30 -0
  30. package/lib/client/client.js +63 -0
  31. package/lib/client/constructor.js +27 -0
  32. package/lib/client/function.js +6 -0
  33. package/lib/client/generateSignature.js +26 -0
  34. package/lib/client/getHeaders.js +21 -0
  35. package/lib/client/getUrl.js +9 -0
  36. package/lib/client/request.js +58 -0
  37. package/lib/documents/deleteDocument.js +12 -0
  38. package/lib/documents/getDocument.js +14 -0
  39. package/lib/documents/getDocuments.js +31 -0
  40. package/lib/documents/processDocument.js +37 -0
  41. package/lib/documents/processDocumentBase64.js +37 -0
  42. package/lib/documents/processDocumentStream.js +33 -0
  43. package/lib/documents/processDocumentUrl.js +41 -0
  44. package/lib/documents/tags/addTag.js +14 -0
  45. package/lib/documents/tags/addTags.js +14 -0
  46. package/lib/documents/tags/deleteTags.js +12 -0
  47. package/lib/documents/tags/replaceTags.js +14 -0
  48. package/lib/documents/updateDocument.js +17 -0
  49. package/lib/types/BillTo.ts +11 -0
  50. package/lib/types/BoundingElement.ts +6 -0
  51. package/lib/types/Client.ts +1058 -0
  52. package/lib/types/LineItem.ts +24 -0
  53. package/lib/types/Payment.ts +8 -0
  54. package/lib/types/ShipTo.ts +7 -0
  55. package/lib/types/Tag.ts +4 -0
  56. package/lib/types/TaxLine.ts +9 -0
  57. package/lib/types/Vendor.ts +15 -0
  58. package/lib/types/VeryfiDocument.ts +93 -0
  59. package/lib/types/VeryfiExtraArgs.ts +9 -0
  60. package/lib/w2s/deleteW2.js +12 -0
  61. package/lib/w2s/getW2.js +17 -0
  62. package/lib/w2s/getW2s.js +13 -0
  63. package/lib/w2s/processW2.js +28 -0
  64. package/lib/w2s/processW2Base64.js +30 -0
  65. package/lib/w2s/processW2Stream.js +30 -0
  66. package/lib/w2s/processW2Url.js +32 -0
  67. package/lib/w8bene/deleteW8BENE.js +12 -0
  68. package/lib/w8bene/getW8BENE.js +24 -0
  69. package/lib/w8bene/getW8BENEs.js +28 -0
  70. package/lib/w8bene/processW8BENE.js +33 -0
  71. package/lib/w8bene/processW8BENEBase64.js +31 -0
  72. package/lib/w8bene/processW8BENEStream.js +31 -0
  73. package/lib/w8bene/processW8BENEUrl.js +30 -0
  74. package/lib/w9s/deleteW9.js +12 -0
  75. package/lib/w9s/getW9.js +24 -0
  76. package/lib/w9s/getW9s.js +28 -0
  77. package/lib/w9s/processW9.js +30 -0
  78. package/lib/w9s/processW9Base64.js +31 -0
  79. package/lib/w9s/processW9Stream.js +31 -0
  80. package/lib/w9s/processW9Url.js +27 -0
  81. package/package.json +4 -4
  82. package/lib/main.js +0 -783
  83. package/lib/types/main.d.ts +0 -541
package/README.md CHANGED
@@ -78,156 +78,454 @@ let response = veryfi_client.process_document_url(url, external_id=some_id).then
78
78
 
79
79
  ### Response
80
80
 
81
- ```js
82
- >>> {
83
- abn_number: '',
84
- account_number: '',
85
- bill_to_address: '2 Court Square\nNew York, NY 12210',
86
- bill_to_name: 'John Smith',
87
- bill_to_vat_number: '',
88
- card_number: '',
89
- cashback: 0,
90
- category: 'Repairs & Maintenance',
91
- created: '2021-06-28 19:20:02',
92
- currency_code: 'USD',
93
- date: '2019-02-11 00:00:00',
94
- delivery_date: '',
95
- discount: 0,
96
- document_reference_number: '',
97
- document_title: '',
98
- document_type: 'invoice',
99
- due_date: '2019-02-26',
100
- duplicate_of: 37055375,
101
- external_id: '',
102
- id: 37187909,
103
- img_file_name: 'receipt.png',
104
- img_thumbnail_url: 'https://scdn.veryfi.com/receipts/thumbnail.png',
105
- img_url: 'https://scdn.veryfi.com/receipts/receipt.png',
106
- insurance: '',
107
- invoice_number: 'US-001',
108
- is_duplicate: 1,
109
- line_items: [
110
- {
111
- date: '',
112
- description: 'Front and rear brake cables',
113
- discount: 0,
114
- id: 68004313,
115
- order: 0,
116
- price: 100,
117
- quantity: 1,
118
- reference: '',
119
- section: '',
120
- sku: '',
121
- tax: 0,
122
- tax_rate: 0,
123
- total: 100,
124
- type: 'product',
125
- unit_of_measure: ''
126
- },
81
+ ```json
82
+ {
83
+ "account_number": "test1",
84
+ "accounting_entry_type": "debit",
85
+ "balance": null,
86
+ "barcodes": [
87
+ {
88
+ "data": "101785617711518",
89
+ "type": "CODE128"
90
+ }
91
+ ],
92
+ "bill_to": {
93
+ "address": null,
94
+ "email": null,
95
+ "name": null,
96
+ "parsed_address": null,
97
+ "phone_number": null,
98
+ "reg_number": null,
99
+ "vat_number": null
100
+ },
101
+ "cashback": null,
102
+ "category": "Supplies",
103
+ "created_date": "2024-10-31 14:38:27",
104
+ "currency_code": "USD",
105
+ "custom_fields": {
106
+ "box_number": null,
107
+ "dsadasas": "dasdsadas",
108
+ "foo": "bar"
109
+ },
110
+ "date": "2018-10-17 09:03:00",
111
+ "default_category": "Job Supplies",
112
+ "delivery_date": null,
113
+ "delivery_note_number": null,
114
+ "discount": null,
115
+ "document_reference_number": null,
116
+ "document_title": null,
117
+ "document_type": "receipt",
118
+ "due_date": null,
119
+ "duplicate_of": null,
120
+ "exch_rate": 1,
121
+ "external_id": null,
122
+ "final_balance": null,
123
+ "guest_count": null,
124
+ "id": 255371329,
125
+ "img_blur": false,
126
+ "img_file_name": "255371329.png",
127
+ "img_thumbnail_url": "https://scdn.veryfi.com/receipts/919ba4778c039560/d9477032-8537-41cf-97dd-56cb1443a576/thumbnail.png?Expires=1730386417&Signature=VNRx8OISmHUsbPk3YAItcUteEAb4GyLxHTplgCxDxGD2NDE05I7XG~92ikhZhz6oTfCPGqLc7l5Zw0PmDD7di07ZCWRqkpB2OSPUU9ZlHbDLnpenGC7QscEaf8mPb8k0UDKXMY7gw8GCCoRS7IirMnN8aIpaKeRvukIKYCJMqEkX9ncf247BcLyYvnOV20gLieIT1~mofcCebUakr3hBSAbThN0vwYNDXSqth-IpNpDAMcm-nU71KlJWFqdRv4~m3NljwhFkXy1eTK3JiV97EfZJ-Nj~MUxBKWhIjBS~~l-Dp218ogv53Ws8llP5r1RiRrdgqIOtx-8xKa21WU8vbQ__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ",
128
+ "img_url": "https://scdn.veryfi.com/receipts/919ba4778c039560/d9477032-8537-41cf-97dd-56cb1443a576/8e9aebdd-d4f6-4fec-97c8-237dc5bd190d.png?Expires=1730386417&Signature=HTydoDEasZLN7C0QTj-flLCqUqruI3ereSbllb2SEDHrxQTXZPqQ99HE87E5OsWzDmtNumGXYs4UFPjSSOOidUy38EbmyOEljp0VFxPwXMMrJtoVGGShIkTHg-desK3r0fx6xy9l~IX16SEtNCQyZLrzkjTRp0xU9kM1kVuBueW6JewxXUfiIlPu~ITwbwr7PtqRG6uHB3X1myrRXBSv-arbTaLvCrBrmIMGz0gaPH5dA~ehhDSIRvxaKTNTWX-MBloNHfhz~v7xYJyFooDwetyxV968JqGlR-Jx6EAillWbnuflfH5R~VRr~CAtbCsz9gM6q2nqVXPhDDRUl~hrkA__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ",
129
+ "incoterms": null,
130
+ "insurance": null,
131
+ "invoice_number": "17717",
132
+ "is_approved": false,
133
+ "is_blurry": [
134
+ false
135
+ ],
136
+ "is_document": true,
137
+ "is_duplicate": false,
138
+ "is_money_in": false,
139
+ "is_transaction": false,
140
+ "license_plate_number": null,
141
+ "line_items": [
142
+ {
143
+ "category": "Supplies",
144
+ "country_of_origin": null,
145
+ "custom_fields": {},
146
+ "date": null,
147
+ "description": "SNIP LEFT <A>\nWISS LEFT-CUT SNIPS",
148
+ "discount": 4,
149
+ "discount_price": null,
150
+ "discount_rate": null,
151
+ "end_date": null,
152
+ "full_description": "SNIP LEFT <A>\nWISS LEFT-CUT SNIPS",
153
+ "gross_total": null,
154
+ "hsn": null,
155
+ "id": 1146544820,
156
+ "lot": null,
157
+ "manufacturer": null,
158
+ "net_total": null,
159
+ "normalized_description": null,
160
+ "order": 0,
161
+ "price": null,
162
+ "quantity": 1,
163
+ "reference": null,
164
+ "section": null,
165
+ "sku": "037103136480",
166
+ "start_date": null,
167
+ "subtotal": null,
168
+ "tags": [
169
+ "line_items_total_greater_than_1"
170
+ ],
171
+ "tax": null,
172
+ "tax_code": null,
173
+ "tax_rate": null,
174
+ "text": "037103136480 SNIP LEFT <A>\t9.97\nWISS LEFT-CUT SNIPS$4.00",
175
+ "total": 9.97,
176
+ "type": "product",
177
+ "unit_of_measure": null,
178
+ "upc": null,
179
+ "weight": null
180
+ },
181
+ {
182
+ "category": "Supplies",
183
+ "country_of_origin": null,
184
+ "custom_fields": {},
185
+ "date": null,
186
+ "description": "MILW5PCKBLDG <A>\nMKE 5PK GENERAL PURPOSE BLADES",
187
+ "discount": null,
188
+ "discount_price": null,
189
+ "discount_rate": null,
190
+ "end_date": null,
191
+ "full_description": "MILW5PCKBLDG <A>\nMKE 5PK GENERAL PURPOSE BLADES",
192
+ "gross_total": null,
193
+ "hsn": null,
194
+ "id": 1146544822,
195
+ "lot": null,
196
+ "manufacturer": null,
197
+ "net_total": null,
198
+ "normalized_description": null,
199
+ "order": 1,
200
+ "price": null,
201
+ "quantity": 1,
202
+ "reference": null,
203
+ "section": null,
204
+ "sku": "045242268061",
205
+ "start_date": null,
206
+ "subtotal": null,
207
+ "tags": [
208
+ "line_items_total_greater_than_1"
209
+ ],
210
+ "tax": null,
211
+ "tax_code": null,
212
+ "tax_rate": null,
213
+ "text": "045242268061 MILW5PCKBLDG <A>\t1.18\nMKE 5PK GENERAL PURPOSE BLADES",
214
+ "total": 1.18,
215
+ "type": "product",
216
+ "unit_of_measure": null,
217
+ "upc": null,
218
+ "weight": null
219
+ },
220
+ {
221
+ "category": "Supplies",
222
+ "country_of_origin": null,
223
+ "custom_fields": {},
224
+ "date": null,
225
+ "description": "1LB. SCREW <A>\nEB NEO SELF-DRILLING 12X1",
226
+ "discount": null,
227
+ "discount_price": null,
228
+ "discount_rate": null,
229
+ "end_date": null,
230
+ "full_description": "1LB. SCREW <A>\nEB NEO SELF-DRILLING 12X1",
231
+ "gross_total": null,
232
+ "hsn": null,
233
+ "id": 1146544824,
234
+ "lot": null,
235
+ "manufacturer": null,
236
+ "net_total": null,
237
+ "normalized_description": null,
238
+ "order": 2,
239
+ "price": null,
240
+ "quantity": 1,
241
+ "reference": null,
242
+ "section": null,
243
+ "sku": "038902058966",
244
+ "start_date": null,
245
+ "subtotal": null,
246
+ "tags": [
247
+ "line_items_total_greater_than_1"
248
+ ],
249
+ "tax": null,
250
+ "tax_code": null,
251
+ "tax_rate": null,
252
+ "text": "038902058966 1LB. SCREW <A>\t10.57\nEB NEO SELF-DRILLING 12X1",
253
+ "total": 10.57,
254
+ "type": "product",
255
+ "unit_of_measure": null,
256
+ "upc": null,
257
+ "weight": null
258
+ },
259
+ {
260
+ "category": "Supplies",
261
+ "country_of_origin": null,
262
+ "custom_fields": {},
263
+ "date": null,
264
+ "description": "1LB. SCREW <A>\nEB NEO SELF-DRILLING 12X3/4",
265
+ "discount": null,
266
+ "discount_price": null,
267
+ "discount_rate": null,
268
+ "end_date": null,
269
+ "full_description": "1LB. SCREW <A>\nEB NEO SELF-DRILLING 12X3/4",
270
+ "gross_total": null,
271
+ "hsn": null,
272
+ "id": 1146544825,
273
+ "lot": null,
274
+ "manufacturer": null,
275
+ "net_total": null,
276
+ "normalized_description": null,
277
+ "order": 3,
278
+ "price": null,
279
+ "quantity": 1,
280
+ "reference": null,
281
+ "section": null,
282
+ "sku": "038902058959",
283
+ "start_date": null,
284
+ "subtotal": null,
285
+ "tags": [
286
+ "line_items_total_greater_than_1"
287
+ ],
288
+ "tax": null,
289
+ "tax_code": null,
290
+ "tax_rate": null,
291
+ "text": "038902058959 1LB. SCREW <A>\t10.57\nEB NEO SELF-DRILLING 12X3/4",
292
+ "total": 10.57,
293
+ "type": "product",
294
+ "unit_of_measure": null,
295
+ "upc": null,
296
+ "weight": null
297
+ }
298
+ ],
299
+ "meta": {
300
+ "device_id": null,
301
+ "device_user_uuid": null,
302
+ "duplicates": [
303
+ {
304
+ "id": 214960758,
305
+ "score": 1,
306
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/801c6b7b-8d26-459a-ae4a-db58306e34d3/a9c63167-a8e8-4ed2-8fad-7d06cb17beb3.png?Expires=1730386417&Signature=dbq1l7GZCl7K6rXaiSVMUsoDez6OqL9eapnC83AS3YX-o0omgmaoXGaN3K4nYd1w45U5FnNvB~Fca3nlEh4OVui4HfIK-IQPrc-SED8RHVnfCIM74cD5rDw0lokgT-SAkj5JAVohkHC0WHl-vfXWz-PoYRD6PPs-vkSTnvRdsRMPJRjU2-d9EPj6Rqx1sAm9JEMjIOllHCmpNyeuNaRcBTrPDmv5Z7KpiA4ZbDaEmtpDBJiC4CGsPf4ZgBc9zQy4a~J2Zj54TZPrcU5gVg6WCKibhopCVzw2nuW0TmaHZaxFGmK~W642VzMp3oCBZ1izwfUAJvcPx4WN7fzsp~Txlw__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
307
+ },
308
+ {
309
+ "id": 214966753,
310
+ "score": 1,
311
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/ceeb34fd-f810-4319-9fd4-b8b1293ad5fb/ef5987c8-e27b-45cb-b009-a12070a68651.png?Expires=1730386417&Signature=OKiIfd6gWDTAjcgIpvSxmk-0KdsZxnEqTwy3Vb85VuZEIkyG31O4ueQy-IwwsTsxa~unKoK4A-N0XEy8dWSvycUwsHZIshyUYyn2sIDqaPdeKQoOAAf3qpAGTFATPujAqnpo0dws0CyDMdpzt0E~D9~tKzFx1W6isq0~eTXEG-~2GTaKG~bEniEgv~xbwJfVINC5O86HDq-bjNjl6Zx~pWlal~LKoANF1SiyRQGHLw4SaE85kTE5FeTUds4b7OyKPqavqa34hGaNWQt0WoPStcfhhXMzaMxX5uefA5eMlMjcW7Iz2jrnU1L1QjTLDHeZ9w3rCHQwlCZuEmG3IJ8R0g__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
312
+ },
313
+ {
314
+ "id": 214966696,
315
+ "score": 1,
316
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/47446fc9-9ace-411c-8cac-8d8a7378d058/d0de825f-6ed7-4723-92c4-9d48237eba24.png?Expires=1730386417&Signature=GdhaDVHWsiBJi3YUyWonDYfVsUe6uTiXdx0V1CBXRayLPdMqfCVGpPYmlFlsZjBFhvNAS-~D7rHwoZINKa~TIBBYfnZemwjaXmdn~R~ybEic1DbQD~3fU3DecpSEDt76iZRDK~HFefF5BXPHXVhoYqstU7hJFZ~qYR2jpN5hynoMFn6~jY4~0L81msre2lPN3X71yD7ibcdcRbnGCnpT-7sNTrNZ-7CEv9oV1uAbhu54No~B-2XHb6jTgi2q1PM9CkwRJu9dvRtOp~asYQr7gN5EvFpn0yCeUj4Lhv64mwpKYhogFVpHkNAzFSYcplDd522-qbY39cjDNi1F4E4Taw__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
317
+ },
318
+ {
319
+ "id": 214971025,
320
+ "score": 1,
321
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/76d57a9c-2eb7-49dd-b406-eb55a8ac7b7c/693dc46a-89c9-4dff-a7ea-a3d17e18f0a2.png?Expires=1730386417&Signature=I-d8it0jM0EotcxPiltR9JvOYLWhcdflj5yGzQdw5zWrN2s95~wN8mrczHLYGUHvirEljD4tJew1Ob43DcMLEnl~6Mx-nLYAsDAKWAwN5GDzoBjCD1ddQwnr~irhVymdesnSNc50wIDT9GcpMfgpUfndHK~BslgLBRTz3UgQZQfxHhCveJq5J1oAZZnW-7hPcfvW92C8-M9d6yjwsw7SoN~gGFu7qs8cgQXWS2K0ZjiyaG3RqJhKnVF57JXtM966-J7F3z4woED~dTy-ZAOFdG-Vdg0cCri11183wpU5MJNCfrh-obMvVJA1XzqyjaFM6hB1ruTriBz-k7FmXsvsbg__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
322
+ },
323
+ {
324
+ "id": 214971108,
325
+ "score": 1,
326
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/4bffa87e-a2e4-480f-86c7-b1267a9bfb9e/1c057703-a1b2-4f7f-b809-16ba79a9635c.png?Expires=1730386417&Signature=Qhv0ZOl5p~AC7n3A0yIhDofWZhR3OHpQl2k2Fzl9DAqaJ6oc8KjCkOr86HNQT2cdOj6ZPF4lR1Wiy~jjY1keExdoOpAGAef2FFUCt8~R6UWFCKY7mZZD8ETqgMMzkMhvVvFsR~Y3tJ8l7NALp~-1YuYghmT~nycJMj0V37s~f0rPc9ft-YbmoIsnwRkSyLWIf6YDOHEbRmrNqvW0VdektyNWPJgreaWENu9ZmZyawCVXcExU~zBsHJx0ySeIqMx7fzVkxeXghTKPgKjOIcCKuqlGAAx0f0jRJ4z8BV8T1n~l0MOezvAL3j3NudWilDkgz8eDWA458GXOgmbxlX-Klw__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
327
+ },
328
+ {
329
+ "id": 214971072,
330
+ "score": 1,
331
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/135de1f0-b2bb-4a9d-a4ac-2c70c22eb0d9/fd301613-7850-4b0c-b491-5e6f0113a9e6.png?Expires=1730386417&Signature=VD6teyIDHsCXFzgwXsyJrTf506tIqxCAXd1XPnKzpTUhTVoO-lOLh-I9ieucFG4RaL0GeebnOqhiZ1D7nPAiY2h1b2H33rKPp0jRWx0aw7m4L4Vh0-b01URvIJ~D-cnW~iv8CpFGB1AO4voydNqNoMyJSzzdCb1VRbpKpsUkzIhn8n01XkVm7z-98tnSobzh97YLM7-zjDdcNi9bm09Y2HmlepEzl4jHUwIUi-OkG9l12EMj8mWDR2hU5WkL1iIEe8qe6pZkBn4saLyDqE1C42q8ojeaVrV5rDdWpZ7b-QYwkrhmO0Epz6-6ueDKdt6rCBys5m~nWj8-uxNB33SgQA__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
332
+ },
333
+ {
334
+ "id": 214963213,
335
+ "score": 1,
336
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/ec3b5f22-0d69-49d1-af88-29930edbd19b/2efe3e17-0740-40a5-bd8e-9bb1a96e5718.png?Expires=1730386417&Signature=NdBSHpukLcy2WSvMCnAcAQ-4tkblzeWn~0dmMAukIwm7h~hEz4-01FeglTNU4SmIcylx5X4I8ptydn5rHAIYRHVndHjmpS08dien56sd0JDR3bEgOEqbVfdvfw8K-ibOjEE-00Vbor0NqrhQIfZJX7uSxHU4Ugv-mPRa2TGojTUWCNRPkbNMwj-wqeO3AbTnuTr7sA3tVHkWatFMA1g2WrUH0-HMulRXNCFNuSDhuPc-t4FVdJ2e6SElyUxIYhMzeuSzsK0G0B~qk0KYeEv7dkDwMfl6FLmiV0YOwG40KyKNLkjy1HnUJS7WWuxbU4wzjPjICQK6lw7-Z8MO7IsMew__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
337
+ },
338
+ {
339
+ "id": 214969026,
340
+ "score": 1,
341
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/a59dcd7d-43be-4ad8-a713-6b496b1ae6fb/491d164e-9002-45b3-9913-890af8b9a3a1.png?Expires=1730386417&Signature=F7l1Altw3P9gCO2C~1yiP-bHAjDd5n4aMYozvIBP55sRC5GF~IgHGMs7~rG6ux~uNjOTFwvT8o-iMhz9S6NSXH5R2YtReqVV0-RyBqQWN2sTbwn0VF-ytXiVGBnh2AxHRKBPc7QCxtsdFYS8~NNFDyVcPPFsr0aJL78Yrr7Gbq4e~~ld2ZvkyUo0t31dmMXj8YkquXNqsQ7xyow31rXukvE1PKC7aOn31h4SCbUauVnniHs0iysIYyCrgdf5FYTApdDINTkHANXHYZxXdSXJX6mpTp5ZZ~j-uTDmGSzq9kBdHQxivoHVt~iW4mS8rigBbUc~KNhXyW2SofvSzA2Vyg__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
342
+ },
343
+ {
344
+ "id": 214973908,
345
+ "score": 1,
346
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/d26a7012-126e-4f88-8fad-df3914d3b609/65a98087-04c9-4685-bc30-26e4244a84ea.png?Expires=1730386417&Signature=P8LGG2ZuD3rl6U6RCRmuogoV9lhoF4J54lqTMEwUhKhyLQSKyHj81SWQFqQpTV5TiFlwbuAHWzGN-EXCXmy4fkvte9srQcNBkA6iLk6yDsi4-m26lxdhDYgoV0lGJn0UArmfSUgOOGak0OTZFOB0HOntyOZN9RpdvcBwEvZRuqZ8tML8X2EKQAnxklrtdxiZhlzayNSc4zgoYflQpTBU7XJX~XvTCj2~2shhwwQapqG901L1qn2e3ZcS0TU6t9iw9CZWxcHRh~swEGXBR-N7PXtWPrJletoovUFtNYczki2oiXBQCvoX7afQ3J~F8IdJcrN6OrX1WFRJfqxJhD-UlA__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
347
+ },
348
+ {
349
+ "id": 214973989,
350
+ "score": 1,
351
+ "url": "https://scdn.veryfi.com/receipts/919ba4778c039560/d6684aac-f493-4094-9f15-ec9fe105aa71/b3c2a9d9-e1e8-457f-a05d-277136bfedc0.png?Expires=1730386417&Signature=NMAkp1yzYH2oFlH7Pie5yQeJUzb1-9pu7RG6ljBzD2Xela9Jbdax1Gn1~fBrWB3xulUFueejXxMyuUvQd0hH08ZrAEpCTLI4Djo4x8-bf5LzKt~wWubp9B~aCuSFOab2rszgmCBRA5OBie8BAletWJYj5GoQZ-Cwp~yKk9rPILZTH6PggsPbNlvsNs0p-v4R7ryK3IQH3AMDRlwmrPzJSQpCsNKufvcB6dmPkju6vJaI05I1vVg4tBooVlssyaoH3UOvlhG435u~sgw6Y4fWG1nsfT~vOjqa~-VtFPD8DBfsEQIzEEFz7ydbewvFDF-tlnef3283sDMxk6~U~hAitQ__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ"
352
+ }
353
+ ],
354
+ "fraud": {
355
+ "attribution": null,
356
+ "color": "green",
357
+ "custom_types": [],
358
+ "decision": "Not Fraud",
359
+ "images": [
127
360
  {
128
- date: '',
129
- description: 'New set of pedal arms',
130
- discount: 0,
131
- id: 68004315,
132
- order: 1,
133
- price: 15,
134
- quantity: 2,
135
- reference: '',
136
- section: '',
137
- sku: '',
138
- tax: 0,
139
- tax_rate: 0,
140
- total: 30,
141
- type: 'product',
142
- unit_of_measure: ''
143
- },
361
+ "is_lcd": false,
362
+ "score": 0.95
363
+ }
364
+ ],
365
+ "pages": [
144
366
  {
145
- date: '',
146
- description: 'Labor 3hrs',
147
- discount: 0,
148
- id: 68004316,
149
- order: 2,
150
- price: 5,
151
- quantity: 3,
152
- reference: '',
153
- section: '',
154
- sku: '',
155
- tax: 0,
156
- tax_rate: 0,
157
- total: 15,
158
- type: 'service',
159
- unit_of_measure: ''
367
+ "is_lcd": {
368
+ "score": 0.95,
369
+ "value": false
370
+ }
160
371
  }
161
372
  ],
162
- notes: '',
163
- ocr_text: '\n' +
164
- '\fEast Repair Inc.\n' +
165
- '1912 Harvest Lane\n' +
166
- 'New York, NY 12210\n' +
167
- '\n' +
168
- 'BILL TO\t\tSHIP TO\tRECEIPT #\tUS-001\n' +
169
- 'John Smith\t\tJohn Smith\tRECEIPT DATE\t11/02/2019\n' +
170
- '2 Court Square\t3787 Pineview Drive\n' +
171
- '\tP.O.#\t2312/2019\n' +
172
- 'New York, NY 12210\tCambridge, MA 12210\n' +
173
- '\tDUE DATE\t26/02/2019\n' +
174
- 'Receipt Total\t\t\t$154.06\n' +
175
- '\n' +
176
- 'QTY DESCRIPTION\t\t\tUNIT PRICE\tAMOUNT\n' +
177
- '1\tFront and rear brake cables\t\t100.00\t100.00\n' +
178
- '2\tNew set of pedal arms\t\t\t15.00\t30.00\n' +
179
- '3\tLabor 3hrs\t\t\t\t5.00\t15.00\n' +
180
- '\n' +
181
- '\tSubtotal\t145.00\n' +
182
- '\tSales Tax 6.25%\t9.06\n' +
183
- '\n' +
184
- 'TERMS & CONDITIONS\n' +
185
- 'Payment is due within 15 days\n' +
186
- 'Please make checks payable to: East Repair\n' +
187
- '\tJohn Smith\n' +
188
- '\tInc.\n',
189
- order_date: '',
190
- payment_display_name: '',
191
- payment_terms: '15 days',
192
- payment_type: '',
193
- phone_number: '',
194
- purchase_order_number: '2312/2019',
195
- rounding: 0,
196
- service_end_date: '',
197
- service_start_date: '',
198
- ship_date: '',
199
- ship_to_address: '3787 Pineview Drive\nCambridge, MA 12210',
200
- ship_to_name: 'John Smith',
201
- shipping: 0,
202
- store_number: '',
203
- subtotal: 145,
204
- tax: 9.06,
205
- tax_lines: [ { base: 0, name: 'Sales', order: 0, rate: 6.25, total: 9.06 } ],
206
- tip: 0,
207
- total: 154.06,
208
- total_weight: '',
209
- tracking_number: '',
210
- updated: '2021-06-28 19:20:03',
211
- vat_number: '',
212
- vendor: {
213
- address: '1912 Harvest Lane\nNew York, NY 12210',
214
- category: 'Car Repair',
215
- email: '',
216
- fax_number: '',
217
- name: 'East Repair',
218
- phone_number: '',
219
- raw_name: 'East Repair Inc.',
220
- vendor_logo: 'https://cdn.veryfi.com/logos/tmp/560806841.png',
221
- vendor_reg_number: '',
222
- vendor_type: 'Car Repair',
223
- web: ''
224
- },
225
- vendor_account_number: '',
226
- vendor_bank_name: '',
227
- vendor_bank_number: '',
228
- vendor_bank_swift: '',
229
- vendor_iban: ''
373
+ "score": 0.05,
374
+ "submissions": {},
375
+ "types": [],
376
+ "version": null
377
+ },
378
+ "handwritten_fields": [],
379
+ "language": [
380
+ "en"
381
+ ],
382
+ "owner": "devapitest",
383
+ "pages": [
384
+ {
385
+ "height": 1848,
386
+ "is_blurry": {
387
+ "score": 0.97,
388
+ "value": false
389
+ },
390
+ "language": [
391
+ "en"
392
+ ],
393
+ "screenshot": {
394
+ "score": 0.9399999976158142,
395
+ "type": null
396
+ },
397
+ "width": 1048
398
+ }
399
+ ],
400
+ "processed_pages": 1,
401
+ "source": "api",
402
+ "source_documents": [
403
+ {
404
+ "height": 1848,
405
+ "size_kb": 990,
406
+ "width": 1048
407
+ }
408
+ ],
409
+ "total_pages": 1,
410
+ "warnings": [
411
+ {
412
+ "message": "Decoded Barcode numbers were not found on the document",
413
+ "type": "barcode_code_missing_in_ocr"
414
+ }
415
+ ]
416
+ },
417
+ "model": "2.50.0",
418
+ "notes": null,
419
+ "ocr_text": "HOME\nTHE\n\tMore saving.\n\tMore doing.\"\n\n2250 SOUTHGATE RD, COLORADO SPRINGS, CO\nBECKY NATION STOREMANAGER 719-471-0054\n1518 00000 17717 10/17/18 09:03 AM\nSELF CHECK OUT\n037103136480 SNIP LEFT <A>\t9.97\nWISS LEFT-CUT SNIPS\nNLP Savings\t$4.00\n045242268061 MILW5PCKBLDG <A>\t1.18\nMKE 5PK GENERAL PURPOSE BLADES\n038902058966 1LB. SCREW <A>\t10.57\nEB NEO SELF-DRILLING 12X1\n038902058959 1LB. SCREW <A>\t10.57\nEB NEO SELF-DRILLING 12X3/4\nSUBTOTAL\t32.29\nSALES TAX\t2.66\nTOTAL\t$34.95\nXXXXXXXXXXXX7373 VISA\n\tUSD$ 34.95\nAUTH CODE 025972/8585391\tTA\nAID A0000003131010\t4341505054414C204F4\nE452050595341\nDEPOT",
420
+ "order_date": null,
421
+ "payment": {
422
+ "card_number": "7373",
423
+ "display_name": "Visa ***7373",
424
+ "terms": null,
425
+ "type": "visa"
426
+ },
427
+ "pdf_url": "https://scdn.veryfi.com/receipts/919ba4778c039560/d9477032-8537-41cf-97dd-56cb1443a576/cde38dad-6123-454f-842b-e794b108a880.pdf?Expires=1730386417&Signature=MpQOcHRbhvhiOACw~Hg4T6htbXg3tnRgbn0vmIgVYBzcYY2aYsW~lKjBFchpFQAtB-pk2nhZqfFaQRAZKhWAVTJdV5Kje4fneAP205-ekOK5LdB~CfrxcE-gfX6v3GTAKGijYoyWwW9Vodgxnfr3T6EBJc27v1aE~lwF1wXu0nsCLhqp1vnO1BWbxQHF6lW2Pzc9RRZ5qPOpiGRLhu5WbtilboBgTYy30EjQWT1oNeK2GmsteYsx0ygBvV1l92e-0cPgs5kJZnZ7hGNTWyc83MwnZt9KbWcV2Kz3X0T5q902XxmEQ4zKO5XfuIjY~pKLE-~39NxZdg32lRNOKj38Gg__&Key-Pair-Id=APKAJCILBXEJFZF4DCHQ",
428
+ "previous_balance": null,
429
+ "purchase_order_number": null,
430
+ "reference_number": "VCDHD-71329",
431
+ "rounding": null,
432
+ "server_name": null,
433
+ "service_end_date": null,
434
+ "service_start_date": null,
435
+ "ship_date": null,
436
+ "ship_to": {
437
+ "address": null,
438
+ "name": null,
439
+ "parsed_address": null
440
+ },
441
+ "shipping": null,
442
+ "status": "processed",
443
+ "store_number": "1518",
444
+ "subtotal": 32.29,
445
+ "tags": [
446
+ {
447
+ "id": 9018171,
448
+ "name": "line_items_total_greater_than_1"
449
+ },
450
+ {
451
+ "id": 9018172,
452
+ "name": "is_document"
453
+ },
454
+ {
455
+ "id": 9018173,
456
+ "name": "total_greater_than_1"
457
+ },
458
+ {
459
+ "id": 9018396,
460
+ "name": "extract_tags"
461
+ },
462
+ {
463
+ "id": 9277238,
464
+ "name": "is_fraud_green"
465
+ },
466
+ {
467
+ "id": 12926297,
468
+ "name": "test_rule_1_failure"
230
469
  }
470
+ ],
471
+ "tax": 2.66,
472
+ "tax_lines": [],
473
+ "tip": null,
474
+ "total": 34.95,
475
+ "total_pages": 1,
476
+ "total_quantity": null,
477
+ "total_weight": null,
478
+ "tracking_number": null,
479
+ "tracking_numbers": [
480
+ null
481
+ ],
482
+ "updated_date": "2024-10-31 14:38:35",
483
+ "vending_person": null,
484
+ "vending_person_number": null,
485
+ "vendor": {
486
+ "abn_number": null,
487
+ "account_currency": null,
488
+ "account_number": null,
489
+ "address": "2250 SOUTHGATE RD, COLORADO SPRINGS, CO",
490
+ "bank_breakdown": [
491
+ {}
492
+ ],
493
+ "bank_name": null,
494
+ "bank_number": null,
495
+ "bank_swift": null,
496
+ "biller_code": null,
497
+ "category": "Nurseries & Gardening",
498
+ "country_code": "US",
499
+ "email": null,
500
+ "external_id": null,
501
+ "external_ids": [],
502
+ "fax_number": null,
503
+ "iban": null,
504
+ "lat": 38.798985,
505
+ "lng": -104.819856,
506
+ "logo": "https://cdn.veryfi.com/logos/us/051403134.jpg",
507
+ "logo_name": "the home depot",
508
+ "map_url": "https://www.google.com/maps/search/?api=1&query=Home+Depot+2250+SOUTHGATE+RD,+COLORADO+SPRINGS,+CO",
509
+ "name": "Home Depot",
510
+ "order_number": null,
511
+ "parsed_address": {},
512
+ "phone_number": "719-471-0054",
513
+ "raw_address": "2250 SOUTHGATE RD, COLORADO SPRINGS, CO\nBECKY NATION",
514
+ "raw_name": "DEPOT",
515
+ "reg_number": null,
516
+ "type": "Nurseries & Gardening",
517
+ "vat_number": "452050595341",
518
+ "web": null
519
+ },
520
+ "vendors": [
521
+ "Home Depot"
522
+ ],
523
+ "vin_number": null,
524
+ "warnings": [],
525
+ "weights": [
526
+ null
527
+ ]
528
+ }
231
529
  ```
232
530
 
233
531
  ### Updating a document
@@ -0,0 +1,12 @@
1
+ const Client = require('../client/constructor');
2
+ /**
3
+ * Delete any document from Veryfi. https://docs.veryfi.com/api/anydocs/delete-a-%E2%88%80-doc/
4
+ *
5
+ * @memberof Client
6
+ * @param {string} document_id ID of the document you'd like to delete
7
+ */
8
+ Client.prototype.delete_any_document = async function (document_id) {
9
+ let endpoint_name = `/any-documents/${document_id}/`;
10
+ let request_arguments = {"id": document_id};
11
+ return this._request("DELETE", endpoint_name, request_arguments);
12
+ }
@@ -0,0 +1,22 @@
1
+ const Client = require('../client/constructor');
2
+ /**
3
+ * Get a specific any document. https://docs.veryfi.com/api/anydocs/get-a-%E2%88%80-doc/
4
+ * @memberof Client
5
+ * @param {number} document_id The unique identifier of the document.
6
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
7
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
8
+ * @param {Object} kwargs Additional request parameters
9
+ * @returns {JSON} Object of a previously processed blueprinted document.
10
+ */
11
+ Client.prototype.get_any_document = async function (document_id,
12
+ bounding_boxes = false,
13
+ confidence_details = false,
14
+ {...kwargs} = {}) {
15
+ let endpoint_name = `/any-documents/${document_id}/`;
16
+ let request_arguments = {
17
+ "bounding_boxes": bounding_boxes,
18
+ "confidence_details": confidence_details
19
+ };
20
+ let document = await this._request("GET", endpoint_name, request_arguments, kwargs, false);
21
+ return document['data'];
22
+ }