Profiles - Goals

Goals Overview

Dashboard widget

GET ‎https://<domain>/<api prefix>/<version>/profiles/overview/

This endpoint will return goals overview data (dashboard widget).

Query Parameters

Name
Type
Description

profile_id

string

Profile Id

Headers

Name
Type
Description

apikey*

string

Apikey

Authorization*

string

Bearer access token

HTTP/1.1 200 OK
Content-Type: application/json

Body:
{
    "status_code": 200,
    "errors": {},
    "data": {
        "user_goals": {
            "<goal_key>": {
                "period": "<period>",
                "maximum": <maximum>,
                "minimum": <minimum>,
                "display_name": "<display_name>",
                "currency_code": "<currency_code>",
                "current": <current>,
                "percentage": <percentage>,
                "difference": <difference>
            },
            ...
        },
        "eligibleforupdate": <eligibleforupdate_status>,
        "profiles": [
            {
                "id": <profile_id>,
                "profilename": "<profile_name>"
            },
            ...
        ]
    }
}

Sample Code

Node

PHP

User Goals Leaderboard

GET ‎https://<domain>/<api prefix>/<version>/profiles/user/goals-leaderboard/

This API endpoint will return user goal leaderboard data.

Query Parameters

Name
Type
Description

profile

string

profile id

goal

string

goal keyword

Headers

Name
Type
Description

apikey*

string

Apikey

Authorization*

string

Bearer access token

Sample Code

Node

PHP

Error Responses

Status Code

Error Type

Field

Description

400

Validation Error

profile

Invalid profile id.

400

Validation Error

goal

Invalid goal keyword.

Last updated

Was this helpful?