# UpdateGLAccount

Update a single GL account

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

**API:** AvaTax API
**Tag:** GLAccount
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**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/UpdateGLAccount/

## Description

Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update.

## 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/) . |

## Request Body

**Schema:** `GLAccountRequestModel`

GL account request model

| Property | Type | Required | Description |
|---|---|---|---|
| `entityUseCode` | string | No | The entity use code Example: `G`. |
| `effectiveDate` | string | No | The "effective from" date Example: `2026-07-02T04:05:12.1525253+00:00`. |
| `endDate` | string | No | The end date Example: `2026-07-02T04:05:12.1525771+00:00`. |
| `defaultItem` | Int64TaxProfileObjectReferenceModel | No | The default item for this GL account |
| `glAccountCode` | string | **Yes** | The GL account code Example: `GLAccount1`. |

## 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 PUT "https://sandbox-rest.avatax.com/api/v2/companies/{companyid}/glaccounts/{glaccountid}" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "entityUseCode": "G",
  "effectiveDate": "2026-07-02",
  "endDate": "2026-07-02",
  "defaultItem": {
    "identifier": 0
  },
  "glAccountCode": "GLAccount1"
}'
```