# BulkUploadGLAccounts

Bulk upload GL accounts

`POST /api/v2/companies/{companyid}/glaccounts/$upload`

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

## Description

Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyid` | integer | path | Yes | The ID of the company that owns this GL account object |
| `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:** `GLAccountBulkUploadInputModel`

Represents a bulk upload input model.

| Property | Type | Required | Description |
|---|---|---|---|
| `glAccounts` | GLAccountRequestModel[] | No | List of GL accounts |

## Responses

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

### 200 Response: `GLAccountBulkUploadOutputModel`

Represents a bulk upload response model.

| Property | Type | Required | Description |
|---|---|---|---|
| `total` | integer | No | The total number of processed objects Example: `35`. |
| `failed` | GLAccountUploadErrorModel[] | No | A dictionary of the object and a respective list of errors |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyid}/glaccounts/$upload" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "glAccounts": [
    {
      "entityUseCode": "B",
      "effectiveDate": "1900-01-01",
      "endDate": "9998-12-31",
      "defaultItem": {
        "identifier": 0,
        "displayName": "CHIP1041"
      },
      "glAccountCode": "GLAccount_1"
    }
  ]
}'
```