PriceRuleDiscountCode object
A discount code of a price rule.
Required access
read_price_rules
access scope.
On this page
Fields
- app (
[App](https://shopify.dev/docs/admin-api/graphql/reference/apps/app)
)
The application that created the discount code. - code (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
The code to use the discount. - id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)
)
Globally unique identifier. - usageCount (
[Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)
)
The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.
Types that return PriceRuleDiscountCode
[PriceRule.discountCodes](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerule#discountcodes-2021-01)
Mutations for PriceRuleDiscountCode
- priceRuleDiscountCodeCreate
Create a discount code for a price rule. - priceRuleDiscountCodeUpdate
Update a discount code for a price rule.
Implements
[Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)
An auto-generated type for paginating through multiple PriceRuleDiscountCodes.
On this page
Fields
- edges (
[[PriceRuleDiscountCodeEdge!]!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerulediscountcode)
)
A list of edges. - pageInfo (
[PageInfo!](https://shopify.dev/docs/admin-api/graphql/reference/pageinfo)
)
Information to aid in pagination.
An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination.
On this page
Fields
- cursor (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
A cursor for use in pagination. - node (
[PriceRuleDiscountCode!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerulediscountcode)
)
The item at the end of PriceRuleDiscountCodeEdge.
Types that return PriceRuleDiscountCodeEdge
[PriceRuleDiscountCodeConnection.edges](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/pricerulediscountcode#edges-2021-01)