POST
finance
vat_calc
1 creditCalculate VAT amount and gross/net from a net or gross price and rate
Endpoint
POST /api/v1/tools/finance/vat_calc
Body Parameters
mode
string
required
Options:
net_to_gross
gross_to_net
rate
number
required
amount
number
required
Example
input
Request
{
"mode": "net_to_gross",
"rate": 21,
"amount": 100
}
output
Response
{
"net": 100,
"vat": 21,
"rate": 21,
"gross": 121
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"net": 100,
"vat": 21,
"rate": 21,
"gross": 121
},
"meta": {
"tool": "vat_calc",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.