---
title: "DiscountCodeNode"
description: "A node containing a code discount and its related events."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-node'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-code-node.md'
---
# DiscountCodeNode

A node containing a code discount and its related events.

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

## Type Signature

`DiscountCodeNode`

## Fields

* `codeDiscount`

  [DiscountCode](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/unions/discount-code.md)

  The underlying code discount object.
  
  

* `id`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  A globally-unique ID.
  
  

## Schema Definition

```graphql
type DiscountCodeNode { 
	codeDiscount: DiscountCode
	id: ID 
}
```

## Field from

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

  The activated code discount.

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

  The created code discount.
  
  

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

  The deactivated code discount.

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

  The updated code discount.

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

  按 ID 返回代码折扣资源

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/queries/code-discount-node-by-code.md).codeDiscountNodeByCode

  通过折扣码查询折扣信息。

* [DiscountRedeemCodeBulkCreation](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-redeem-code-bulk-creation.md).discountCode

  The code discount associated with the created codes.
  
  

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

  The updated code discount.

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

  Information to aid in pagination.

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

  The item at the end of DiscountCodeNodeEdge.
  
  

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

  The created code discount.

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

  The underlying code discount object.

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

  The created code discount.

## 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).

