--- title: DiscountCode - GraphQL Admin description: >- The type of discount associated with the discount code. For example, the discount code might offer a basic discount of a fixed percentage, or a fixed amount, on specific products or the order. Alternatively, the discount might offer the customer free shipping on their order. A third option is a Buy X, Get Y (BXGY) discount, which offers a customer discounts on select products if they add a specific product to their order. api_version: 2026-01 api_name: admin type: union api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/latest/unions/DiscountCode' md: 'https://shopify.dev/docs/api/admin-graphql/latest/unions/DiscountCode.md' --- # Discount​Code union Requires Apps must have `read_discounts` access scope. The type of discount associated with the discount code. For example, the discount code might offer a basic discount of a fixed percentage, or a fixed amount, on specific products or the order. Alternatively, the discount might offer the customer free shipping on their order. A third option is a Buy X, Get Y (BXGY) discount, which offers a customer discounts on select products if they add a specific product to their order. ## Possible types * DiscountCodeApp * DiscountCodeBasic * DiscountCodeBxgy * DiscountCodeFreeShipping *** ## Fields with this union * *** ```graphql union DiscountCode = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping ```