Tax Rates

GST/tax rate presets applied to items and line items.

GET/api/v1/tax-rates

List tax rates

Scope: taxes.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.

Example request

curl "https://invoice.avscorp.in/api/v1/tax-rates" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx6tax000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "name": "GST 12%",
  "ratePercent": 12,
  "isGST": true,
  "isDefault": false,
  "createdAt": "2026-01-05T04:00:00.000Z",
  "updatedAt": "2026-01-05T04:00:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden

POST/api/v1/tax-rates

Create a tax rate

Scope: taxes.create

Request body

FieldTypeRequiredConstraints
namestringRequiredmin length 1; max length 100
ratePercentnumberRequiredmin 0; max 100
isGSTbooleanOptionaldefault true
isDefaultbooleanOptionaldefault false

Example request

curl -X POST "https://invoice.avscorp.in/api/v1/tax-rates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "GST 12%",
  "ratePercent": 12
}'

Example response

JSON
{
  "id": "clx6tax000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "name": "GST 12%",
  "ratePercent": 12,
  "isGST": true,
  "isDefault": false,
  "createdAt": "2026-01-05T04:00:00.000Z",
  "updatedAt": "2026-01-05T04:00:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, validation_error

GET/api/v1/tax-rates/{id}

Get a tax rate

Scope: taxes.read

Parameters

NameInTypeRequiredDescription
idpathstringRequiredTax rate ID.

Example request

curl "https://invoice.avscorp.in/api/v1/tax-rates/clx6tax000000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx6tax000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "name": "GST 12%",
  "ratePercent": 12,
  "isGST": true,
  "isDefault": false,
  "createdAt": "2026-01-05T04:00:00.000Z",
  "updatedAt": "2026-01-05T04:00:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found

PATCH/api/v1/tax-rates/{id}

Update a tax rate

Scope: taxes.update

PATCH validates against the full tax rate schema (same as create) — name and ratePercent are required in every update, not just changed fields.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredTax rate ID.

Request body

FieldTypeRequiredConstraints
namestringRequiredmin length 1; max length 100
ratePercentnumberRequiredmin 0; max 100
isGSTbooleanOptionaldefault true
isDefaultbooleanOptionaldefault false

Example request

curl -X PATCH "https://invoice.avscorp.in/api/v1/tax-rates/clx6tax000000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "GST 18%",
  "ratePercent": 18
}'

Example response

JSON
{
  "id": "clx6tax000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "name": "GST 12%",
  "ratePercent": 12,
  "isGST": true,
  "isDefault": false,
  "createdAt": "2026-01-05T04:00:00.000Z",
  "updatedAt": "2026-01-05T04:00:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error

DELETE/api/v1/tax-rates/{id}

Delete a tax rate

Scope: taxes.delete

Parameters

NameInTypeRequiredDescription
idpathstringRequiredTax rate ID.

Example request

curl -X DELETE "https://invoice.avscorp.in/api/v1/tax-rates/clx6tax000000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "deleted": true
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found