Membership Tier

Get all membershipTiers for entity

get
/entities/{entityId}/membershipTiers

This endpoint retrieves all the membershipTiers of an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
pagestringOptional

The page number of expected set of documents.

Example: 1
limitstringOptional

The limit of the number of documents each page.

Example: 10
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200

Successful response

application/json
get
/entities/{entityId}/membershipTiers
GET /api/entities/{entityId}/membershipTiers?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "entityId": "entity123",
      "membershipTier": 1,
      "xpThreshold": 1000,
      "isEnabled": true,
      "createdAt": "2023-06-27T12:45:00Z",
      "description": "Membership tier description",
      "imageIPFS": "ipfs://image123"
    }
  ]
}

Add new membershipTier for entity

post
/entities/{entityId}/membershipTiers

This endpoint allows to add a new membershipTier for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
xPThresholdnumberRequiredExample: 100
membershipTiernumberRequiredExample: 2
imageIPFSstringOptionalExample: ipfs-hash
descriptionstringOptionalExample: description
Responses
200

Successful response

application/json
post
/entities/{entityId}/membershipTiers
POST /api/entities/{entityId}/membershipTiers?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "xPThreshold": 100,
  "membershipTier": 2,
  "imageIPFS": "ipfs-hash",
  "description": "description"
}
{
  "success": true
}

Get membershipTier details for entity

get
/entities/{entityId}/membershipTiers/{membershipTier}

This endpoint retrieves the membershipTier details of an entity.

Path parameters
entityIdstringRequired
membershipTierstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200

Successful response

application/json
get
/entities/{entityId}/membershipTiers/{membershipTier}
GET /api/entities/{entityId}/membershipTiers/{membershipTier}?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "membershipTier": 1,
    "xpThreshold": 1000,
    "isEnabled": true,
    "createdAt": "2023-06-27T12:45:00Z",
    "description": "Membership tier description",
    "imageIPFS": "ipfs://image123"
  }
}

Update membershipTier for entity

post
/entities/{entityId}/membershipTiers/{membershipTier}/update

This endpoint allows to update a membershipTier for an entity.

Path parameters
entityIdstringRequired
membershipTierstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
xPThresholdnumberRequiredExample: 100
imageIPFSstringOptionalExample: ipfs-hash
descriptionstringOptionalExample: description
Responses
200

Successful response

application/json
post
/entities/{entityId}/membershipTiers/{membershipTier}/update
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/update?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "xPThreshold": 100,
  "imageIPFS": "ipfs-hash",
  "description": "description"
}
{
  "success": true
}

Delete membershipTier for entity

post
/entities/{entityId}/membershipTiers/{membershipTier}/delete

This endpoint allows to delete a membershipTier for an entity.

Path parameters
entityIdstringRequired
membershipTierstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
objectOptional
Responses
200

Successful response

application/json
post
/entities/{entityId}/membershipTiers/{membershipTier}/delete
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/delete?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "success": true
}

Claim rewards for a specific membership tier of an entity

post
/entities/{entityId}/membershipTiers/{membershipTier}/claim-rewards

This endpoint allows users to claim rewards for a specific membership tier of an entity.

Path parameters
entityIdstringRequired
membershipTierstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
addToDynamicNFTbooleanRequired
Responses
200

Successful response

application/json
post
/entities/{entityId}/membershipTiers/{membershipTier}/claim-rewards
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/claim-rewards?userId=dummy-userid HTTP/1.1
Host: https:/.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "addToDynamicNFT": true
}
{
  "success": true
}

Last updated