Levels Module

Consists of all APIs related to Levels for a user in the Entity.

Levels Module assigns Levels based on XP and the reward at each level.

Get All Levels For Entity

Gets all the levels and threshold XP of an Entity.

GET https://api.questprotocol.xyz/api/entities/${entityID}/levels

Path Parameters

NameTypeDescription

entityID*

String

Entity or community Id

Query Parameters

NameTypeDescription

address*

String

signature*

String

Headers

NameTypeDescription

apiKey*

String

apiSecret*

String

[{
    communityId: c-asdf,
    level: 2,
    xpThreshold: 100,
    isEnabled: true
},
{
    communityId: c-asdf,
    level: 3,
    xpThreshold: 200,
    isEnabled: true
}]

Can be only performed by the admin/owner of the Entity.

Add a new Level For Entity

Adds a new level based on XPs for an Entity.

POST https://api.questprotocol.xyz/api/entities/${entityID}/levels

Path Parameters

NameTypeDescription

entityID

String

Entity or community Id

Query Parameters

NameTypeDescription

address*

String

signature*

String

Headers

NameTypeDescription

apiKey*

String

apiSecret*

String

Request Body

NameTypeDescription

xp*

String

This is the threshold XP which needs to be passed for the level

level*

String

{
    // Response
}

Can only be performed by the admin/owner of the Entity.

Delete Level For Entity

Delete a level in an Entity.

POST https://api.questprotocol.xyz/api/entities/${entityID}/levels/${level}/delete

Path Parameters

NameTypeDescription

entityID*

String

Entity or community Id

level

String

Level number that needs to be deleted

Query Parameters

NameTypeDescription

address*

String

signature*

String

Headers

NameTypeDescription

apiKey*

String

apiSecret*

String

{
    // Response
}

Can be only performed by admin/owner of the Entity.

Update Levels for Entity

Updates a level requirements in an Entity. Can be only performed by admin/owner of the Entity.

POST https://api.questprotocol.xyz/api/entities/${entityID}/levels/${level}/update

Path Parameters

NameTypeDescription

entityID*

String

Entity or community Id

level*

String

Level number that needs to be updated

Query Parameters

NameTypeDescription

signature*

String

address*

String

Headers

NameTypeDescription

apiKey*

String

apiSecret*

String

Request Body

NameTypeDescription

xp*

String

New XP threshold for the level

{
    // Response
}

Can only be performed by the admin/owner of the Entity.