Skip to main content
POST
Preview giving a unit by hand

Authorizations

Authorization
string
header
required

A project key (Developers → API keys). Keep it on your server, not in an app.

Headers

traceparent
string

W3C Trace Context; joins your trace to ours

Body

application/json
unit
string
required

The unit to give: its key

Pattern: ^[a-z][a-z0-9_-]{0,63}$
amount
integer
required

What each person gets

Required range: x <= 1000000
users
string[]
required

usr_… IDs or the brand's own IDs, up to 200 at a time

Required array length: 1 - 200 elements
Required string length: 1 - 256
note
string

Written on every receipt

Required string length: 1 - 280
count_against
string

A rule (ID or key) with a budget in this unit: the give is counted in it and refused if it would pass it

Required string length: 1 - 100

Response

Preview giving a unit by hand

unit
string
required

The unit's key

Pattern: ^[a-z][a-z0-9_-]{0,63}$
amount
integer
required

What each person gets (or would get)

people
object[]
required

One line for each person found, in ID order

not_found
string[]
required

IDs that matched nobody. Nothing is created for them

totals
object
required

Counts for the whole give

budget
object | null
required

Set when the give is counted against a rule's budget