List upcoming rewards
/v1/rewards/upcomingReturns the rewards due from today, one page at a time, with totals for the whole period. How far ahead you can look depends on your plan: 60 days on Starter and 365 on Enterprise. Each page is worked out when you ask for it, so the totals can change between pages if a program or employee changes.
Needs a key with the reward:read scope.
Query parameters
daysinteger1 to 365 · Default 30How many days ahead to look, counting today. Your plan may allow fewer, and
limitedToDayssays so.limitinteger1 to 100 · Default 50How many to return, up to 100.
cursorstringThe
nextCursorfrom the previous page. Leave it out to start from the beginning.
Response
200: The forecast.
startdateThe first day covered, in your company's time zone.
enddateThe last day covered.
limitedToDaysinteger or nullSet when you asked for more days than your plan can forecast. It is the number of days you got.
currencystringLowercase three-letter currency code, such as
usd.rewardCountintegerRewards due across the whole period, on every page.
totalMinorintegerWhat they add up to. In minor units, so
2500is 25.00.programsarray of objectsThe totals by program for the whole period, largest first.
dataarray of objectsOne page of the rewards due, earliest first, then by employee ID and program ID.
nextCursorstring or nullPass this as
cursorto get the next page.nullon the last page. Treat it as opaque.
Errors
400API_QUERY_INVALID: A query parameter, or an ID in the path, is unknown or not in the right form.401API_KEY_INVALID: The key is missing, wrong, expired or revoked.403API_KEY_SCOPE_MISSING: The key is valid but wasn't given the scope this endpoint needs.PLAN_UPGRADE_REQUIRED: Your plan doesn't include the API.COMPANY_CLOSED: Your company has closed its Teambrite account.429API_KEY_RATE_LIMITED: The key is over 600 requests a minute.COMPANY_RATE_LIMITED: Your company is over its limit of 120 read requests a minute.