---
title: "customerRewardCreate"
description: >
  Create a discount code customer reward and issue it to the specified customers. The customer reward will appear in the respective Rewards module in the **Member component** and the **User center**.
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/member-system/mutations/customer-reward-create'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/member-system/mutations/customer-reward-create.md'
---
# customerRewardCreate

Create a discount code customer reward and issue it to the specified customers. The customer reward will appear in the respective Rewards module in the **Member component** and the **User center**.

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

## Arguments

* `input`

  [CustomerRewardCreateInput](https://developer.shopline.com/docs/admin-graph-ql-api/member-system/inputs/customer-reward-create-input.md)

  The input fields for creating and issuing a customer reward.

## Returns

* `userErrors`

  [[UserError!]!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/user-error.md)

  A list of errors that occurred during reward creation and issuance.

## Examples

### Create and issue a discount code customer reward

Create a discount code customer reward and issue it to the specified customers. The customer reward will appear in the respective Rewards module in the **Member component** and the **User center**.

**Request:**

```json
{
  "input": {
      "buyerIds": [
        "4603752891"
    ],
    "businessId": "********123456",
    "rewardType": "PERCENTAGE_DISCOUNT",
    "benefitsDetails": "50",
    "rewardUsageInstructionType": "MIN_PURCHASE_AMOUNT",
    "rewardUsageInstructionValue": "20",
    "usageLimits": 1,
    "autoStackLimit": "false",
    "codeStackLimit": "false",
    "rewardExpiryTime": "2027-07-06T16:06:18Z"
  }
}
```

**Response:**

```json
{
  "data": {
    "extensions": {
      "cost": {
        "actualQueryCost": 12,
        "requestedQueryCost": 12,
        "throttleStatus": {
          "restoreRate": 50000,
          "currentlyAvailable": 49988,
          "maximumAvailable": 50000
        }
      }
    },
    "data": {
      "customerRewardCreate": {
        "userErrors": []
      }
    }
  }
}
```

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

