{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b5b93de9-4cf8-4a6b-90f8-39d369c5dc04","name":"Prudent AI API Documentation","description":"This API documentation is specific to being used as a companion with our web-app and not standalone. This documentation covers the integration process of creating batches using API's to the web-app version of Prudent AI and downloading the excel file of analysis generated. Webhook events are also available covering the batch status changes.\n\nPost completion of batch processing, all functional analysis needs to be performed on the web-app only.\n\n## API Usage Limits:\n\n| **Parameter** | **Limit** |\n| --- | --- |\n| Number of statements that can be uploaded | Min-1; Max-60 |\n| Number of requests per second | 5 request per second |\n| Timeout | 270 seconds |\n\n# Authentication\n\nSend `client_id` and `client_secret` with grant_type `client_credentials` to Authentication service to obtain `access_token` for accessing APIs.\n\n- Access Token is valid for three hours and is required on all API Requests.\n    \n- As a best practice, use a single token for all calls. Assign a timestamp for each token, and then check the current timestamp before making any calls. If the token is greater than 150 minutes, generate a new one.\n    \n- After five failed attempts to authenticate, your account will be locked. Contact [support@prudent.ai](https://mailto:support@prudent.ai) to get help resetting your account.\n    \n\n# Uploading Statements\n\nUsers can upload the bank statements as individual PDF for each month or as one combined PDF file having all the months’ statements. Processor performs the QC of the bank statement based on individual month totals represented in the statement.\n\nTo perform the QC for the combined statements, the processor splits the combined PDF file into individual months’ statements, as a new PDF. The filename of the new PDF consists of the original file name with the page numbers appended (for ex. “Filename_#Batch ID_page_1_4.pdf”).\n\nThe results/status, including the transaction data are also updated for each of the individual files split by the processor.\n\nProcessing Plaid Statements\n\nIn addition to bank statements, users can also upload Plaid reports for processing. In case of a Plaid PDF report, the statements can be uploaded using the \"Create a Batch\" endpoint and follow the steps mentioned in \"Quick Start\" section.\n\nIn case the Plaid report is available as a JSON, the reports need to be uploaded using the \"Plaid Json\" endpoint. No further action is required and once processing is complete, the results can be accessed.\n\nNote: A batch with Plaid reports cannot be updated along with bank statements. Updates, if required on the batch can only be added as Plaid reports.\n\n# Quick Start\n\nPrudent AI also provides a Python snippet for ease of usage - you can obtain the python script during the onboarding process. Which covers below steps.\n\n**Step 1:** Get API access credentials by contacting [contactus@prudent.ai](https://mailto:contactus@prudent.ai).\n\n- You'll be provided with `client_id` and `client_secret` along with `Prudent-API-Key`\n    \n\n**Step 2:** Get Access Token by making request to Get Token endpoint using credentials acquired to access every other APIs.\n\n**Step 3:** Create a Batch specifying Batch name and file names that will be uploaded to this batch.\n\nIn case of Plaid Json reports, use the \"Plaid Json\" endpoint. Step 4 and Step 5 can be skipped.\n\n**Step 4:** Upload files 1 by 1 using Upload File endpoint directly to s3 bucket based on credentials obtained from create batch request.\n\n**Step 5:** After uploading required files for the batch initiate processing by invoking Process Batch endpoint\n\n**Step 6:** Check the status of the Batch by invoking Get Quick Analysis endpoint\n\n# Reviewing the Results\n\nOnce all the files finish processing, the status of each file is updated, and the results are generated.\n\n| **Status** | **Description** |\n| --- | --- |\n| TO_UPLOAD | Files are yet to be uploaded |\n| PROCESSED | Batch has completed processing and results are available |\n| PROCESSING_MANUALLY | Batch is currently being processed manually |\n| FAILED | All files in the batch could not be processed (corrupt file, 0 kb files, not a valid bank statement, not uploaded etc) |\n\nThe analysis excel file will be generated only for batches in the PROCESSED status.\n\nThe output of this endpoint is intended for manual review, as opposed to automated consumption by your application.\n\n**Getting the spreadsheet output**\n\nThe analysis can also be downloaded in a spreadsheet format using the Get Analysis Excel File.\n\n**Request Error Codes**\n\n- 404 - Content or URL not found\n    \n- 422 - If request has unsupported or incorrect params\n    \n- 401 - Authentication Failure\n    \n- 403 - No access to particular resource with current privileges\n    \n- 500 - Unexpected error at server side.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"23861985","team":4166967,"collectionId":"b5b93de9-4cf8-4a6b-90f8-39d369c5dc04","publishedId":"2sA3BuXUnC","public":true,"publicUrl":"https://api-docs.prudent.ai","privateUrl":"https://go.postman.co/documentation/23861985-b5b93de9-4cf8-4a6b-90f8-39d369c5dc04","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2024-04-29T12:34:28.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"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/76f78cc9b548fdb2a56cc476ded4b486666e25081ab865a3de66f28cfd19ea95","favicon":"https://res.cloudinary.com/postman/image/upload/v1666293454/team/wfl7sfffiad56uteqg3d.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-docs.prudent.ai/view/metadata/2sA3BuXUnC"}