> For the complete documentation index, see [llms.txt](https://docs.ziomark.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ziomark.xyz/get-endpoints/vat-calculator.md).

# VAT Calculator

## /vat

This endpoint calculates the VAT (Value Added Tax) amount and total price based on the provided price and VAT rate. It returns the original price, VAT rate, calculated VAT amount, and total price. If any of the parameters are missing, not numbers, or the VAT rate is negative, it returns a 400 error with a corresponding message.

### Query Parameters

| Parameter | Type   | Description                                            |
| --------- | ------ | ------------------------------------------------------ |
| price     | number | The price of the product or service.                   |
| vatRate   | number | The VAT rate in percentage to be applied to the price. |

### Response

```json
{
  "originalPrice": "number",
  "vatRate": "string",
  "vatAmount": "number",
  "totalPrice": "number"
}
```
