# 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

```json
{
  "originalPrice": "number",
  "discountedPrice": "number",
  "discountPercentage": "string"
}
```


---

# 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/discount-discover.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.
