# Create a new Tax Component

`POST /lokta-lms/api/v1/taxes/component`

Creates a new Tax Component

Mandatory Fields: name, percentage

Optional Fields: debitAccountType, debitAccountId, creditAccountType, creditAccountId, startDate

## Request body (application/json)
- `creditAccountId` (integer)
- `creditAccountType` (integer)
- `dateFormat` (string)
- `debitAccountId` (integer)
- `debitAccountType` (integer)
- `locale` (string)
- `name` (string)
- `percentage` (number)
- `startDate` (string)

## Responses
- `200`: OK

## Response fields
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X POST \
  'http://localhost:8080/lokta-lms/api/v1/taxes/component' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "creditAccountId": 4,
  "creditAccountType": 4,
  "dateFormat": "dd MMMM yyyy",
  "debitAccountId": 4,
  "debitAccountType": 2,
  "locale": "en",
  "name": "tax component 1",
  "percentage": 10,
  "startDate": "11 April 2016"
}'
```

## Example response
```json
{
  "resourceId": 1
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/createTaxComponent
