---
title: "DiscountRedeemCodeBulkCreation"
description: "批量折扣兑换代码创建操作的属性和状态"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-redeem-code-bulk-creation'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-redeem-code-bulk-creation.md'
---
# DiscountRedeemCodeBulkCreation

批量折扣兑换代码创建操作的属性和状态

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

## Type Signature

`DiscountRedeemCodeBulkCreation`

## Fields

* `codesCount`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  要创建的代码数量。

* `createdAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  创建批量创建的日期和时间

* `discountCode`

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

  与创建的代码关联的代码折扣

* `done`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/boolean.md)

  批量创建是否仍在排队 (false) 还是已运行 (true)

* `failedCount`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  未成功创建的代码数

* `id`

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

  全球唯一的 ID

* `importedCount`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  成功创建的代码数量

## Schema Definition

```graphql
type DiscountRedeemCodeBulkCreation { 
	codesCount: Int
	createdAt: Date
	discountCode: DiscountCodeNode
	done: Boolean
	failedCount: Int
	id: ID
	importedCount: Int 
}
```

## Field from

* [DiscountRedeemCodeBulkAddPayload](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-redeem-code-bulk-add-payload.md).bulkCreation

  折扣兑换码批量创建操作ID

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes)。

