---
title: "benefitsOfMembership"
description: >
  Query the membership types of all levels currently used in the store, as well as the corresponding upgrade thresholds, validity periods, etc.
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/member-system/queries/benefits-of-membership'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/member-system/queries/benefits-of-membership.md'
---
# benefitsOfMembership

Query the membership types of all levels currently used in the store, as well as the corresponding upgrade thresholds, validity periods, etc.

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

## Arguments

* `levelCode`

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

  The encoding of the grade.
  Maximum length: 25

## Returns

* `benefitsInfo`

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

  Basic information about membership level benefits.

* `customPrivileges`

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

  Basic information about membership level custom previleges.

## Examples

### query benefitsOfMembership

Query the benefits information of a single level or paid membership type, including the benefits applicability and restriction details.

**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": [
          {
            "benefitsDetails": "1000",
            "benefitsUsageInstructionValue": "10000",
            "specificCategoryList": null,
            "usageLimitsType": "UNLIMITED",
            "autoStackLimit": true,
            "benefitsExpiryDateType": null,
            "benefitsName": null,
            "benefitsStatus": "ACTIVE",
            "benefitsUsageInstructionType": "MIN_PURCHASE_AMOUNT",
            "codeStackLimit": true,
            "periodicallyDays": null,
            "specificProductIds": null,
            "benefitsDescription": null,
            "benefitsExpiryDateValue": null,
            "birthBenefitsReleaseType": null,
            "daysBefore": null,
            "fixedDate": null,
            "periodicallyMonths": null,
            "rewardType": "CASH_VOUCHER",
            "specificDate": null,
            "benefitsIcon": null,
            "benefitsIssuranceType": null,
            "productsApplicableType": "ALL",
            "usageLimitsTimes": null
          },
          {
            "benefitsDescription": null,
            "benefitsExpiryDateType": null,
            "benefitsName": null,
            "periodicallyDays": null,
            "rewardType": "POINTS",
            "usageLimitsType": "UNLIMITED",
            "autoStackLimit": false,
            "benefitsDetails": "10",
            "benefitsStatus": "ACTIVE",
            "birthBenefitsReleaseType": null,
            "daysBefore": null,
            "periodicallyMonths": null,
            "specificDate": null,
            "specificProductIds": null,
            "benefitsIcon": "BENEFIT_2",
            "benefitsUsageInstructionType": null,
            "fixedDate": null,
            "specificCategoryList": null,
            "benefitsExpiryDateValue": null,
            "benefitsIssuranceType": null,
            "benefitsUsageInstructionValue": null,
            "codeStackLimit": false,
            "productsApplicableType": "ALL",
            "usageLimitsTimes": null
          }
        ],
        "customPrivileges": []
      }
    }
  }
}
```

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

