---
title: "Cancels an upload that was never completed."
---

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

Path: Sherpo merchant API › file

`POST /v1/stores/{store}/assets/{asset}/cancel`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `file:write`

## Path parameters

- `store` (`cancelUpload.path.store`; string, required) — The store's id.
- `asset` (`cancelUpload.path.asset`; string, required)
  - minLength 1

## Header parameters

- `Idempotency-Key` (`cancelUpload.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Optional._

## Example request

```json
{}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/cancel' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/cancel';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/assets/<asset>/cancel"

payload = {}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Cancels an upload that was never completed.

#### Example

```json
{
  "id": "string",
  "deleted": true
}
```

- `id` (`cancelUpload.response.200.id`; string, required)
- `deleted` (`cancelUpload.response.200.deleted`; boolean, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`cancelUpload.response.default.type`; string, required)
  - format `uri`
- `title` (`cancelUpload.response.default.title`; string, required)
- `status` (`cancelUpload.response.default.status`; integer, required)
- `detail` (`cancelUpload.response.default.detail`; string, required)
- `code` (`cancelUpload.response.default.code`; string, optional)
- `context` (`cancelUpload.response.default.context`; object, optional)
- `reached_core` (`cancelUpload.response.default.reached_core`; boolean, optional)
- `core_answer` (`cancelUpload.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/cancel-upload/index.md
