> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieving a Requested Document

Retrieve a previously requested report

Once a report has been requested the actual report is retrieved in the background and the result will be returned asynchronously. See [Asynchronous Calls (Backgrounding Processes)](/docs/v1/api/guide-to-the-api/getting-started/asynchronous-calls-backgrounding-processes) for more details.

The report data will also be attached to the entity for retrieval at any future point of time. All the reports run are attached to a specific entity to ensure historical reports can also be retrieved if requested via the API.

<Info>
  ##### Note

  Step 6 in the above asynchronous call isn’t required for this response only.
</Info>

#### Sample Webhook Notification

Below is a sample webhook notification that will be received once the ordered report is ready to be downloaded.

```json Webhook Notification theme={null}
    {  
      "entityId": "dc2c0b4f-184d-e478-96fd-9033a9adaf78",  
      "function": "fetch_registry_document",  
      "functionResult": "COMPLETED",  
      "notificationType": "FUNCTION",  
      "requestId": "01GBC0Y8YKFHK8GXDWQRT0N4E4",  
      "linkReference": "https://api.frankie.one/compliance/v1.2/document/20c46451-ceb3-2c32-e027-90f7291c2b4d/full?scanDocId=8a8b87f8-491f-2895-982d-342aebaf8bf8",  
      "message": "registry document order fulfilled; ready for review"  
    }
```

The webhook notification will contain a URL to the actual data of the retrieved report. The response will contain the metadata, base 64 encoded PDF, etc.

```json Document theme={null}

{  
  "document": {  
    "country": "GBR",  
    "docScan": [  
      {  
        "scanCreated": "2022-08-26T02:50:50.027Z",  
        "scanData": "JVBERi0xLjQKJdP0zOEKMS...", // Truncated for brevity  
        "scanDataRetrievalState": "NORMAL",  
        "scanDocId": "8a8b87f8-491f-2895-982d-342aebaf8bf8",  
        "scanFilename": "kyckr-CHON_Q0hfQ29tcGFueU9mZmljaWFsc18x_MTAxOTU3NDU=",  
        "scanMIME": "application/pdf",  
        "scanType": "PDF"  
      }  
    ],  
    "documentId": "20c46451-ceb3-2c32-e027-90f7291c2b4d",  
    "documentStatus": "DOC_SCANNED",  
    "idExpiry": "0001-01-01",  
    "idIssued": "0001-01-01",  
    "idType": "COMPANY_REPORT"  
  },  
  "requestId": "01GBC130JANBG0QXA9Y4K9MJ8E"  
}

```

### Alternative retrieval reports

The reports can also be retrieved via making API calls at a later point of time once the reports have been successfully generated if ever required.

You will need an Entity ID previously created through the [Retrieve a Business Profile](/docs/v1/kyb/international/retrieve-business-profile)

To retrieve any report against an entity follows the steps below:

1. Call the [Get Entity Details](/docs/v1/api/kyc-api-endpoints/reference/entity/query-entity). You will need to retrieve a specific documentID from the response to the above call for the next step.
2. Call the [Retrieve Document Details](/docs/v1/api/kyc-api-endpoints/reference/document/query-document)
