---
title: "customerRewardsInfo"
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/member-system/queries/customer-rewards-info'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/member-system/queries/customer-rewards-info.md'
---
# customerRewardsInfo

查询单个客户已获得的奖励信息，包括剩余可用奖励数和奖励适用和限制明细。

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

## Arguments

* `after`

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

  返回指定游标之后的元素。如果指定了该参数，也必须要指定 `first` 参数。

* `before`

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

  返回指定游标之前的元素。如果指定了该参数，也必须要指定 `last` 参数。

* `first`

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

  返回列表中的前 n 个元素。

* `last`

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

  返回列表中的最后 n 个元素。

* `reverse`

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

  是否反转列表的顺序。
  
  ● true：反转
  
  ● false：不反转
  
  默认值：false

* `customerId`

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

  客户ID

## Returns

* `edges`

  [[CustomerRewardsInfoEdge!]](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/member-system/objects/customer-rewards-info-edge.md)

  edges  列表

* `pageInfo`

  [PageInfo!](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common-objects/objects/page-info.md)

  有助于分页的信息

* `nodes`

  [[Reward]](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/member-system/objects/reward.md)

  节点列表

## Examples

### 查询客户已获得奖励信息

查询单个客户已获得的奖励信息，包括剩余可用奖励数和奖励适用和限制明细。

**Request:**

```json
query {
  customerRewardsInfo(customerId: "gid://shopline/Customer/4602226680",first:200) {
    edges{
      cursor
      node{
        rewardScene
        rewardType
        redeemPointsValue
        couponUsageScope
        rewardExpiryTime
        rewardAcquireTime
        couponStatusDetail
        usageLimits
        benefitsUsageInstructionType
        autoStackLimit
        codeStackLimit
        couponStatus
        rewardSource
        benefitsDetails
      }
    }
    pageInfo{
      hasNextPage
      hasPreviousPage
      endCursor
      startCursor
    }
    nodes{
      rewardScene
      rewardType
      redeemPointsValue
      couponUsageScope
      rewardExpiryTime
      rewardAcquireTime
      couponStatusDetail
      usageLimits
      benefitsUsageInstructionType
      autoStackLimit
      codeStackLimit
      couponStatus
      rewardSource
      benefitsDetails
    }
  }
}
```

**Response:**

```json
{
  "data": {
    "data": {
      "customerRewardsInfo": {
        "pageInfo": {
          "endCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD",
          "hasNextPage": false,
          "hasPreviousPage": false,
          "startCursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
        },
        "edges": [
          {
            "node": {
              "rewardSource": "MEMBERSHIP_BENEFITS",
              "usageLimits": 1,
              "benefitsDetails": "1000",
              "benefitsUsageInstructionType": "NONE",
              "couponStatus": true,
              "rewardExpiryTime": null,
              "rewardScene": "LEVEL_UPGRADE",
              "rewardType": "CASH_VOUCHER",
              "autoStackLimit": true,
              "codeStackLimit": true,
              "couponStatusDetail": "EXPIRED",
              "couponUsageScope": "FOR_ALL",
              "redeemPointsValue": 0,
              "rewardAcquireTime": "2024-07-25T05:17:32.578Z"
            },
            "cursor": "B7A7E871D4D391780F0FE9B19FF23AAEA1838123E1C8CBCF696365A9DE00CA884670C07462378A3C2FA13904C0A12EAD"
          }
        ],
        "nodes": [
          {
            "rewardExpiryTime": null,
            "rewardType": "CASH_VOUCHER",
            "benefitsUsageInstructionType": "NONE",
            "couponStatusDetail": "EXPIRED",
            "redeemPointsValue": 0,
            "rewardScene": "LEVEL_UPGRADE",
            "rewardSource": "MEMBERSHIP_BENEFITS",
            "usageLimits": 1,
            "autoStackLimit": true,
            "benefitsDetails": "1000",
            "codeStackLimit": true,
            "couponStatus": true,
            "couponUsageScope": "FOR_ALL",
            "rewardAcquireTime": "2024-07-25T05:17:32.578Z"
          }
        ]
      }
    },
    "extensions": {
      "cost": {
        "actualQueryCost": 1401,
        "requestedQueryCost": 1401,
        "throttleStatus": {
          "restoreRate": 50000,
          "currentlyAvailable": 48599,
          "maximumAvailable": 50000
        }
      }
    }
  }
}
```

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

