LogoLogo
Build appsContact API support
Orders
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
Orders
  • Orders management overview
  • Get order details
    • Customer data in order details
    • Product prices in order details
    • Discounts in order details
  • Taxes in order details
  • Create orders with API
    • Place new order with API
    • Calculate order details
  • Place a new order from the abandoned cart
  • Sync orders with external services
    • Sync orders manually
    • Automated orders sync

Lightspeed® 2025

On this page

Was this helpful?

  1. Get order details

Discounts in order details

PreviousProduct prices in order detailsNextTaxes in order details

Last updated 2 months ago

Was this helpful?

Get the following data about the discount coupons and promotions applied to the order with Ecwid API:

  • Sum of promotions applied to the order

  • Details on the applied discount coupon

  • Total discount from promotions and coupons

  • Detailed information about discounts applied to each product in the order

Configured order API call

You can filter out everything in the order details except for the discount data with the responseFields query param.

Request example:

GET /api/v3/STOREID/orders/ORDERID?responseFields=volumeDiscount,membershipBasedDiscount,totalAndMembershipBasedDiscount,couponDiscount,customDiscount,discount,discountInfo,discountCoupon,items(discounts,discountsAllowed) HTTP/1.1
Host: app.ecwid.com
Authorization: Bearer secret_token

Change STOREID with your store ID, ORDERID with the order ID (), and the secret_token with the secret access token of your app.

Response examples:

{
    "volumeDiscount": 9,
    "membershipBasedDiscount": 0,
    "totalAndMembershipBasedDiscount": 0,
    "couponDiscount": 10,
    "customDiscount": [],
    "discount": 9,
    "discountInfo": [
        {
            "value": 10,
            "type": "PERCENT",
            "base": "ON_TOTAL",
            "orderTotal": 50,
            "description": "10% off on cart total above €50,00",
            "appliesToItems": [],
            "appliesToOrderItems": [],
            "triggeredByOrderItems": []
        }
    ],
    "discountCoupon": {
        "id": 224223294,
        "name": "Test Coupon #2",
        "code": "DISC2",
        "discountType": "PERCENT",
        "status": "ACTIVE",
        "discount": 10,
        "launchDate": "2024-09-01 23:00:00 +0000",
        "usesLimit": "UNLIMITED",
        "repeatCustomerOnly": false,
        "applicationLimit": "UNLIMITED",
        "creationDate": "2024-09-02 08:32:37 +0000",
        "updateDate": "2024-09-02 08:26:35 +0000",
        "orderCount": 0
    },
    "items": 
}
{
    "volumeDiscount": 0,
    "membershipBasedDiscount": 0,
    "totalAndMembershipBasedDiscount": 0,
    "couponDiscount": 0,
    "discount": 0,
    "discountInfo": []
}

where:

  • volumeDiscount - Sum of promotions applied to the order subtotal.

  • membershipBasedDiscount - Sum of promotions applied to customer groups.

  • totalAndMembershipBasedDiscount - Sum of promotions applied to the order.

  • couponDiscount - Discount from applied coupon.

  • customDiscount - List of discounts applied by a custom app. If empty, no custom discounts are applied.

  • discount - Total sum of all discounts applied to the order.

  • discountInfo - List with details on all promotions applied to the order.

  • discountCoupon - Details on applied discount coupon.

  • items.discounts.discountInfo - List with details on all promotions applied to the specific product in the order.

  • items.discounts.total - Total sum of promotions applied to the specific product in the order. If total is less than the sum of items.discounts[].value, the discount is taxed.

  • items.discountsAllowed - If true, discounts are applied to the product. If false, the product is not affected by any of the order's discounts.

find order ID