# GetGLAccountById

Retrieve a single GL account

`GET /api/v2/companies/{companyid}/glaccounts/{glaccountid}`

**API:** AvaTax API
**Tag:** GLAccount
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/GLAccount/GetGLAccountById/

## Description

Retrieve details of a single GL account identified by its `glaccountid` and `companyid`

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyid` | integer | path | Yes | The ID of the company that owns this GL account object |
| `glaccountid` | integer | path | Yes | The primary key of this GL account |
| `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](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `GLAccountSuccessResponseModel` |
| 400 | Bad Request | `TaxProfileErrorResponseModel` |
| 401 | Unauthorized | `TaxProfileErrorResponseModel` |
| 403 | Forbidden | `TaxProfileErrorResponseModel` |
| 404 | Not Found | `TaxProfileErrorResponseModel` |

### 200 Response: `GLAccountSuccessResponseModel`

GL account response model

| Property | Type | Required | Description |
|---|---|---|---|
| `glAccountId` | integer | No | The GL account ID Example: `0`. |
| `companyId` | integer | No | The company ID to which this GL account belongs Example: `1`. |
| `meta` | TaxProfileMetaDataModel | No | Meta data of this GL account |
| `entityUseCode` | string | No | The entity use code Example: `G`. |
| `effectiveDate` | string | No | The "effective from" date Example: `2026-07-02T04:05:12.1696153+00:00`. |
| `endDate` | string | No | The end date Example: `2026-07-02T04:05:12.1696162+00:00`. |
| `defaultItem` | Int64TaxProfileObjectReferenceModel | No | The default item for this GL account |
| `glAccountCode` | string | **Yes** | The GL account code Example: `GLAccount1`. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/companies/{companyid}/glaccounts/{glaccountid}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```