---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Workday AI Gateway, AI Gateway]
nav: wcp_docs
parent_url: /wcp_docs/
title: Financial Documents REST API
layout: subsection
---

The Financials REST API enables you to simplify the handling and processing of personal financial documents in order to automate user flows. Using Optical Character Recognition (OCR) and Natural Language Processing (NLP) technologies, the Financials REST APIs can scan PDFs or images (JPGs and PNGs), and extract key entities from bank checks, bank statements, pay slips & W2 forms.

Sample use case:

-   For your new hires, you want to automate the direct deposit process by scanning blank bank checks to auto-populate routing and account numbers. You can call the Financials REST API to extract these fields from the bank check.


## <a id="section_17"></a>URL Base Path

The Financial Documents REST API endpoint uses this base URL:

```
https://api.workday.com/ml/docint/{version}
```

For regional URL base paths, see [Reference: Workday Extend API Gateways and Authorization Base URLs](/wcp_docs/dlh1653340161856.html)

## <a id="section_6"></a>Scanning Financial Documents

To scan and parse an input financial document, call this endpoint:

```
POST {baseURL}/financials
```

Specify the required `document_type` query parameter, which must be one of these values:

-   `us_bank_statement`
-   `us_bank_check`
-   `payslips`
-   `w2_form`


In the request body, attach a data-binary file. The supported file types are:

-   JPG
-   PDF
-   PNG


The endpoint scans the file attachment and returns:

-   `text` - The document content as newline-separated strings.
-   `fields` - A list of extracted field attributes, such as:

    -   `type` - The extracted type of entity in the document.
    -   `page_number` - The page number in the document.
    -   `mention_text` - The raw text of the entity.
    -   `start_index` - The beginning character position of the entity in the extracted text.
    -   `end_index` - The ending character position of the entity in the extracted text.
    -   `normalized_value` - The value in a standardized format. Examples: Trailing spaces are removed and date fields are returned as YYYY-MM-DD.
    -   `normalized_vertices` - The location index of the text box in the document.



## <a id="section_16"></a>Example

This sample request returns a list of fields from the uploaded image of a US bank check:

```
POST https://api.workday.com/ml/docint/v1/financials?document_type=us_bank_check
```

Sample file: data-binary @/tmp/us_check.png

Sample response:

```
{
"text": "Certified Mail Labels.com\nPAY TO THE City Water Company\nORDER OF:\nOne Hundred Seventeen & 73/100 -\nMEMO Acct. # 123456\nCHECK NUMBER\nDATE: June 1, 2023\n'\n$117.73\nDOLLARS\nMr. John Doe\nROUTING NUMBER 00\n00 ACCOUNT NUMBER 00\n00 CHECK NUMBER\n",
"fields": [
 {
   "type": "checking_account_number",
   "page_number": 1,
   "start_index": 197,
   "end_index": 203,
   "mention_text": "00\n00 ",
   "normalized_value": "0000",
   "normalized_vertices": [
     [
       0.23022222518920898,
       0.8643410801887512
     ],
     [
       0.4035555422306061,
       0.8643410801887512
     ],
     [
       0.4035555422306061,
       0.9031007885932922
     ],
     [
       0.23022222518920898,
       0.9031007885932922
     ]
   ]
 },
 {
   "type": "routing_number",
   "page_number": 1,
   "start_index": 197,
   "end_index": 203,
   "mention_text": "00\n00 ",
   "normalized_value": "0000",
   "normalized_vertices": [
     [
       0.23022222518920898,
       0.8643410801887512
     ],
     [
       0.4035555422306061,
       0.8643410801887512
     ],
     [
       0.4035555422306061,
       0.9031007885932902
     ],
     [
       0.23022222518920898,
       0.9031007885932922
     ]
   ]
 }
]
}
 
```

