> For the complete documentation index, see [llms.txt](https://shoxl.gitbook.io/erp-integration-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shoxl.gitbook.io/erp-integration-guide/2023.5/erp-cache-batch/orderdocuments.md).

# Order Documents

## Short description

The ERP Cache OrderDocument interface facilitates the upload of order documents into the ERP Cache.

These documents can then be retrieved in the order history overview of the shop.

## Delivery method

**Update Frequency**: Batch at least once a day\
**Incremental or complete set:** Incremental

**Filetype:** Zipped XML

**Filename: \[SHOPNAME]\_ErpCache\_OrderDocument**\_**\[INDEXNUMBER]\(**\_**\[SUBNUMBER])**.xml\
**Transport:** over FTPS, FTPS Vendisto server hosted by INTEGRACE, file will be placed on FTPS server by ERP party.

**Location within FTP root:** \ErpCache\\

## Structure XML

```markup
<?xml version="1.0" encoding="utf-8"?>
<Import>
    <ImportSettings>
        <Importer>ErpCache_OrderDocument</Importer>
        <Version>1.0</Version>
    </ImportSettings>
    <OrderDocuments>
        <OrderDocument>
            <AccountNumber></AccountNumber>
            <OrderNumber></OrderNumber>
            <DocumentType></DocumentType>
            <ExternalId></ExternalId>
            <Name></Name>
            <MimeType></MimeType>
            <Content></Content>
            <Date></Date>
            <Delete></Delete>
        </OrderDocument>
    </OrderDocuments>
</Import>

```

## Fields XML

**Import element:**

<table data-header-hidden><thead><tr><th width="173">Name</th><th width="193">Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>ImportSettings</td><td>Container element for importsettings</td><td>Element</td><td>Required</td></tr><tr><td>Documents</td><td>Container element for document data</td><td>Element</td><td>Required</td></tr></tbody></table>

**ImportSettings element:**

<table data-header-hidden><thead><tr><th width="173">Name</th><th width="198">Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>Importer</td><td>Name of the importer.<br>Should be ErpCache_Document.</td><td>Text</td><td>Required</td></tr><tr><td>Version</td><td>Version of the import xml. Must be 1.0.</td><td>Text</td><td>Required</td></tr></tbody></table>

**Document element:**

<table data-header-hidden><thead><tr><th width="182">Name</th><th>Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>AccountNumber</td><td>Customer's account number</td><td>Text</td><td>Required</td></tr><tr><td>OrderNumber</td><td>Order number to which the document will be attached</td><td>Text</td><td>Required</td></tr><tr><td>DocumentType</td><td>Type of the document</td><td>DocumentType</td><td>Required</td></tr><tr><td>ExternalId</td><td>External Id of the document. To be used for document changes.</td><td>Text</td><td>Required</td></tr><tr><td>Name</td><td>Name of the document</td><td>Text</td><td>Optional</td></tr><tr><td>MimeType</td><td>Determines the mimetype of the download link in the shop</td><td>MimeType</td><td>Required</td></tr><tr><td>Content</td><td>The actual document</td><td>Base64Binary</td><td>Optional</td></tr><tr><td>Date</td><td>Date to be displayed with the document</td><td>Date</td><td>Optional</td></tr><tr><td>Delete</td><td>Indicates if the document has to be deleted</td><td>Boolean</td><td>Optional</td></tr></tbody></table>

**Types:**

| Type         | Values                                                           |
| ------------ | ---------------------------------------------------------------- |
| Base64Binary | Base64 encoded equivalent of an array of 8-bit unsigned integers |
| Boolean      | False, True                                                      |
| Date         | yyyy-MM-dd                                                       |
| DocumentType | Photo, PackingSlip                                               |
| MimeType     | Png, Jpeg, Pdf                                                   |
