unPLUGDevelopers

Challenges API

List a member's challenges from your server Coming soon

GET/v1/members/{id}/challenges

The same as List a member's challenges, for a server-to-server integration. Take the member id from your own signed-in session, never from a value the app sends.

Permissions: Secret key with members:read.

Path parameters#

  • idstring (uuid)Required
    The member id.

Query parameters#

  • limitinteger
    Min 1Max 100Default 25
  • cursorstring
    next_cursor from the previous page.

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#

404Not found
member_not_found

No member with this id.

410Gone
member_deleted

The member was deleted.

Any endpoint can also return the common errors.