Skip to content
On this page

Partner: Badge API

EndpointMethodDescription
/api/v0/partnerRpc/badge.createUserBadgejsonRpcCreate user badge
/api/v0/partnerRpc/badge.listUserBadgesjsonRpcList user badges

Create user badge

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/partnerRpc/badge.createUserBadge

Request:

{
    "userId": string
    "badge": {
        "badgeType": string
        "data": map[string]{ custom structure }
    }
}

Response:

{ empty }

List user badges

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/partnerRpc/badge.listUserBadges

Request:

{
    "userId": string
    "offset": int
    "size": int
}

Response:

{
    "data": {
        "badges": [{
            "userId": string
            "id": string
            "created": timestamp
            "updated": timestamp
            "badgeType": string
            "data": map[string]{ custom structure }
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}