unPLUGDevelopers

Challenges API

List a member's challenges Coming soon

GET/v1/members/me/challenges

Returns the member's state in every live challenge they can see, plus completed and expired ones from the last 90 days. Match each entry to List challenges on challenge_id.

Permissions: Member token.

Query parameters#

  • limitinteger
    As on every list.
    Min 1Max 100Default 25
  • cursorstring
    As on every list.

Response fields#

Returns 200 with list of MemberChallenge

  • dataarray of MemberChallenge
    Show attributesMemberChallenge
    • challenge_idstring (uuid)
      The challenge.
    • member_idstring (uuid)
    • statusstring
      eligible (can join, not joined), enrolled, completed or expired.
      One of eligible, enrolled, completed, expired
    • progressobject
      current, target and unit. For streaks, periods lists each day or week with starts_at, ends_at and met; it's empty for other types.
      Show attributesHide attributes
      • currentinteger
      • targetinteger
      • unitstring
        One of visits, periods, cents, items
      • periodsarray of object
        Show attributesHide attributes
        • starts_atstring (date-time)
        • ends_atstring (date-time)
        • metboolean
    • window_ends_atstring (date-time)Nullable
      When this member's window ends. For a rolling challenge they haven't joined, null.
    • completed_atstring (date-time)Nullable
      When they completed it, or null.
    • reward_wallet_item_idstring (uuid)Nullable
      The wallet item paid on completion, for catalog rewards. null otherwise.
  • has_moreboolean
    True when another page exists.
  • next_cursorstringNullable
    Pass as cursor to get the next page.

Error descriptions#

401Unauthorized
token_expired

Get a new member token and retry.

Any endpoint can also return the common errors.