Quest Protocol
  • Introduction
    • Welcome to Quest Protocol
    • Integrate & Partner with Quest
    • Use Cases
      • Creator Platforms
      • Gaming
      • NFT Marketplaces
      • Social Media DApps
      • DeFi
  • QUEST PLATFORM
    • Creating a Campaign
    • Audience Overview
    • User Profile
    • Discover Page
    • Perk Store
    • Integrations
    • Memberships
    • Segmentation & Targetting
    • AI Insights
  • QUEST PROTOCOL - SDKs & APIs
    • UI SDK Components
      • Embedded XP Points
      • Embedded in-dApp Guides
      • Embedded Web3 Search
      • Embedded Quests
    • Quest SDKs & APIs
      • User
      • Entity
      • Badge
      • Campaign
      • App Metric
      • Membership Card
      • Entity Tag
      • Membership Tier
      • Skill
      • Entity Credit Tier
      • Gem
      • Custom Reward
      • Entity Gem
      • Entity Alert
      • Entity Feature Flag
      • Entity Data contract
      • Entity Authentication Token
      • Event Metric Mapping
    • Data Engine
  • Website
  • Quest Thesis
Powered by GitBook
On this page
  1. QUEST PROTOCOL - SDKs & APIs
  2. Quest SDKs & APIs

Membership Tier

PreviousEntity TagNextSkill

Last updated 1 year ago

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
400
Client error
application/json
500
Server error
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"
  }
}
  • GETGet all membershipTiers for entity
  • POSTAdd new membershipTier for entity
  • GETGet membershipTier details for entity
  • POSTUpdate membershipTier for entity
  • POSTDelete membershipTier for entity
  • POSTClaim rewards for a specific membership tier of an entity

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
400
Client error
application/json
500
Server error
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
400
Client error
application/json
500
Server error
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
}

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
400
Client error
application/json
500
Server error
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
400
Client error
application/json
500
Server error
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
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
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
}