---
title: "Calculate a discount"
method: POST
path: "/discounts/calculate"
tags: ["Discounts"]
---

# Calculate a discount

`POST /discounts/calculate`

Calculate a discount for an array of offers.

## Request body

- object
  - `offers` object[], required — Define the offers to calculate the discount for.
    - `offer_id` integer, required — Offer ID associated with offer.
    - `item_id` integer — Item ID associated with offer.
    - `offer_quantity` integer — The quantity of the offer.
    - `offer_price` string — Override offer price.
    - `discount_code` string, required — Discount code to apply.

## Response `200`

OK

- object
  - `offers` object[]
    - `offer_id` integer
    - `offer_price` string
    - `offer_quantity` integer
    - `offer_price_total` string
    - `offer_total_discount` string
    - `offer_discounted_price_total` string
    - `discount_details` object
      - `total_discount` string
      - `label` string
      - `cart_label` string
      - `quantity_description` string
      - `order_discount_total` string
      - `dunning_discount_total` string
      - `quantity_discount_total` string
      - `discount_code_discount_total` string
      - `promotional_profile_discount_total` string
      - `per_offer` string
      - `discount_code_valid` boolean
      - `discount_code_message` string

## Other responses

- `400` — Error response
- `401` — Unauthorized response
- `403` — Forbidden response
- `500` — Error response

---

[API](https://skmtc.net/vrio/apis/crm-configuration.md) · [All operations](https://skmtc.net/vrio/apis/crm-configuration/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vrio/crm-configuration/revisions/62037010356e/schema)
