← All tool references

Finance · not_available

Percent Off Calculator

Percent Off with transparent inputs and reviewable results.

Open public tool

Overview

Category
Finance
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/percent-off-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/percent-off-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

original_price · number · required
Enter original price.
discount · number · required
Enter discount.
sales_tax · number · required
Enter sales tax.
{
    "type": "object",
    "properties": {
        "original_price": {
            "type": "number",
            "description": "Enter original price."
        },
        "discount": {
            "type": "number",
            "description": "Enter discount."
        },
        "sales_tax": {
            "type": "number",
            "description": "Enter sales tax."
        }
    },
    "required": [
        "original_price",
        "discount",
        "sales_tax"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

final_price · number
Final price produced by the tool.
savings · number
Savings produced by the tool.
tax · number
Tax after discount produced by the tool.
{
    "type": "object",
    "properties": {
        "final_price": {
            "type": "number",
            "description": "Final price produced by the tool."
        },
        "savings": {
            "type": "number",
            "description": "Savings produced by the tool."
        },
        "tax": {
            "type": "number",
            "description": "Tax after discount produced by the tool."
        }
    },
    "additionalProperties": false
}

Percent Off Calculator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/percent-off-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "original_price": 120,
    "discount": 25,
    "sales_tax": 8.25
}'
{
    "ok": true,
    "data": {
        "slug": "percent-off-calculator",
        "result": {
            "values": {
                "final_price": 97.4200000000000017053025658242404460906982421875,
                "savings": 30,
                "tax": 7.4199999999999999289457264239899814128875732421875
            },
            "display": {
                "display": "97.42"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.