Shopify Discount API

The Discount API from Shopify — 36 operation(s) for discount.

Business capability
Discount & Promotion Management BC-440.30

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /admin/api/2020-01/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (API 2020-01) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“Which discount codes belong to a price rule, on API version 2020-01?”
“Can I see every code generated under one price rule with the 2020-01 release?”
Tell an agent
List discount codes for price rule {price_rule_id} using 2020-01.
Show all codes attached to price rule {price_rule_id}, API version 2020-01.
GET /admin/api/2020-04/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (API 2020-04) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“What promo codes are tied to a specific price rule in release 2020-04?”
“How do I pull the discount codes of one price rule on version 2020-04?”
Tell an agent
Get the discount codes under price rule {price_rule_id} via 2020-04.
Using the 2020-04 API, fetch every code for price rule {price_rule_id}.
GET /admin/api/2020-07/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (API 2020-07) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“Can the 2020-07 API list the coupon codes that a price rule issued?”
“Which codes does a single price rule have, checked with release 2020-07?”
Tell an agent
Retrieve price rule {price_rule_id}'s discount codes on 2020-07.
Pull the code list for price rule {price_rule_id} with API version 2020-07.
GET /admin/api/2020-10/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (API 2020-10) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“How do I list all the discount codes created for a Shopify price rule?”
“What codes exist under one price rule on the current 2020-10 API?”
Tell an agent
List every discount code for price rule {price_rule_id} with API 2020-10.
Show me the codes belonging to price rule {price_rule_id}, version 2020-10.
GET /admin/api/2021-01/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (API 2021-01) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“Which discount codes hang off a given price rule in the 2021-01 release?”
“Can I enumerate one price rule's coupon codes using version 2021-01?”
Tell an agent
Fetch discount codes of price rule {price_rule_id} through 2021-01.
On release 2021-01, list the codes issued by price rule {price_rule_id}.
GET /admin/api/unstable/price_rules/{price_rule_id}/discount_codes.json List a price rule's discount codes (unstable API) · Shopify Retrieve A List Of Discount Codes #
Ask an LLM
“Can the unstable API version list a price rule's discount codes?”
“What discount codes does one price rule have according to the unstable release?”
Tell an agent
List discount codes for price rule {price_rule_id} on the unstable API.
Using the unstable version, get all codes under price rule {price_rule_id}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/shopify-discount-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

shopify-discount-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Shopify Discount API
  description: Explore Shopify's API reference and templating documentation. Shopify provides a range of software tools, app templates, example apps, and libraries to accelerate your development process. The Admin API lets you build apps and integrations that extend and enhance the Shopify admin.
  version: 2020-10
tags:
- name: Discount
paths:
  /admin/api/2020-01/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-2020-01
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: deprecated_202001_get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
  /admin/api/2020-04/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-2020-04
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: deprecated_202004_get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
  /admin/api/2020-07/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-2020-07
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: deprecated_202007_get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
  /admin/api/2020-10/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-2020-10
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
  /admin/api/2021-01/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-2021-01
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: deprecated_202101_get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
  /admin/api/unstable/price_rules/{price_rule_id}/discount_codes.json:
    get:
      summary: Shopify Retrieve A List Of Discount Codes
      description: https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#index-unstable
      parameters:
      - in: path
        name: price_rule_id
        required: true
        schema:
          type: string
        description: price_rule_id
      tags:
      - Discount
      responses:
        '200':
          description: ''
      operationId: deprecated_unstable_get_price_rules_param_price_rule_id_discount_codes
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true