Membership Tier

Get all membershipTiers for entity

get

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
GET /api/entities/{entityId}/membershipTiers HTTP/1.1
Host: api.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

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
POST /api/entities/{entityId}/membershipTiers HTTP/1.1
Host: api.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

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
GET /api/entities/{entityId}/membershipTiers/{membershipTier} HTTP/1.1
Host: api.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

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
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/update HTTP/1.1
Host: api.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

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
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/delete HTTP/1.1
Host: api.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

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
POST /api/entities/{entityId}/membershipTiers/{membershipTier}/claim-rewards HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 24

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

Last updated