Skip to content
Gave

Users

The users you enroll, their balances and their rewards.

Read a user's balance

GET/v1/users/{userId}/balance

What the user has, per asset: expected from open authorizations, pending until the holding period ends, claimable now, paid out, and owed back after a refund of a reward already paid.

Path Parameters

userIdRequired
string·min 1·max 128

Your ID for the user. Gave stores no names or emails.

Responses

Read a user

GET/v1/users/{userId}

The user's attributes now, who referred them, and when.

Path Parameters

userIdRequired
string·min 1·max 128

Your ID for the user. Gave stores no names or emails.

Responses

Enroll a user

PUT/v1/users/{userId}

Enrolls a user, or replaces their attributes: one left out is cleared. Gave takes spend events and claims only for enrolled users.

Programs read the attributes as they stood at each purchase's time: a change applies from when it's stored. referredBy is set once, at enrollment, to a user enrolled before; later, leave it out or repeat it. The same request again changes nothing.

Path Parameters

userIdRequired
string·min 1·max 128

Your ID for the user. Gave stores no names or emails.

Request Body

application/json
tier
string·min 1·max 128
country
string
segment
string·min 1·max 128
referredBy
string·min 1·max 128

Responses

List a user's rewards

GET/v1/users/{userId}/rewards

The user's rewards, newest first, each as its latest webhook event describes it. With it, an app that missed webhooks can catch up.

Path Parameters

userIdRequired
string·min 1·max 128

Your ID for the user. Gave stores no names or emails.

Query Parameters

cursor
string·min 1·max 256

Where the page starts: the previous page's next. Leave it out for the first page.

limit
integer·min 1·max 100

How many rewards per page: 50 by default, at most 100.

Responses