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

Entity Gem

PreviousCustom RewardNextEntity Alert

Last updated 1 year ago

Soft Delete Entity Gems of an Entity

post

Soft Delete Entity Gems info of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
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}/gem-contracts/{entityGemsContractId}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}
  • GETGet specific Entity Gems of an Entity
  • POSTAdd Entity Gems of an Entity
  • POSTUpdate Entity Gems of an Entity
  • POSTSoft Delete Entity Gems of an Entity
  • POSTIncrease Entity Gems of an user
  • POSTDecrease Entity Gems of an user

Get specific Entity Gems of an Entity

get

Get specific Entity Gems of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/gem-contracts/{entityGemsContractId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Add Entity Gems of an Entity

post

Add Entity Gems of specific entity.

Path parameters
entityIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
namestringRequired
sourcestringOptional
descstringOptional
logostringOptional
initialDefaultValuestringOptional
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}/gem-contracts/ HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "source": "text",
  "desc": "text",
  "logo": "text",
  "initialDefaultValue": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Update Entity Gems of an Entity

post

Update Entity Gems Info of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
namestringRequired
sourcestringRequired
descstringRequired
logostringRequired
initialDefaultValuestringRequired
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}/gem-contracts/{entityGemsContractId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "source": "text",
  "desc": "text",
  "logo": "text",
  "initialDefaultValue": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Increase Entity Gems of an user

post

Increase Entity Gems value of a particular user

Path parameters
entityIdstringRequired
userIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
valuestringRequired
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}/users/{userId}/gemsContracts/{entityGemsContractId}/increase HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "value": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "userId": "user1",
    "gemsContractId": {
      "entityId": "entity123",
      "name": "Gem Name",
      "desc": "Gem description",
      "source": "OFFCHAIN",
      "logo": "logo",
      "initialDefaultValue": 100,
      "isDeleted": false,
      "createdAt": "2023-06-27T12:45:00Z",
      "modifiedAt": "2023-06-27T12:45:00Z"
    },
    "value": 10
  }
}

Decrease Entity Gems of an user

post

Decrease Entity Gems value of a particular user

Path parameters
entityIdstringRequired
userIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
valuestringRequired
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}/users/{userId}/gemsContracts/{entityGemsContractId}/decrease HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "value": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "userId": "user1",
    "gemsContractId": {
      "entityId": "entity123",
      "name": "Gem Name",
      "desc": "Gem description",
      "source": "OFFCHAIN",
      "logo": "logo",
      "initialDefaultValue": 100,
      "isDeleted": false,
      "createdAt": "2023-06-27T12:45:00Z",
      "modifiedAt": "2023-06-27T12:45:00Z"
    },
    "value": 10
  }
}