{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"c63992fe-9b26-4252-be01-febd451cf47e","name":"ScanDocFlow","description":"API for OCR (optical character recognition) and extraction keyfields from documents, such as: invoices, checks, remittances, receipts, taxforms, acord 25 forms, etc. For more info please follow the link:\n\n<a href=\"https://scandocflow.com\">https://scandocflow.com</a>\n\nWe use machine-learning, Optical Character Recognition (OCR), and NLP algorithms to get information from documents.\n\n# API key generation\n\n- **Step 1.** For start using the ScanDocFlow API, you need to register in the app via link:\n    \n    <a href=\"https://app.scandocflow.com\">https://app.scandocflow.com</a>\n    \n    It's possible to register via Google, Facebook or regular signUp form.\n- **Step 2.** Inside the app, please follow to \"Api Keys\" tab and press \"+\" button to generate new Access Token.\n- **Step 3.** After Access Token will be generated, you be able to copy it (please store this API key in save place, because token will not be shown in future)\n    \n\n# How it works\n\nEach API request brings some work on server side, it can be described in couple of steps:\n\n<ul><li><p>step 1: recognizes all pages from attached file or couple of files</p></li><li><p>step 2: merge/split pages into structured Documents (for example you uploaded 3 separate captured photo of one original invoice, so as a result we will get one Document)</p></li><li><p>step 3: extract key field values attached to choosed DocumentType</p></li><li><p>step 4: return extracted key fields with information about how Documents was generated from original attached file(s)</p></li></ul>\n\n# Request parameters\n\n## files\n\n(Required) \"files\" parameter used for attaching file or couple of files for recognizing/fields extracting. The order of the files in the request matters, so it can make effect for extraction output. This parameter can be encoded in different ways depends on Content-Type of request. The total size of all files in the one request should not exceed 50 MB.\n\n## files (Content-Type: multipart/form-data)\n\nWhen Content-Type: multipart/form-data used, parameter \"files\" should be a binary data, please use following settings for upload binary file (multipart/form-data) with Postman:\n\n<img src=\"https://scandocflow.com/wp-content/uploads/2020/09/Postman_multipart_file_sync.png\">\n\n## files (Content-Type: application/json, file: base64)\n\nWhen Content-Type: application/json with base64 file format used, parameter \"files\" should be a list of JSON-structures, each of them consist of: _title_ and _src_ parameter.\n\n_title_ - filename\n\n_src_ - should has format: `\"data:{{fileMimetype}};base64,{{fileBodyBase64}}\"`, for example:  \n`\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaMAAAEAAQAAAAA2ZiQZAAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAD3SURBVHja7dk9CsJAEIbhsUrpBSRnsEwR4pVSpjEpPIBXClh4C4m/iNVilWLZVWtBMoNFlHearR4y+bLLwkSioTpBoVAoFAr1qc6kgfqqupEGGaJQKBQKNbiupIFiR5EhCjVU9SI21bzWheVZQadi3/yAmsaVVys/CeISrerFS6lWzlVVru5w76tQqNXRZwa1CVmjT36zy6Z61UouFlVIre8wxrawKJ8aMlyGmeErz0NqUJlBubLKC9OerxPL+YpK9ax13HI7oP5P8bcC9V3FpJ0MUSgU6r0Of/pep9HPD93oM7yPvsMLZ/mnFJN2MkShUCgUCtU9ALkTZvjorSu9AAAAAElFTkSuQmCC\"`\n\n## files (Content-Type: application/json, file: URL)\n\nWhen Content-Type: application/json with URL to file used, parameter \"files\" should be a list of public URLs to original files for recognizing (fields extracting).\n\n## pageCount\n\n(Optional) count of pages for recognizing/extracting from original files in request. Will be applied for all files from original request. Can be used to optimize costs.\n\n## pageOffset\n\n(Optional) page index (offset) from which document recognition will be started (started from 0). Will apply to all files from the original request. Can be used to optimize costs.\n\n## type\n\n(Optional) \"type\" parameter used for specifying Document Type that you want to recognize inside the request. This parameter has affect to extracted keyfields. For example type \"ocr\" will return only recognized words with their positions and confidence level, full raw text in base64 format. Type \"xtract\" or \"financial\" will return (except options as in \"ocr\") some structured data from document such as: document number, date, totals, line items, etc. Currently supported Document Types:\n\n- **ocr** - (default) ocr only document type, returns words with their coordinates and confidence levels, full raw text in base64 format (example of answer please find at Example Request)\n- **ocr.eng** - ocr only document type using multi-level recognition, can be used only with english lang. Returns the same structured answer as in \"ocr\" document type, in some cases has better recognition quality and bigger response time\n- **xtract** - document type for recognizing any structured documents to extract tables or some key-values pairs from document with AI/ML approach. File categorization will not applied (example of answer please find at Example Request)\n- **financial** - document type for extracting from invoices/purchase orders/delivery dockets accounting related fields. The original file can be categorized into several different documents(example of answer please find at Example Request)\n- **check** (\\*) - bank check document type, will extract amount, date, customer name, rounting number, etc. (example of answer please find at Example Request)\n- **acord25** (\\*) - acord 25 insurance form document type, will extract all possible fields from acord 25 form (example of answer please find at Example Request)\n- **taxform.us** (\\*) - US Tax Forms, such as: 1040, W2, W4, 1065, 1098, 1099, 1120 and many other tax form types published by Internal Revenue Service (IRS)\n    \n\n(\\*) This types supports only one file inside parameter \"files\" in request\n\nBefore start using some document type via API, be sure that choosed document type is enabled inside your Profile in ScanDocFlow application.\n\n## lang\n\n(Optional) \"lang\" parameter used for specifying language of the document (should coded by ISO 639-3), currently supported parameters (languages):\n\n- auto (Auto detection, default)\n- ara (Arabic)\n- hye (Armenian)\n- bel (Belorussian)\n- ben (Bengali)\n- bul (Bulgarian)\n- cat (Catalan)\n- chi (Chinese)\n- hrv (Croatian)\n- ces (Czech)\n- dan (Danish)\n- nld (Dutch)\n- eng (English)\n- est (Estonian)\n- fin (Finnish)\n- fra (French)\n- deu (German)\n- ell (Greek)\n- heb (Hebrew)\n- hun (Hungarian)\n- ita (Italian)\n- jpn (Japanese)\n- khm (Khmer)\n- kor (Korean)\n- lav (Latvian)\n- lit (Lithuanian)\n- mkd (Macedonian)\n- msa (Malay)\n- nor (Norwegian)\n- pol (Polish)\n- por (Portuguese)\n- ron (Romanian)\n- rus (Russian)\n- srp (Serbian)\n- slk (Slovak)\n- slv (Slovenian)\n- spa (Spanish)\n- swe (Swedish)\n- tha (Thai)\n- tur (Turkish)\n- ukr (Ukrainian)\n- urd (Urdu)\n- vie (Vietnamese)\n    \n\n## retain\n\n(Optional) Flag for saving documents in the web application for archiving or exporting for example to Xero, QuickBooks, etc. Possible values:\n\n- \"true\" (default)\n- \"false\"\n    \n\n## webhookUrl\n\n(Optional) Url you want to receive webhook to\n\n## waitValidationChecks\n\n(Optional) Wait until validation checks will be passed and only after that send response to webhook. Possible values:\n\n- \"true\"\n- \"false\" (default)\n    \n\nThe ScanDocFlow application guarantees that the document will be verified within 24 hours, the regular verification time is 1 hour for documents with poor quality or if field extraction rules required and have not yet been created for this document supplier/layout. For documents of good quality and if there are rules, the document will be recognized fully automatically and sent to the webhook within 10-20 seconds.\n\nValidation checks - it's additional checks for the extracted fields, they can be additional configured for each user/document type. By default, \"financial\" document type has next validation checks (inside response (or webhook) or you can find validation checks in dedicated expansion panel inside document edit view):\n\n- validationChecks.result: (number) final validation result, possible values: 0 - passed or skipped, 2 - info, 5 - warning, 9 - failed\n- validationChecks.validations.supplierNamePresent: (boolean)\n- validationChecks.validations.totalOrSubtotalPresent: (boolean)\n- validationChecks.validations.datePresent: (boolean)\n- validationChecks.validations.currencyCodePresent: (boolean)\n- validationChecks.validations.lineItemsCount: (number)\n- validationChecks.validations.ocrVerificationStatusCheck: (boolean)\n- validationChecks.validations.recognitionStatusCheck: (boolean)\n    \n\n# Response parameters\n\n## Example of the response\n\n```\n{\n    \"status\": \"success\", // request status\n    \"id\": \"...\",         // request id\n    \"documents\": [.      // the documents array from the original uploaded document(s)\n        {\n            \"id\": \"...\",                     // document ID in ScanDocFlow app\n            \"type\": \"TaxForm.US.F1040.2021\", // type of the current section from the original document\n            ...                              // fields\n            \"section14\": {\n                \"type\": \"decimal\",\n                \"value\": \"11550\",\n                \"text\": \"11,550\",\n                \"annotations\": [\n                    \"0HMO8FAE9BE4P\".         // annotation needs to help find the location of the word\n                ]\n            },\n            ...\n            \"pages\": [                       \n                {\n                    \"fileIdx\": 0,            // file index from the original request (files can be more than 1)\n                    \"offset\": 0,             // offset of the first page in current uploaded file\n                    \"count\": 2               // pages count\n                }\n            ],\n            \"textAnnotation\": {\n                \"Pages\": [                   // all pages array (count: pages.count)\n                    {\n                        \"ClockwiseOrientation\": 0,      // page orientation\n                        \"Words\": [\n                            {\n                                \"Id\": \"0HMO8FAE9BE4P\",  // to find location of section14 - needs to find the same annotation ID: 0HMO8FAE9BE4P (page index can be calculated from the index of the pages array)\n                                \"Text\": \"11,550\",       // original text\n                                \"Outline\": [.           // bounding box of the word\n                                    0.23843,\n                                    0.0615,\n                                    0.25255,\n                                    0.0615,\n                                    0.25255,\n                                    0.06907,\n                                    0.23843,\n                                    0.06907\n                                ],\n                                \"Confidence\": 1,        // OCR confidence level\n                                \"Lang\": \"eng\"           // word language\n                            },\n                            ...\n                    }\n                 ...\n                ]\n            }\n        }\n    ]\n}\n\n```\n\n## textAnnotation\n\nThis parameter contains the list of pages and each page has words with their coordinates:Id - unique identifier of the word  \n**Text** - recognized word  \n**Outline** - this parameter can be parsed like described below:\n\n<img src=\"https://content.pstmn.io/7a495031-38ec-45d1-ad25-8c1994f23f96/U2NyZWVuc2hvdCAyMDIyLTEyLTIyIGF0IDEyLjI4LjQxLnBuZw==\" width=\"201\" height=\"275\">\n\nBounding box with coordinates:\n\n<img src=\"https://content.pstmn.io/008e8ffa-f820-4a0f-b6ef-d5bd40985047/U2NyZWVuc2hvdCAyMDIyLTEyLTIyIGF0IDEyLjI2LjE5LnBuZw==\" width=\"197\" height=\"134\">\n\nOutline: \\[x0, y0, x1, y1, x2, y2, x3, y3\\]\n\nPage height and width taken as 1.\n\n**Confidence** - confidence level of recognition  \n**Lang** - language of this particular word","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"12102431","team":930237,"collectionId":"c63992fe-9b26-4252-be01-febd451cf47e","publishedId":"T1DmCe19","public":true,"publicUrl":"https://api.scandocflow.com","privateUrl":"https://go.postman.co/documentation/12102431-c63992fe-9b26-4252-be01-febd451cf47e","customColor":{"top-bar":"4961CC","right-sidebar":"303030","highlight":"FF7052"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.4","publishDate":"2023-02-13T13:23:20.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/a5ce3b012b3a43bcb671ff1e5055cc315335fa1af56881cac51a24e0e5c29c36","favicon":"https://scandocflow.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://api.scandocflow.com/view/metadata/T1DmCe19"}