LogoLogo
Contact API support
  • Build apps
  • Site Templates
  • REST API Reference
  • Storefronts (JS API)
  • Webhook automations
  • Discounts
  • Guides
  • Changelog
  • Overview
  • Payments
    • Online payments overview
    • Provide additional online payment method
    • Process online payment requests
      • Step 1. Decode and parse payment request from Ecwid
      • Step 2. Collect essential data for payment processing
      • Step 3. Initialize the transaction from payment provider
      • Step 4. Place order and return customer back to the store
    • Customize payments
      • Set up payment fees
      • Collect tips/donations at the checkout
      • Add payment instructions to the checkout
      • Show payment icons near your payment method at the checkout
      • Collect additional information before payment
      • Limit payments by selected shipping method
  • Shipping methods
    • Online shipping methods overview
    • Provide additional online shipping method
    • Process online shipping requests
      • Step 1. Parse shipping request
      • Step 2. Calculate shipping rates externally
      • Step 3. Send a response with shipping options
    • Shipping glossary
  • Orders
    • Get order details
      • Customer data in order details
      • Product prices in order details
      • Discounts in order details
      • Taxes in order details
    • Create orders
      • Calculate order details
      • Place new order with API
      • 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. Orders
  2. Get order details

Discounts in order details

PreviousProduct prices in order detailsNextTaxes in order details

Last updated 2 days 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