Skip to main content
Glama
discount.md1.47 kB
# Liquid Objects: Discount ## Overview The `discount` object represents a reduction applied to a cart, line item, or order within Shopify's Liquid templating language. **⚠️ Deprecated:** "not all discount types and details are captured." This object has been superseded by `discount_allocation` and `discount_application` objects. ## Properties | Property | Type | Description | |----------|------|-------------| | `amount` | number | The discount value in currency subunits, matching the presentment currency. "Use money filters to output a formatted amount." | | `code` | string | The customer-facing discount name (identical to `title`) | | `savings` | number | Negative representation of the discount amount in currency subunits | | `title` | string | The customer-facing discount name (identical to `code`) | | `total_amount` | number | The discount value in currency subunits, matching `amount` | | `total_savings` | number | Negative discount representation, matching `savings` | | `type` | string | Classification of discount type: `FixedAmountDiscount`, `PercentageDiscount`, or `ShippingDiscount` | ### Currency Handling Note For currencies without subunits (JPY, KRW), tenths and hundredths are appended. For instance, 1000 Japanese yen displays as 100000. ## Example ```json { "amount": "40.00", "code": "DIY", "savings": "-40.00", "title": "DIY", "total_amount": "40.00", "total_savings": "-40.00", "type": "PercentageDiscount" } ```

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/florinel-chis/shopify-liquid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server