> ## 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.

# How to Resolve Export Items Stuck in the Export Queue

> Troubleshooting how-to for Export Items that stay in the Queued tab of the Export page, or come back as a new pending Export Job, even though the item updates and the completed event returned success. Use it when exported expenses never reach the Exported tab. It explains the required sequence and shows the requests: mark the Export Job in_progress, mark every Export Item in_progress, mark each item successful or failed, then complete the job. Sending the updates out of this sequence can leave entries in the queue. For the normal flow see How to Update Export Items and How to Update & Complete the Export Job. Not for the Export lifecycle concepts, which are covered in Export Lifecycle.

This article explains why Export Items can stay in the **Queued** tab even though you sent `successful` item updates and a `completed` job event. In some cases the items also return in a new `pending` Export Job when you export them again. The article also shows how to resolve the problem.

## The Symptom

You processed an Export Job, and Pleo accepted every call:

* `PUT /v3/export-jobs/{jobId}/items` returned `200` with `"errors": []`, and every item was `successful`.
* `POST /v3/export-job-events` with `completed` returned `204`.
* `GET /v3/export-jobs/{jobId}` shows the job as `completed`.

However, in the Pleo Web App the expenses are still in the **Queued** tab and not in the **Exported** tab. If you export them again from the UI, a new `pending` Export Job appears in `GET /v3/export-jobs`. It contains the same accounting entries.

## Why This Happens

An Export Job and its items must move through the full sequence, in order. If you skip a step, the entries can stay in the Export queue. The step that is skipped most often is marking each item `in_progress` before you mark it `successful`.

## How to Reproduce on Staging

1. In the Pleo Web App, export two expenses.
2. Send `POST /v3/export-job-events` with `"event": "started"` for the new `pending` job.
3. Send `PUT /v3/export-jobs/{jobId}/items` with `"status": "successful"` for both items. Do not send `in_progress` first.
4. Send `POST /v3/export-job-events` with `"event": "completed"`.
5. In the Pleo Web App, the expenses stay in the **Queued** tab.

## How to Resolve It

Process each Export Job in this order. Do not skip step 2. If you do, the expenses stay in the **Queued** tab, even though Pleo accepts every call.

| Step | Intent | Event | Status | API Request |
| - | - | - | - | - |
| 1 | Start the job | `started` | Job becomes `in_progress` | `POST /v3/export-job-events` |
| 2 | Mark **every** item as being processed | None | Items become `in_progress` | `PUT /v3/export-jobs/{jobId}/items` |
| 3 | Report the result for each item after processing | None | Items become `successful` or `failed` | `PUT /v3/export-jobs/{jobId}/items` |
| 4 | Finish the job | `completed`, `completed_with_errors` if some items failed, or `failed` if all items failed | Job becomes `completed`, `completed_with_errors` or `failed` | `POST /v3/export-job-events` |

Send step 4 only after Pleo has acknowledged every item update from step 3.

### 1. Mark the Job In Progress

**API Endpoint**: POST [`/v3/export-job-events`](/reference/export-api/export-api-v3/create-an-export-job-event)

**OAuth 2.0**

```bash theme={null}
curl -X POST "https://external.staging.pleo.io/v3/export-job-events" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "jobId": "8eb648ab-464b-42a0-ba17-eda703657e33",
        "event": "started"
      }'
```

**API Key**

```bash theme={null}
curl --request POST \
  -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
  -H "Accept: application/json;charset=UTF-8" \
  -H "Content-Type: application/json" \
  "https://external.staging.pleo.io/v3/export-job-events" \
  -d '{
        "jobId": "8eb648ab-464b-42a0-ba17-eda703657e33",
        "event": "started"
      }'
```

The response is `204`, and the job's `status` becomes `in_progress`.

### 2. Mark Every Item In Progress

**API Endpoint**: PUT [`/v3/export-jobs/{jobId}/items`](/reference/export-api/export-api-v3/update-export-job-items)

Send every accounting entry in the job with `"status": "in_progress"`, in batches of up to 100 items. Each item needs only `accountingEntryId` and `status`.

**OAuth 2.0**

```bash theme={null}
curl -X PUT "https://external.staging.pleo.io/v3/export-jobs/8eb648ab-464b-42a0-ba17-eda703657e33/items" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '
  [
    { "accountingEntryId": "59540ed2-0d68-4e36-9e31-58223975d9e9", "status": "in_progress" },
    { "accountingEntryId": "6678bcee-c6a4-4b49-bb1e-8f9fd653d16c", "status": "in_progress" }
  ]'
```

**API Key**

```bash theme={null}
curl --request PUT \
  -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
  -H "Accept: application/json;charset=UTF-8" \
  -H "Content-Type: application/json" \
  "https://external.staging.pleo.io/v3/export-jobs/8eb648ab-464b-42a0-ba17-eda703657e33/items" \
  -d '
[
  { "accountingEntryId": "59540ed2-0d68-4e36-9e31-58223975d9e9", "status": "in_progress" },
  { "accountingEntryId": "6678bcee-c6a4-4b49-bb1e-8f9fd653d16c", "status": "in_progress" }
]'
```

### 3. Mark Each Item Successful or Failed

**API Endpoint**: PUT [`/v3/export-jobs/{jobId}/items`](/reference/export-api/export-api-v3/update-export-job-items)

After your AS/ERP has processed the items, report the result for each one. For the full payloads, including failures, see [How to Update Export Items](/docs/current/how-tos/accounting-integrations/how-to-update-export-items-for-as-erp-processing.md).

**OAuth 2.0**

```bash theme={null}
curl -X PUT "https://external.staging.pleo.io/v3/export-jobs/8eb648ab-464b-42a0-ba17-eda703657e33/items" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '
  [
    {
      "accountingEntryId": "59540ed2-0d68-4e36-9e31-58223975d9e9",
      "status": "successful",
      "exportedAt": "2026-04-22T10:08:56Z",
      "externalId": "ext-1234",
      "externalUrl": "ext-url"
    },
    {
      "accountingEntryId": "6678bcee-c6a4-4b49-bb1e-8f9fd653d16c",
      "status": "successful",
      "exportedAt": "2026-04-22T10:08:56Z",
      "externalId": "ext-5678",
      "externalUrl": "ext-url"
    }
  ]'
```

**API Key**

```bash theme={null}
curl --request PUT \
  -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
  -H "Accept: application/json;charset=UTF-8" \
  -H "Content-Type: application/json" \
  "https://external.staging.pleo.io/v3/export-jobs/8eb648ab-464b-42a0-ba17-eda703657e33/items" \
  -d '
[
  {
    "accountingEntryId": "59540ed2-0d68-4e36-9e31-58223975d9e9",
    "status": "successful",
    "exportedAt": "2026-04-22T10:08:56Z",
    "externalId": "ext-1234",
    "externalUrl": "ext-url"
  },
  {
    "accountingEntryId": "6678bcee-c6a4-4b49-bb1e-8f9fd653d16c",
    "status": "successful",
    "exportedAt": "2026-04-22T10:08:56Z",
    "externalId": "ext-5678",
    "externalUrl": "ext-url"
  }
]'
```

### 4. Complete the Job

**API Endpoint**: POST [`/v3/export-job-events`](/reference/export-api/export-api-v3/create-an-export-job-event)

Send `completed` if all items succeeded, `completed_with_errors` if some items failed, or `failed` if all items failed. For more detail, see [How to Update and Complete an Export Job](/docs/current/how-tos/accounting-integrations/how-to-update-and-complete-export-job-for-as-erp-processing.md).

**OAuth 2.0**

```bash theme={null}
curl -X POST "https://external.staging.pleo.io/v3/export-job-events" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "jobId": "8eb648ab-464b-42a0-ba17-eda703657e33",
        "event": "completed"
      }'
```

**API Key**

```bash theme={null}
curl --request POST \
  -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
  -H "Accept: application/json;charset=UTF-8" \
  -H "Content-Type: application/json" \
  "https://external.staging.pleo.io/v3/export-job-events" \
  -d '{
        "jobId": "8eb648ab-464b-42a0-ba17-eda703657e33",
        "event": "completed"
      }'
```

Remember

After an Export Job is `completed`, it is final and you cannot change it. If an earlier job left entries in the queue, export them again to create a new `pending` job, and then process that job with the full sequence above.\
\
Your AS/ERP has usually already posted these expenses. For each item, find the existing entry by `accountingEntryId` and reuse its posting result. Do not post the same expense again. In step 3, report that existing result instead of creating a new entry.

## After Resolving

Check the job and its items:

* `GET /v3/export-jobs/{jobId}` shows `"status": "completed"`.
* `GET /v3/export-jobs/{jobId}/items` shows each item as `successful`, with `exportedAt` set.
* Refresh the Export page in the Pleo Web App. The expenses move from the **Queued** tab to the **Exported** tab.

Note

Pleo does not fully show item results to users until the Export Job is completed, so check the Web App only after step 4.

***

## Related Reading

* [How to Update Export Items](/docs/current/how-tos/accounting-integrations/how-to-update-export-items-for-as-erp-processing.md)
* [How to Update and Complete an Export Job](/docs/current/how-tos/accounting-integrations/how-to-update-and-complete-export-job-for-as-erp-processing.md)
* [How to Detect and Start Export Jobs](/docs/current/how-tos/accounting-integrations/how-to-detect-and-start-export-jobs-for-as-erp-processing.md)
* [Export Lifecycle](/docs/current/platform/exports/lifecycle.md)

***
