---
title: >-
  Create automatic and code discounts in GraphQL with our new Discounts 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/create-automatic-and-code-discounts-in-graphql-with-our-new-discounts-api
  md: >-
    https://shopify.dev/changelog/create-automatic-and-code-discounts-in-graphql-with-our-new-discounts-api.md
metadata:
  effectiveApiVersion: ''
  affectedApi: []
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: false
  createdAt: '2019-06-18T10:53:39-04:00'
  postedAt: '2019-06-19T00:00:00-04:00'
  updatedAt: '2024-02-02T10:04:54-05:00'
  effectiveAt: '2019-06-19T00:00:00-04:00'
---

June 19, 2019

Tags:

* API

# Create automatic and code discounts in GraphQL with our new Discounts API

We’re releasing a new Discounts API that has the ability to create and manage automatic and code discounts in the Shopify GraphQL Admin API.

***

The new Discounts API brings the ability to create and manage Automatic Discounts via the API. Additionally, they also allow the creation of standard code-based discounts without the need for using the PriceRule resource.

The capabilities include:

* Automatic discounts of Buy X Get Y, or Basic (flat percentage or dollar value)
* Code discounts of Buy X Get Y, Basic, or Free Shipping

**Learn More**

This feature is available in the unstable version of the GraphQL Admin API today. To start working with the new Discounts API check out our [getting started with discounts](https://help.shopify.com/en/api/guides/discounts) guide.
