---
title: >-
  The Product Discount Function API now supports cart line targeting - 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/the-product-discount-function-api-now-supports-cart-line-targeting
  md: >-
    https://shopify.dev/changelog/the-product-discount-function-api-now-supports-cart-line-targeting.md
metadata:
  effectiveApiVersion: 2024-07
  affectedApi: []
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2023-11-28T10:37:32-05:00'
  postedAt: '2024-07-01T09:00:00-04:00'
  updatedAt: '2024-06-06T13:02:59-04:00'
  effectiveAt: '2024-07-01T09:00:00-04:00'
---

July 1, 2024

Tags:

* API
* 2024-07

# The Product Discount Function API now supports cart line targeting

As of API Version `2024-07`, the Product Discount Function API now supports a new target type: `CartLineTarget`, allowing for the application of discounts on specific cart lines, a use case that has historically only been possible with Shopify Scripts. This update can be used to link discounts to attributed cart lines such as upsell products, free gifts with purchase, or buyer customized products. You can learn more about the [Product Discount Function API here](https://shopify.dev/docs/api/functions/reference/product-discounts/).
