Skip to content

API Reference

Merits

Wallet balances, ledger and institution-funded credits. Guide: Merits & Coupons.

get/merits/allowance

Remaining institution merit allowance

Scope merits:read

cURL
curl -X GET "https://serverless.grout.app/v1/merits/allowance" \
  -H "Authorization: Bearer $GROUT_API_KEY"
get/merits/wallets/{email}

Wallet balance and ledger

Scope merits:read

Parameters

  • emailpath · stringrequired
cURL
curl -X GET "https://serverless.grout.app/v1/merits/wallets/$EMAIL" \
  -H "Authorization: Bearer $GROUT_API_KEY"
post/merits/credits

Credit merits (idempotent by ref, draws from allowance)

Scope merits:write

Body

  • emailstring
  • amount_centsinteger
  • reasonstring
  • refstring
cURL
curl -X POST "https://serverless.grout.app/v1/merits/credits" \
  -H "Authorization: Bearer $GROUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"<email>","amount_cents":0,"reason":"<reason>","ref":"<ref>"}'
get/merits/ledger

Institution-wide ledger

Scope merits:read

Parameters

  • emailquery · string
  • sincequery · string
  • pagequery · integer
  • limitquery · integer
cURL
curl -X GET "https://serverless.grout.app/v1/merits/ledger" \
  -H "Authorization: Bearer $GROUT_API_KEY"