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

# Update Export Items

Export Items must be updated **after entries have been recorded in the Accounting System**, including attachment handling, accounting period assignment, and posting behaviour.

This step communicates the **final outcome of each individual Export Item** back to Pleo.

## Implementation

See the corresponding how-to article for API usage and step-by-step instructions:

* [How to Update Export Items](/docs/current/how-tos/accounting-integrations/how-to-update-export-items-for-as-erp-processing)

## Purpose

* Report success or failure for every Export Item.
* Provide traceability between Pleo and the Accounting System.
* Surface actionable error messages to users.
* Enable accurate Export Job completion.

## Definitions

* **External URL**: Direct link to the created entry in the Accounting System.
* **External ID**: Unique identifier assigned by the Accounting System.
* **Exported At**: Timestamp when the entry was successfully created.

## Export Item Status Updates

Export Items must be updated in **batches of up to 100**.

Each Export Item must be assigned one final status.

### Successful Export Item

Set:

* `status = successful`

Provide when available:

* `externalUrl`
* `externalId`
* `exportedAt`

### Failed Export Item

Set:

* `status = failed`

Provide:

* `failureReasonType`
* `failureReason`

Failure messages must be clear, actionable, and based on the Accounting System response where possible.

## Validation Failure Errors

Use the following mappings when validation prevents processing:

| Validation Error           | failureReasonType       | failureReason                                                |
| -------------------------- | ----------------------- | ------------------------------------------------------------ |
| Missing Journal            | `missing_configuration` | “Journal X missing: provide journal X in the configurations” |
| Missing Account            | `missing_configuration` | “Account X missing: provide account X in the configurations” |
| Missing Expense GL Account | `missing_configuration` | “Account X missing: provide account X in the configurations” |

## Common Export Errors

| Error                      | failureReasonType                          | failureReason                                                                                                                                                      |
| -------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Tax Code missing in AS     | `invalid_configuration`                    | “Tax Code X does not exist in the Accounting System”                                                                                                               |
| Expense GL Account missing | `invalid_configuration`                    | “Account No. X does not exist in the Accounting System. Check Category.”                                                                                           |
| Tag missing                | `invalid_configuration`                    | “Tag with code X does not exist on the Accounting System. Check the Tag.”                                                                                          |
| Vendor not found in AS     | `vendor_unknown`                           | “Selected vendor cannot be processed because it does not exist or is currently blocked. Please verify the vendor's status in the accounting system and try again.” |
| Attachment too large       | `receipt_file_size_limit_exceeded`         | “Attachment file size exceeds accounting system limits.”                                                                                                           |
| Receipt download failed    | `receipt_download_failure`                 | “Failed to download the attachment file from Pleo. Re-export the expense.”                                                                                         |
| Receipt upload failed      | `receipt_upload_failure`                   | Pass Accounting System error message                                                                                                                               |
| API rate limit exceeded    | `accounting_system_rate_limit`             | Pass Accounting System error message                                                                                                                               |
| Authorisation failure      | `accounting_system_authentication_failure` | Pass Accounting System error message                                                                                                                               |

## Other Export Errors

For all remaining failures:

* `failureReasonType = accounting_system_validation_failure`
* `failureReason =` error message returned by the Accounting System

## Expected Outcome

At the end of this step:

* Every Export Item has a final status.
* Successful items include Accounting System references.
* Failed items include actionable error information.

## Upstream Dependencies

* Export Job has been started (status = in\_progress)
* Fetch Export Item Data (data layer)
* Bookkeeping method resolved
* **Accounts Mapping** – determines which GL accounts are debited and credited
* **Data Mapping** – ensures amounts, dates, dimensions, identifiers, and VAT/tax information are recorded correctly
* **Attachment Handling** – links receipts and supporting documentation
* **Accounting Periods** – assigns entries to the correct accounting period
* **Posting Behaviour** – determines whether entries are created as drafts or finalised

## Downstream Dependencies

* **Export Job status update** – updates outcome of Export Job (`completed`, `completed_with_errors` or `failed`)

***

## What Comes Next?

* [Update & Complete Export Job](/docs/current/integration-design/exports/integration-design-exports-update-and-complete-export-job)

***

## Related Reading

* [How to Update Export Items](/docs/current/how-tos/accounting-integrations/how-to-update-export-items-for-as-erp-processing)
* [Export Integration Workflow Guide](/docs/current/guides/export-integration-workflow-guide)
* [AS/ERP Processing Workflow Guide](/docs/current/guides/accounting-system-processing-workflow-guide)

***
