Skip to content

API Reference

Coupons

Request coupon batches and read redemptions. Guide: Merits & Coupons.

get/coupons/batches

List coupon batches requested by the institution

Scope coupons:read

Parameters

  • pagequery · integer
  • limitquery · integer
cURL
curl -X GET "https://serverless.grout.app/v1/coupons/batches" \
  -H "Authorization: Bearer $GROUT_API_KEY"
post/coupons/batches

Request a coupon batch (Grout approves)

Scope coupons:write

Body

  • namestring
  • total_couponsinteger
  • value_centsinteger
  • expiry_datedate-time
  • descriptionstring
cURL
curl -X POST "https://serverless.grout.app/v1/coupons/batches" \
  -H "Authorization: Bearer $GROUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","total_coupons":0,"value_cents":0,"expiry_date":"<expiry_date>","description":"<description>"}'
get/coupons/batches/{id}

Batch detail (codes once approved)

Scope coupons:read

Parameters

  • idpath · stringrequired
cURL
curl -X GET "https://serverless.grout.app/v1/coupons/batches/$ID" \
  -H "Authorization: Bearer $GROUT_API_KEY"
get/coupons/redemptions

Redemptions by institution users

Scope coupons:read

Parameters

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