# TaxSessionsPublicController_GetByHeader

Returns tax session details for the specified HeaderId and Sequence.

`GET /api/v1/TaxSessions/GetByHeader`

**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_GetByHeader/

## Description

Returns tax session details for a single tax session identified by HeaderId and Sequence.
Use the fields parameter to control which properties are returned. Default fields:
CompanyId, HeaderId, Country, Jurisdiction, TaxpayerType, TerminalCode, LocationID,
ReturnCode, ReturnEffectiveDate, StartDate, Sequence.

## 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. |
| `sequence` | integer | query | No | The sequence of the specified tax session (Default: 0). |
| `fields` | string | query | No | Comma-separated list of fields to return. Use *all for all fields. Default returns a subset of key fields. |
| `quickFail` | boolean | query | No | If true, returns 400 immediately when an invalid field name is specified (Default: false). |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns the requested tax session fields. |  |
| 400 | The HeaderId/Sequence is invalid or not associated with the specified company. |  |
| 401 | Authentication credentials are incorrect. |  |

## Example Request

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