# TaxSessionsPublicController_UnFileReturn

Marks the return as un-filed for the specified tax session.

`PUT /api/v1/TaxSessions/UnFileReturn`

**API:** Excise Platform API
**Tag:** Tax Sessions
**API Version:** v1
**Base URL:** https://excise.avalara.com
**Accepts:** `application/json`
**Authentication:** Basic (username + license key)

Source: https://developer.avalara.com/products/excise/api/methods/Tax%20Sessions/TaxSessionsPublicController_UnFileReturn/

## Description

Unfiles the highest sequence tax return for the specified HeaderId. The highest sequence must
currently be filed. The session ownership must match the current user's back-end indicator.
Unfiling is blocked if a mass file tax sessions task is currently running.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-company-id` | integer | header | Yes | Company ID that owns the data. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API. For more information on the client header, see Client Headers. |
| `headerId` | integer | query | Yes | The header id of the specified tax session. |
| `reason` | string | query | No | Optional reason for unfiling the tax session. |
| `unlock` | boolean | query | No | If true, also unlocks the tax session after unfiling (Default: false). |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | The tax return was unfiled successfully. |  |
| 400 | The session is not filed, ownership mismatch, or a mass file task is running. |  |
| 401 | Authentication credentials are incorrect. |  |

## Example Request

```bash
curl -X PUT "https://excise.avalara.com/api/v1/TaxSessions/UnFileReturn" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```