ZioMark's HUB | API Documentation
DiscordAbout Me
  • 🔳Introduction
    • 🔐Authentication
  • 🔲GET Endpoints
    • ▫️Dec to Hex
    • ▫️Hex to Dec
    • ▫️Timetamp to Date
    • ▫️CFX
    • ▫️Date
    • ▫️Date & Time Formatter
    • ▫️Text over Image
    • ▫️Image over Image
    • ▫️Weather
    • ▫️Translate
    • ▫️Convert Currency
    • ▫️Geolocation
    • ▫️QR Code Generator
    • ▫️Image Format Converter
    • ▫️Key Generator
    • 🌐Bored
    • ▫️BMI Calculator
    • ▫️VAT Calculator
    • ▫️SEO Analyzer
    • ▫️Local Time
    • ▫️Discount Calculator
    • ▫️Discount Discover
  • 🔲POST Endpoints
    • ▫️HTML to PDF
    • ▫️Loan Calculator
    • ▫️Excel to CSV
Powered by GitBook
On this page
  • /discount/calc-disc
  • Query Parameters
  • Response
  1. GET Endpoints

Discount Discover

/discount/calc-disc

This endpoint calculates the discount percentage based on the original price and the discounted price provided in the query parameters. It returns the original price, discounted price, and the calculated discount percentage. If any of the parameters are missing, not numbers, or the discounted price is greater than or equal to the original price, it returns a 400 error with a corresponding message.

Query Parameters

Parameter
Type
Description

originalPrice

number

The original price of the product or service.

discountedPrice

number

The discounted price of the product or service.

Response

{
  "originalPrice": "number",
  "discountedPrice": "number",
  "discountPercentage": "string"
}
PreviousDiscount CalculatorNextPOST Endpoints

Last updated 1 year ago

🔲
▫️