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

# Archive transaction

> Soft-delete a transaction and its associated rewards. Archived transactions can be restored.

## Endpoint

```
POST https://api.partnero.com/v1/transactions/{key}/archive
```

Soft-deletes a transaction and its associated rewards. Unlike permanent deletion, archived transactions can be [restored](/api-reference/transactions/restore) later.

<Note>
  This endpoint is available for affiliate programs only.
</Note>

## Path parameters

| Parameter | Type   | Required | Description              |
| --------- | ------ | -------- | ------------------------ |
| `key`     | string | Yes      | Transaction's unique key |

## Request

```bash cURL theme={null}
curl --location --request POST 'https://api.partnero.com/v1/transactions/transaction_123/archive' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": 1
  }
  ```
</ResponseExample>

## Error responses

| Status | Error                 | Solution                             |
| ------ | --------------------- | ------------------------------------ |
| 404    | Transaction not found | Check the transaction key is correct |
| 400    | Action failed         | Transaction may already be archived  |

<Tip>
  Use archive instead of delete when you may need to reverse the action later. To undo an archive, use the [restore](/api-reference/transactions/restore) endpoint.
</Tip>
