---
title: "benefitsOfMembership"
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/benefits-of-membership'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/member-system/queries/benefits-of-membership.md'
---
# benefitsOfMembership

查询店铺内当前使用的会员机制中，所有已创建的等级的会员类型，及对应的升级门槛、有效期等。

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

## Arguments

* `levelCode`

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

  等级的编码。
  最大长度限制：25

## Returns

* `benefitsInfo`

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

  会员等级下权益的基本信息

* `customPrivileges`

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

  会员等级下特殊权益的基本信息

## Examples

### 查询单个会员等级下的权益

查询单个等级或付费类型下的权益信息，包括剩余可用奖励数和奖励适用和限制明细。

**Request:**

```json
query {
  benefitsOfMembership(levelCode:"gid://shopline/Membership/MLC6568224957444662294") {
    benefitsInfo{
      benefitsDescription
      benefitsIssuranceType
      benefitsUsageInstructionValue
      benefitsExpiryDateValue
      specificDate
      fixedDate
      birthBenefitsReleaseType
      rewardType
      benefitsStatus
      benefitsExpiryDateType
      benefitsIcon
      periodicallyMonths
      usageLimitsType
      daysBefore
      specificProductIds
      periodicallyDays
      autoStackLimit
      benefitsUsageInstructionType
      codeStackLimit
      productsApplicableType
      benefitsName
      usageLimitsTimes
      specificCategoryList
      benefitsDetails
    }
    customPrivileges{
      privilegeDescription
      benefitsIcon
      privilegeName
    }
  }
}
```

**Response:**

```json
{
  "data": {
    "data": {
      "benefitsOfMembership": {
        "benefitsInfo": [
          {
            "benefitsIssuranceType": null,
            "benefitsName": null,
            "codeStackLimit": true,
            "autoStackLimit": true,
            "benefitsDetails": "1000",
            "benefitsExpiryDateValue": null,
            "benefitsIcon": null,
            "benefitsStatus": "ACTIVE",
            "daysBefore": null,
            "periodicallyDays": null,
            "specificCategoryList": null,
            "benefitsDescription": null,
            "benefitsUsageInstructionType": "MIN_PURCHASE_AMOUNT",
            "birthBenefitsReleaseType": null,
            "periodicallyMonths": null,
            "productsApplicableType": "ALL",
            "specificDate": null,
            "usageLimitsTimes": null,
            "usageLimitsType": "UNLIMITED",
            "benefitsExpiryDateType": null,
            "benefitsUsageInstructionValue": "10000",
            "fixedDate": null,
            "rewardType": "CASH_VOUCHER",
            "specificProductIds": null
          },
          {
            "benefitsExpiryDateType": null,
            "benefitsExpiryDateValue": null,
            "fixedDate": null,
            "periodicallyMonths": null,
            "rewardType": "POINTS",
            "specificDate": null,
            "specificProductIds": null,
            "benefitsDescription": null,
            "benefitsName": null,
            "benefitsUsageInstructionType": null,
            "birthBenefitsReleaseType": null,
            "productsApplicableType": "ALL",
            "usageLimitsTimes": null,
            "usageLimitsType": "UNLIMITED",
            "autoStackLimit": false,
            "benefitsIssuranceType": null,
            "benefitsStatus": "ACTIVE",
            "benefitsUsageInstructionValue": null,
            "periodicallyDays": null,
            "benefitsIcon": "BENEFIT_2",
            "codeStackLimit": false,
            "daysBefore": null,
            "specificCategoryList": null,
            "benefitsDetails": "10"
          }
        ],
        "customPrivileges": []
      }
    }
  }
}
```

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

