unPLUGDevelopers

Activity API

List activity

GET/v1/members/{id}/activity

GET/v1/members/me/activity

Returns the member's activity, newest first. Use it for the points history screen.

Permissions: {id}: secret key with members:read. me: member token.

Path parameters#

  • idstring (uuid)Required

Query parameters#

  • fromstring (date-time)
    RFC 3339 time. Entries created at or after it.
  • tostring (date-time)
    RFC 3339 time. Entries created before it.
  • typestring
    One entry type, for example earn.
    One of earn, bonus, redeem, adjust, reverse, expire
  • limitinteger
    1 to 100. Default 25.
    Min 1Max 100Default 25
  • cursorstring
    next_cursor from the previous page. Send the same filters with it. See Pagination.

The last two entries belong to one order: Maya spent 500 Beans on a free drip coffee, then earned 43 on what she paid for. Reading up the list, each balance_after is the one below it plus that entry's points: 265, 308, 358, 420.

Response fields#

Returns 200 with list of ActivityEntry

  • dataarray of ActivityEntry
    Show attributesActivityEntry
    • idstring (uuid)
    • typestring
      What happened. See the table below. May grow.
      One of earn, bonus, redeem, adjust, reverse, expire
    • pointsinteger
      Signed change: 62 for an earn, -500 for a redeem.
    • balance_afterinteger
      The member's points_balance right after this entry.
    • descriptionstring
      A short line you can show the guest, for example Visit at South Congress or Free drip coffee.
    • order_idstring (uuid)Nullable
      The order that caused it, for earn, bonus, redeem and reverse.
    • reward_idstring (uuid)Nullable
      The reward bought, for redeem.
    • adjustment_reasonstringNullable
      For adjust: goodwill, correction, migration or other.
      One of goodwill, correction, migration, other
    • created_atstring (date-time)
  • has_moreboolean
    True when another page exists.
  • next_cursorstringNullable
    Pass as cursor to get the next page.

Error descriptions#

400Bad request
invalid_param

from or to isn't an RFC 3339 time, or type isn't an entry type.

401Unauthorized
token_expired

The member token expired. Get a new one from your server.

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.