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

The Receipt REST API uses machine learning to simplify the handling and processing of resumes in order to automate user flows. Using Optical Character Recognition (OCR) and Natural Language Processing (NLP) technologies, the Resume REST APIs can scan images (or PDFs) and extract key entities from the receipt.

Sample use case:

-   For auditing corporate matches for donations, a donation receipt can be scanned to verify the input amount from the user. You can call the Receipt REST API to extract key fields from receipts, and use the response to validate company matching amounts.


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

The Receipt 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 Receipts

To scan a receipt, call this endpoint:

```
POST {baseURL}/receipt
```

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

-   PDF
-   JPG or JPEG
-   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 properties from a receipt.

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

For a sample receipt 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:

```
{
"attachment": {
  "id": "dummy_attachmentId",
  "scanProperties": [
      {
          "confidence": 0.55,
          "type": {
              "id": "amount"
          },
          "value": "29.01"
      },
      {
          "confidence": 0.46,
          "type": {
              "id": "date"
          },
          "value": "20170407"
      },
      {
          "confidence": 0.60,
          "type": {
              "id": "merchant"
          },
          "value": "Main Street Restaurant"
      },
      {
          "confidence": 0.89,
          "type": {
              "id": "currency"
          },
          "value": "USD"
      }
  ]
}
}
 
```

