# 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ziomark.xyz/get-endpoints/vat-calculator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
