---
title: "Retrieve batch file upload status"
slug: "retrieve-batch-file-upload-status"
abstract: "Describes how to retrieve the batch file upload status when uploading a batch file to Sitecore CDP."
---
# Retrieve batch file upload status

::::tabs
:::tab{title="inspect"}
## Inspect endpoint

`GET /v2/batches/inspect/<batchRef>`

:::
:::tab{title="original"}
## Original endpoint

`GET /v2/batches/<batchRef>`

:::
::::

Retrieves the current upload status of [the batch file that you started uploading](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file/upload-batch-file.html "Upload batch file"). The only difference between the inspect endpoint and the original one is that the inspect endpoint supports an additional status: `status.code.file_uploaded`.

We recommend that you verify that the file upload status was successful before uploading the next file. This can save you from having to upload files again if you didn't check their status and realize they failed due to a formatting issue or other error.

| Attribute | Type | Description | Example |
| --- | --- | --- | --- |
| `batchRef` | string | The UUID of the batch upload.<br><br>Use the same UUID you generated when you [allocated a batch upload location](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file/allocate-batch-upload-location.html). | `12af3453-62da-4b31-b646-631b7b5f3009` |

In the response, if the status is `error`, the `status` object contains a `log` key. The `log` key contains the URI of the error log. You use the URI of the error log to troubleshoot the upload process by [retrieving the error log](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file/retrieve-batch-upload-error-log.html "Retrieve batch upload error log").

> [!note]
> If the status is `error` but the response does not contain an error log URI, it might be that the uploaded file uses an unsupported compression format. Make sure the file is gzipped (`.gz`), not zipped (`.zip`).

The response body can contain the following fields:

| Attribute | Description | Type |
| --- | --- | --- |
| `href` | Echo back of the URL used in this request. | string |
| `ref` | UUID of the batch, forms part of the href. | string |
| `checksum` | Echo back of checksum of the uploading file. | string |
| `size` | Echo back of the size of the uploading file. | integer |
| `location` | Details of the file upload location. | object |
| `location.href` | The allocated URL to which you upload the batch file. This URL is valid for one hour. | string |
| `location.expiry` | Date and time that the upload location href expires. | date time |
| `status` | The status of the file upload. | object |
| `status.code` | The batch file processing status. Possible values:<br><br><ul><li>`uploading` - the batch reference is saved and the gzipped file can now be uploaded. The batch stays in this status until the file is fully uploaded. After receiving the file, Sitecore CDP validates it and changes the status to `file_uploaded`.</li><li>`file_uploaded` - Sitecore CDP received the gzipped file, and the file is now in the processing queue. This status is only available in the [inspect](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file/retrieve-batch-file-upload-status.html) endpoint.</li><li>`processing` - Sitecore CDP is processing the gzipped file.</li><li>`success` - Sitecore CDP successfully processed all JSON records in the gzipped file. You can now [verify that CDP ingested the uploaded data](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file.html#UUID-8ed431f9-8f85-ad6c-b8d9-b2927930b33a_section-idm1903352048250758).</li><li>`corrupted` - the MD5 checksum or the size of the gzipped file does not match the [values](https://doc.sitecore.com/cdp/en/developers/api/batch-api/upload-a-batch-file.html#UUID-8ed431f9-8f85-ad6c-b8d9-b2927930b33a_section-idm1903351892563384) provided by the developer.</li><li>`error` - Sitecore CDP did not process at least one JSON record in the gzipped file. You can download the error log to troubleshoot the issue. The location of the log file is the value of the `status.log` parameter.</li></ul> | string |
| `status.log` | If the batch upload request contains errors, the location of the log file that includes details of the errors. | string |
| `summaryStats` | Contains a summary of statistics on the file upload. | object |
| `summaryStats.timeToProcessMillis` | The amount of time, in milliseconds, that the batch import job took to run. | integer |
| `summaryStats.totalCount` | The total number of records read from the import file by the batch import job. | integer |
| `summaryStats.succeededCount` | The number of records that the batch import job successfully processed. | integer |
| `summaryStats.failedCount` | The number of records that the batch import job failed to process. | integer |
| `createdAt` | Date and time the request was created. | date time |
| `modifiedAt` | Date and time the request was last updated. | date time |

::::tabs
:::tab{title="inspect"}
## Inspect endpoint

```curl
curl -X GET '<baseURL>/v2/batches/inspect/12af3453-62da-4b31-a646-631b7b5f3009' \
-u '<username>:<password>' \
-H 'Accept: application/json'

```

:::
:::tab{title="original"}
## Original endpoint

```curl
curl -X GET '<baseURL>/v2/batches/12af3453-62da-4b31-a646-631b7b5f3009' \
-u '<username>:<password>' \
-H 'Accept: application/json'

```

:::
::::

Status: `uploading`:

```json
{
    "href": "<baseURL>/v2/batches/12af3453-62da-4b31-b646-631b7b5f3009",
    "ref": "12af3453-62da-4b31-b646-631b7b5f3009",
    "checksum": "b1d600dbf7463924e24647e626cd7c1e",
    "size": 227,
    "location": {
        "href": "https://sitecore-batch-service-production-eu-west-1.s3.eu-west-1.amazonaws.com/pqsTELpfrXBzxKozB0IoL4xuAT0s7WrH/12af3453-62da-4b31-b646-631b7b5f3009/import.gz?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEDAaCWV1LXdlc3QtMSJIMEYCIQCvLllsVnScVKunabp2ecWZ35wWC2qazGUOH38uZ4ebNwIhAPhKsvrNikvkBSJwFo4Heat72zODcLQCPzh87PRThE8qKtUECIn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMNDkzNDAzOTY5MDY2IgzaKR3yFcEnGvR0NjEqqQQiccx7113xYh5boBVgjPQrzpcCLKgXi563nzp0YRIM52WE1LFEezlLQBEcRl9wo0i5ko5%2F8ne%2BPSFGxkc576fPqkdQzQyX9Ub1PA44pwuFzK%2FZSf9mHS7FRqPvvuxlm7srdkceEJK2VAmoUehfKHzDYhtCkPnZyElYwyeZAK7i6QY8u3WqGVIeGiObjZbhB2Ppq9wwSgfbaz5bUpKPwi6%2F3HRzV60gTURhO%2BOJOrxiuTjF6SKm586HQQizeGKWHlOiJghgO22gaqDlowHDMWuCjkPyk%2Fac1LTXNPFnUlQnbMwnvt7iXSRq6BrpZ7hlxxKZrjLT%2Bb35k4BExmE4XnXS%2BeWiSwNmz74xYtGwBzBjDYJL5KQPJBf%2FmmUqRgCV4xex7f8qtp34F4nLcXC0pRxggkSBBSxm214ubh9j7JZYz5QY8KuGDC9pn%2FeNeqFHaS4B%2FKtkNKzU6YyFmQdiXgFMpK22TpKvDQbeX5%2Bazx2lCqBuIR2MSg8xaVxfVOm14tu0WrqIY8luKV9Vpl23LWs713xhg80XwjkUb1nCOu57Lu0hOODrq1lr21CmJWnU7pttLa6fgT2Sineu%2BwkXeTQuVVBfYOw%2BQgyu6yX7hSkskKFMJPSSvSDgcx%2B0z7ze%2F6wwDfc2j94FtriCv77t7RIN1UQYi4%2FWT%2BH1UtqoHEjwf%2B4WUV4sGnzYnWVVNS9D%2FDuhfIcxMtX%2FeC6GY2xl3DaoInj4Dpn%2F%2B%2B%2BDMJy29J0GOqgBLYwZ%2BS6LeU8LGjYX9awM1lZICDgrQ0hlOV350Z6dYGfgRriIVxT3a1tcWbIoa3i2xkJhWKoJlEjgplRBSMEKhYaLbb9OQjKayNjAfDHGNDGr3%2FeGWuhg7SXAXHa1fs1%2BDqeErCylLFgS3TzFH2D7uTNCiSa6z2QS47PQ5lCYhjWqx9odsrCOmAKTrg23disfNZOaHKnlZaug2Yn7zDgbNneWs%2FKjX5GX&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230110T083848Z&X-Amz-SignedHeaders=content-md5%3Bhost%3Bx-amz-server-side-encryption&X-Amz-Expires=3600&X-Amz-Credential=ASIAXFYJLCYVPNLGNNGA%2F20230110%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=00adb6369887346dafc2fdce630f1527ab9482fb2307c921d2850b0d09c0aace",
        "expiry": "2026-01-10T09:`38:48`.910Z"
    },
    "status": {
        "code": "uploading"
    },
    "createdAt": "2026-01-10T08:`38:48`.910Z",
    "modifiedAt": "2026-01-10T08:`38:49`.000Z"
}

```

Status: `file_uploaded` - only available in the inspect endpoint:

```json
{
    "href": "<baseURL>/v2/batches/inspect/12af3453-62da-4b31-b646-631b7b5f3009",
    "ref": "12af3453-62da-4b31-b646-631b7b5f3009",
    "checksum": "b1d600dbf7463924e24647e626cd7c1e",
    "size": 227,
    "location": {
        "href": "https://sitecore-batch-service-production-eu-west-1.s3.eu-west-1.amazonaws.com/pqsTELpfrXBzxKozB0IoL4xuAT0s7WrH/12af3453-62da-4b31-b646-631b7b5f3009/import.gz?X-Amz-Security-Token=IQo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KoJlEjgplRBSMEKhYaLbb9OQjKayNjAfDHGNDGr3%2FeGWuhg7SXAXHa1fs1%2BDqeErCylLFgS3TzFH2D7uTNCiSa6z2QS47PQ5lCYhjWqx9odsrCOmAKTrg23disfNZOaHKnlZaug2Yn7zDgbNneWs%2FKjX5GX&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230110T083848Z&X-Amz-SignedHeaders=content-md5%3Bhost%3Bx-amz-server-side-encryption&X-Amz-Expires=3600&X-Amz-Credential=ASIAXFYJLCYVPNLGNNGA%2F20230110%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=00adb6369887346dafc2fdce630f1527ab9482fb2307c921d2850b0d09c0aace",
        "expiry": "2026-01-10T09:`38:48`.910Z"
    },
    "status": {
        "code": "file_uploaded"
    },
    "createdAt": "2026-01-10T08:`38:48`.910Z",
    "modifiedAt": "2026-01-10T08:`38:49`.000Z"
}

```

Status: `error`:

```json
{
   "href":"<baseURL>/v2/batches/3ee694e5-0b77-2d1e-af19-1aa78f500785",
   "ref":"3ee694e5-0b77-2d1e-af19-1aa78f500785",
   "checksum":"40d9a12f0a3c93c8ed66a3b6f3735790",
   "size":3456,
   "location":{
      "href":"https://sitecore-batch-service-dev-eu-west-1.s3.amazonaws.com/xyzsla2xze5vxn02kf283wo020jg/3ee694e5-0b77-2d1e-af19-1aa78f500785/import.gz?AWSAccessKeyId=AKIAI2JLVI7OT2L6QDRQ&Expires=1459953714&Signature=yIG7nFv5w%2B2N%2Fkz11Eh7BjqSt2U%3D",
      "expiry":"2026-04-24T09:`33:00`.770Z"
   },
   "status":{
      "code":"error",
      "log":"https://sitecore-batch-service-dev-eu-west-1.s3.amazonaws.com/xyzsla2xze5vxn02kf283wo020jg/3ee694e5-0b77-2d1e-af19-1aa78f500785/import.gz?AWSAccessKeyId=AKIAI2JLVI7OT2L6QDRQ&Expires=1459953714&Signature=yIG7nFv5w%2B2N%2Fkz11Eh7BjqSt2U%3D"
   },
   "summaryStats":{
      "timeToProcessMillis":614867,
      "totalCount":121776,
      "succeededCount":121460,
      "failedCount":316
   },
   "createdAt":"2026-04-24T08:`33:00`.770Z",
   "modifiedAt":"2026-04-24T08:`46:04`.000Z"
}

```