---
title: "DiscountCode"
description: "The type of discount associated with the discount code"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/unions/discount-code'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/unions/discount-code.md'
---
# DiscountCode

The type of discount associated with the discount code

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Union

## Type Signature

`DiscountCode`

## Possible Types

* [DiscountCodeBasic](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-basic.md)

* [DiscountCodeBxgy](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-bxgy.md)

* [DiscountCodeFreeShipping](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-free-shipping.md)

## Schema Definition

```graphql
 DiscountCode { 
	 
}
```

## Field from

* [DiscountCodeNode](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-node.md).codeDiscount

  The underlying code discount object.
  
  

## Possible type of

* [DiscountCodeBasic](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-basic.md)

  A code discount that offers customers a percentage or fixed amount discount on specific products, collections or the entire order.

* [DiscountCodeBxgy](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-bxgy.md)

  A code discount that gives customers a Buy X Get Y (BXGY) deal.

* [DiscountCodeFreeShipping](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-free-shipping.md)

  A code discount that offers customers free shipping on their order.
  
  

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

