Kibotu.AI
  • Engage players automatically
  • Documentation
    • Integration
    • API Reference
      • Personal Offers
      • Quests
    • Backoffice / Admin console
  • Unity SDK
    • Implementing Unity SDK
    • Reporting events
    • Fetching Personal Offer
    • Quests
Powered by GitBook
On this page
  • Get All Quests
  • Start Quest
  • Get Player's Active Quest
  • Add Progress in Quest
  • Finish Quest
  • Dismiss Quest
  • Verify Quest Prize
  1. Documentation
  2. API Reference

Quests

Get All Quests

Query for all the quests that are currently active in game.

POST https://api.kibotu.ai/quests/eligible

Request Body - Empty

Response Body

{ 
    list: [
        {
            occasionId: ObjectId,
            game: ObjectId,
            enabled: true,
            name: String,
            targetFilter: {},
            from: Date,
            to: Date,
            countryCodesArray: [String],
            collectibleIconImage: String (URL),            
            milestones: [
                {
                    order: Number,
                    prizeTitle: String,
                    prizeImage: String (URL),
                    prizeSku: String,
                    goal: Number,
                    goalImage: String (URL),
                }
            ],
            triggers: {
                // First processing `state`
                state: {
                    // event triggers quest activation (from a list)
                    welcome: [{
                        eventName: String,
                        eventValue: Number,
                    }],
                    // event triggers progress steps (item collected, step++)
                    progress: [{
                        eventName: String,
                        eventValue: Number,
                    }],
                    // event triggers progress finalization (could be the same as progress, but could be different, like finishing a world)
                    finish: [{
                        eventName: String,
                        eventValue: Number,
                    }]
                },
                // Then processing `ui`
                ui: {
                    // event triggers showing a modal for welcome state
                    welcome: [{
                        eventName: String,
                        eventValue: Number,
                    }],
                    // event triggers showing a modal for progress state
                    progress: [{
                        eventName: String,
                        eventValue: Number,
                    }],
                    // event triggers showing a modal for finish state
                    finish: [{
                        eventName: String,
                        eventValue: Number,
                    }]
                }
            },
            graphics: {
                welcome: {
                    background: String (URL),
                    titleImage: String (URL),
        
                    base: String (URL),
                    preview: String (URL),
                },
                progress: {
                    background: String (URL),
                    titleImage: String (URL),
        
                    base: String (URL),
                    preview: String (URL),
                },
                finish: {
                    background: String (URL),
                    titleImage: String (URL),
        
                    base: String (URL),
                    preview: String (URL),
                },
            }
        }
    ] 
}

Start Quest

Start the quest participation for the current player.

POST https://api.kibotu.ai/quests/:questId/start

Request parameters

Request Body

{
    playerId: String
}

Response Body - Empty on Success (http 200)

Get Player's Active Quest

Gets the quest that the current player is currently participating in.

POST https://api.kibotu.ai/quests/active

Request Body

{
    playerId: String
}
{
    progress: Number
}

Add Progress in Quest

Tracks the current player's progress in a specific quest.

POST https://api.kibotu.ai/quests/:questId/trigger

Request parameters

Request Body

{
    playerId: String
}

Response Body - on Success (http 200)

{
    newValue: Number
}

Finish Quest

Calculates whether the current player has won or lost this quest.

POST https://api.kibotu.ai/quests/:questId/finish

Request parameters

Request Body

{
    playerId: String
}

Response Body - Returns the latest milestone the player has achieved in this quest.

{
    order: Number,
    prizeTitle: String,
    prizeImage: String (URL),
    prizeSku: String,
    goal: Number,
    goalImage: String (URL),
}

Dismiss Quest

POST https://api.kibotu.ai/quests/:questId/finalize

Request parameters

Request Body

{
    playerId: String
}

Response Body - Empty on Success (http 200)

Verify Quest Prize

You will find this useful for server to server integration, when you want to verify the eligible prize of a finished quest (before committing the transaction of giving the prize)

POST https://api.kibotu.ai/quests/:questId/verify-prize

Request parameters

Request Body

{
    playerId: String
}

Response Body - Returns the eligible prize for the player (http 200)

{
    prizeSku: String
}
PreviousPersonal OffersNextBackoffice / Admin console

Last updated 1 year ago

questId - The _id of a quest is returned in the list of quests from the endpoint.

Response Body - Identical to the Quest object listed in the response, with an additional property

questId - The _id of a quest is returned from the endpoint.

questId - The _id of a quest is returned from the endpoint.

Removes the quest from the current player's list (at the moment list is limited to 1).

questId - The _id of a quest is returned from the endpoint.

questId - The _id of a quest is returned from the endpoint.

Get All Quests
Get All Quests
Get Player's Active Quest
Get Player's Active Quest
Active Quests
Get Player's Active Quest
Get Player's Active Quest