# Retrieve GL Accounts Template

`GET /lokta-lms/api/v1/glaccounts/template`

Returns the field defaults and allowed values for creating a general ledger account.

This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:

Field Defaults
Allowed Value Lists
Example Request:

glaccounts/template
glaccounts/template?type=1

type is optional and integer value from 1 to 5.

1.Assets
2.Liabilities
3.Equity
4.Income
5.Expenses

## Parameters
- `type` (query, integer): type

## Responses
- `200`: OK

## Response fields
- `accountTypeOptions` (array of EnumOptionData)
- `allowedAssetsTagOptions` (array of CodeValueData)
- `allowedEquityTagOptions` (array of CodeValueData)
- `allowedExpensesTagOptions` (array of CodeValueData)
- `allowedIncomeTagOptions` (array of CodeValueData)
- `allowedLiabilitiesTagOptions` (array of CodeValueData)
- `assetHeaderAccountOptions` (array of GLAccountData)
- `disabled` (boolean)
- `equityHeaderAccountOptions` (array of GLAccountData)
- `expenseHeaderAccountOptions` (array of GLAccountData)
- `liabilityHeaderAccountOptions` (array of GLAccountData)
- `manualEntriesAllowed` (boolean)
- `type` (EnumOptionData)
- `usage` (EnumOptionData)
- `usageOptions` (array of EnumOptionData)

## Example request (cURL)
```bash
curl -X GET \
  'https://default.lokta.tech/lokta-lms/api/v1/glaccounts/template' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "accountTypeOptions": [
    {}
  ],
  "allowedAssetsTagOptions": [
    {}
  ],
  "allowedEquityTagOptions": [
    {}
  ],
  "allowedExpensesTagOptions": [
    {}
  ]
}
```

Interactive: https://developer.lokta.ai/reference#operation/retrieveNewAccountDetails
