---
title: >-
  Expose the discount class for applied_discounts and discount_allocations on a
  line item for the Checkout Admin REST API - Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/expose-the-discount-class-for-applied_discounts-and-discount_allocations-on-a-line-item-for-the-checkout-admin-rest-api
  md: >-
    https://shopify.dev/changelog/expose-the-discount-class-for-applied_discounts-and-discount_allocations-on-a-line-item-for-the-checkout-admin-rest-api.md
metadata:
  effectiveApiVersion: 2023-07
  affectedApi: []
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: false
  createdAt: '2023-05-31T08:29:16-04:00'
  postedAt: '2023-07-01T00:00:00-04:00'
  updatedAt: '2024-12-13T17:24:38-05:00'
  effectiveAt: '2023-07-01T00:00:00-04:00'
---

July 1, 2023

Tags:

* API
* 2023-07

# Expose the discount class for applied\_discounts and discount\_allocations on a line item for the Checkout Admin REST API

The `2023-07` API version of the [Checkout Admin REST API](https://shopify.dev/docs/api/admin-rest/unstable/resources/checkout) will expose the `discount_class` attribute in the `line_items[n].applied_discounts` and `line_items[n].discount_allocations`.

The `discount_class` identifies the type of discount applied to a line\_item:

`PRODUCT` - denotes a Product class discount that applies to specific products only. `ORDER` - denotes an Order class discount that applies across all line items.

The following example shows the `"discount_class": "ORDER"` present for the line item when an order class discount was applied to a checkout.

```
"line_items": [
    {
        "id": "a93dfd7540730e5d9812a92fac5a640e",
        "key": "a93dfd7540730e5d9812a92fac5a640e",
        "product_id": 6,
        "variant_id": 10,
        "sku": "jeans1",
        "vendor": "",
        "title": "Jeans",
        "variant_title": "Black",
        "image_url": "",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "50.00",
        "compare_at_price": "30.00",
        "line_price": "50.00",
        "properties": {},
        "quantity": 1,
        "grams": 0,
        "fulfillment_service": "manual",
        "applied_discounts": [],
        "discount_allocations": [
            {
                "id": null,
                "amount": "20.00",
                "description": "ORDER$20",
                "created_at": null,
                "application_type": "discount_code",
                "discount_class": "ORDER"
            }
        ],
        "tax_lines": []
    }
],
```
