---
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: Document Scan REST API
layout: subsection
---

The Document Scan API scans a generic document and returns a text property with the document content as newline-separated strings.

Sample use case:

-   When receiving goods, you may want to scan and document your packing slips to digitize what has been received and allow for searching on the text available on these slips. You can call the Document Scan REST API to extract key fields from packing slips so that they can be indexed and searched.


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

The Document Scan 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 Documents

To scan a generic document, call this endpoint:

```
POST {baseURL}/doc
```

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

-   JPG or JPEG
-   PDF
-   PNG


The endpoint scans the file attachment and returns a `text` property with the document content as newline-separated strings.

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

This sample request returns extracted text from an image.

```
POST https://api.workday.com/ml/docint/v1/doc
```

For a sample image attachment, see the <i>App Catalog App: Document Intelligence with the AI Gateway</i> article in the [Developer Forum](https://forum.developer.workday.com/).

Sample response:

```
{
"text": "Enhancing Experiences in Moments that Matter\nOnboarding\nRecruiting\nDevelopment\nPromotion\nLeave of Absence\nOffboarding\nRetirement\n"
}
```

