Badge
This endpoint retrives all the badges that the user is associated with.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
GET /api/badges HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
Accept: */*
{
"success": true,
"data": [
{
"data": {
"xp": 10,
"visibility": "OPEN",
"type": "NONE",
"remainingCount": 100,
"createdAt": "2023-05-26T14:44:19.220Z",
"badgeId": "dummy-id",
"entityId": "e-000001",
"name": "dummy-badge-name",
"imageIPFS": "QmXdzQQ238rkdiM7i9YgXXEtm5n3Fypw9r6QPVtwjNMGzW",
"description": "dummy-description",
"skills": [
{
"skillId": "123",
"score": 123
}
],
"badgeContractTokenId": "dummy-token",
"endsAt": 1685198841965,
"typeData": [
"t"
],
"proofType": "Proof of Appreciation",
"createdBy": "u-0000001"
},
"inDyNFT": false,
"claimed": false,
"claimStatus": "UNCLAIMED"
}
]
}
This endpoint retrives all the badges a user has created.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/users/{userId}/created-badges HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": [
{
"data": {
"xp": 10,
"visibility": "OPEN",
"type": "NONE",
"remainingCount": 100,
"createdAt": "2023-05-26T14:44:19.220Z",
"badgeId": "dummy-id",
"entityId": "e-000001",
"name": "dummy-badge-name",
"imageIPFS": "QmXdzQQ238rkdiM7i9YgXXEtm5n3Fypw9r6QPVtwjNMGzW",
"description": "dummy-description",
"skills": [
{
"skillId": "123",
"score": 123
}
],
"badgeContractTokenId": "dummy-token",
"endsAt": 1685198841965,
"typeData": [
"t"
],
"proofType": "Proof of Appreciation",
"createdBy": "u-0000001"
},
"inDyNFT": false,
"claimed": false,
"claimStatus": "UNCLAIMED"
}
]
}
This endpoint retrives all the badges associated with an entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
GET /api/entities/{entityId}/badges HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
Accept: */*
{
"success": true,
"data": [
{
"data": {
"xp": 10,
"visibility": "OPEN",
"type": "NONE",
"remainingCount": 100,
"createdAt": "2023-05-26T14:44:19.220Z",
"badgeId": "dummy-id",
"entityId": "e-000001",
"name": "dummy-badge-name",
"imageIPFS": "QmXdzQQ238rkdiM7i9YgXXEtm5n3Fypw9r6QPVtwjNMGzW",
"description": "dummy-description",
"skills": [
{
"skillId": "123",
"score": 123
}
],
"badgeContractTokenId": "dummy-token",
"endsAt": 1685198841965,
"typeData": [
"t"
],
"proofType": "Proof of Appreciation",
"createdBy": "u-0000001"
},
"inDyNFT": false,
"claimed": false,
"claimStatus": "UNCLAIMED"
}
]
}
This endpoint adds a badge for an entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
The Id of the user performing the request.
dummy-userid
dummy-name
dummy-hash
dummy-description
u-00000001
1685198841965
0
false
NONE
10
LIMITED
dummy proof
POST /api/entities/{entityId}/badges HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
userid: dummy-userid
Content-Type: application/json
Accept: */*
Content-Length: 297
{
"name": "dummy-name",
"imageIPFS": "dummy-hash",
"description": "dummy-description",
"skills": [
{
"skillId": "dummy-id",
"score": 100
}
],
"userIds": [
"u-00000001"
],
"endsAt": 1685198841965,
"xp": 0,
"airdropEnabled": false,
"typeData": {},
"type": "NONE",
"totalCount": 10,
"visibility": "LIMITED",
"proofType": "dummy proof"
}
{
"success": true,
"badgeId": "badge-1212122"
}
This endpoint retrives the badge details associated with an entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/badges/{badgeId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"badge_data": {
"badgeId": "badge123",
"entityId": "entity123",
"badgeContractTokenId": "token123",
"name": "My Badge",
"imageIPFS": "https://example.com/badge-image.jpg",
"description": "This is my badge description.",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"isEnabled": true,
"visibility": "LIMITED",
"type": "DISCORD",
"typeData": {
"key1": "value1",
"key2": "value2"
},
"proofType": "Type A",
"endsAt": 1678900000,
"remainingCount": 5,
"createdBy": "user123",
"createdAt": "2023-06-27T12:45:00Z"
},
"skills_data": [
{
"skillId": "skil-12",
"score": 20,
"name": "Java",
"description": "sun-microsystem's java",
"isEnabled": true
}
],
"entity_data": {
"id": "entity123",
"entityURLAlias": "my-entity",
"entityRecordIds": [
"record1",
"record2"
],
"contracts": [
"contract1",
"contract2"
],
"badgeContractAddress": "0x123abc",
"dyNFTContractAddress": "0x456def",
"themeContractAddress": "0x789ghi",
"name": "My Entity",
"openseaSlug": "my-entity-slug",
"description": "This is my entity description.",
"twitter": "myentity",
"discord": "myentity#1234",
"telegram": "myentity",
"instagram": "myentity",
"website": "https://myentity.com",
"medium": "myentity",
"imageUrl": "https://example.com/myentity.jpg",
"bannerUrl": "https://example.com/myentity-banner.jpg",
"isEnabled": false,
"isPrivate": false,
"chainSource": "OFF_CHAIN",
"defaultDyNftThemeId": "0",
"discordQuestWebhookURL": "https://example.com/discord-webhook",
"modifiedAt": "2023-06-27T12:45:00Z",
"createdAt": "2023-06-25T09:00:00Z",
"plan": "FREE",
"theme": {},
"parentEntityId": "e-0000001"
},
"claimedUsers": [
{
"userId": "user-123"
}
],
"unclaimedUsers": [
{
"userId": "user-123"
}
],
"isOwner": true,
"stats": {
"claimedCount": 10,
"unclaimedCount": 5
},
"claimStatus": "NOT_WHITELISTED"
}
}
This endpoint updates a badge of an entity.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
dummy badge
ipfa-hash
updated the description
DISCORD
720000
20
POST /api/entities/{entityId}/badges/{badgeId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"name": "dummy badge",
"imageIPFS": "ipfa-hash",
"description": "updated the description",
"type": "DISCORD",
"skills": [
{
"skillId": "java",
"score": 100
}
],
"endsAt": 720000,
"xp": 20,
"typeData": {}
}
{
"success": true
}
This endpoint allows users to claim a badge for an entity
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
true
POST /api/entities/{entityId}/badges/{badgeId}/claim HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"addToDynamicNFT": true
}
{
"success": true,
"nftMinted": true,
"calculatedDynamicNFT": true
}
This endpoint allows an admin to add users to a Badge.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
["user-1","user-2"]
POST /api/entities/{entityId}/badges/{badgeId}/users HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"userIds": [
"user-1",
"user-2"
]
}
{
"success": true
}
Retrieve the number of badges earned by a specific user within a particular entity.
The unique identifier of the entity.
The unique identifier of the user within the entity.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/users/{userId}/badges-count HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": 5
}
Retrieve the badges earned by a specific user within a particular entity.
The unique identifier of the entity.
The unique identifier of the user within the entity.
Specify 'true' to prefix Badge IPFS URLs with the base URL.
The page number for paginated results (default: 1).
The number of items per page (default: 20).
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/users/{userId}/badges HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": [
{
"badgeId": "badge123",
"entityId": "entity123",
"badgeContractTokenId": "token123",
"name": "My Badge",
"imageIPFS": "https://example.com/badge-image.jpg",
"description": "This is my badge description.",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"isEnabled": true,
"visibility": "LIMITED",
"type": "DISCORD",
"typeData": {
"key1": "value1",
"key2": "value2"
},
"proofType": "Type A",
"endsAt": 1678900000,
"remainingCount": 5,
"createdBy": "user123",
"createdAt": "2023-06-27T12:45:00Z"
}
],
"page": 1,
"totalCount": 10,
"totalPages": 1
}
Last updated