---
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: Identification Documents REST API
layout: subsection
---

Using either Optical Character Recognition (OCR) and Natural Language Processing (NLP) technologies or multimodal large language model (LLM) technologies, the Identification Documents REST API scans personal identification documents such as passports and US driver’s licenses, and extracts key entities from the document.

Sample use case:

-   As an HR administrator, you want to extract passport details to verify candidate identity. You can call the Identification Documents REST API to extract key details from passports and driver’s license images as part of an identity verification process.


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

The Identification 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 Identification Documents

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

```
POST {baseURL}/ids
```

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

-   `passport` - For non-US passports.
-   `us_passport`
-   `us_drivers_license`


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 driver’s license:

```
POST https://api.workday.com/ml/docint/v1/ids?document_type=us_drivers_license
```

Sample file: data-binary @/tmp/us_driver_license.pdf

Sample response:

```
{
"text": "California Driver's License Examples\nPer MCO 5530.13 (Marine Corps Site Perimeter Access Control), driver licenses and identification cards marked not valid for\nfederal purposes, federal limits may apply, or any other similar language may not be accepted by DoD for the purpose of\nunescorted access (i.e. to obtain a Visitor Pass or DBIDS Credential).\nACCEPTABLE AT THE\nACCEPTABLE AT THE\nNOT ACCEPTABLE AT THE\nVISITOR CENTER UNTIL 03 May 2023\nVISITOR CENTER\nVISITOR CENTER\nENSE\nCALIE\nNIA\nDL I1234562\nREAL ID\nDRIVER LICENSE / ID CARD:\nFEDERAL NON-COMPLIANT\nDRIVER LICENSE / ID CARD:\nCLASS A\nEND NONE\nEXP 08/31/2014\nLN SAMPLE\nFN ALEXANDER J.\n2570 24TH STREET\nSACRAMENTO, CA 95818\nDOB 08/31/1977\nRSTR NONE\nFEDERAL\nLIMITS\nAPPLY\nSC\nSC\n08311977\n083\nEYES BRN\nSEX M\nHGT 5'-08\"\nAlexander Sample\nHAIR BLK\nWGT 150 lb\nREALID\nFEDERAL\nNON-COMPLIANT\nISS\n08/31/2009\nDD 00/00/0000NNNAN/ANFD/YY\nCalifornia\nUSA\nDRIVER LICENSE\nCalifornia\nCLASS C\nEND NONE\nDL I1234568\nEXP 08/31/2014\nLN CARDHOLDER\nFNIMA\n2570 24TH STREET\nANYTOWN, CA 95818\nDOB 08/31/1977\nRSTR NONE\nDRIVER LICENSE\nUSA\nFEDERAL\nLIMITS\nAPPLY\nDL I1234562\nCLASS C\nEXP 08/31/2014 END NONE\nLN SAMPLE\nFN ALEXANDER JOSEPH\n2570 24TH STREET\nANYTOWN, CA 95818\nDOB 08/31/1977\nRSTR NONE\n08311977\n08311977\nIma Cardholde\nVETERAN\nSEX F HAIR BRN\nHGT 5'-05\" WGT 125 lb\nDD 00/00/0000NNNAN/ANFD/YY\nEYES BRN\nISS\n08/31/2009\nAlex J Sample\nVETERAN\nSEX M HAIR BLK\nHOT 5-08\" WGT 150 lb\nDD 00/00/0000NNNANIANFD/YY\nEYES BRN\nISS\n08/31/2009\n",
"fields": [
{
 "type": "address",
 "page_number": 1,
 "start_index": 640,
 "end_index": 677,
 "mention_text": "2570 24TH STREET\nSACRAMENTO, CA 95818",
 "normalized_value": null,
 "normalized_vertices": [
   [
     0.144411101937294,
     0.5953333377838135
   ],
   [
     0.25018754601478577,
     0.5953333377838135
   ],
   [
     0.25018754601478577,
     0.624666690826416
   ],
   [
     0.144411101937294,
     0.624666690826416
   ]
 ]
},
{
 "type": "date_of_birth",
 "page_number": 1,
 "start_index": 682,
 "end_index": 692,
 "mention_text": "08/31/1977",
 "normalized_value": "1977-08-31",
 "normalized_vertices": [
   [
     0.16579145193099976,
     0.6286666393280029
   ],
   [
     0.22955739498138428,
     0.6286666393280029
   ],
   [
     0.22955739498138428,
     0.6493333578109741
   ],
   [
     0.16579145193099976,
     0.6493333578109741
   ]
 ]
},
{
 "type": "document_id",
 "page_number": 1,
 "start_index": 491,
 "end_index": 499,
 "mention_text": "I1234562",
 "normalized_value": null,
 "normalized_vertices": [
   [
     0.15903976559638977,
     0.46933332085609436
   ],
   [
     0.2239309847354889,
     0.46933332085609436
   ],
   [
     0.2239309847354889,
     0.49666666984558105
   ],
   [
     0.15903976559638977,
     0.49666666984558105
   ]
 ]
},
{
 "type": "expiration_date",
 "page_number": 1,
 "start_index": 603,
 "end_index": 613,
 "mention_text": "08/31/2014",
 "normalized_value": "2014-08-31",
 "normalized_vertices": [
   [
     0.16466616094112396,
     0.5199999809265137
   ],
   [
     0.22880719602108002,
     0.5199999809265137
   ],
   [
     0.22880719602108002,
     0.5386666655540466
   ],
   [
     0.16466616094112396,
     0.5386666655540466
   ]
 ]
},
. . .
]
}
 
```

