Get an organization's coupon stack (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
GET /admin/orgs/{orgId}/coupons

Lists the coupons on the organization's stack, top first, each with its status, whether it could be the active discount and whether it is, plus the id of the active coupon. Super admin only.

Path parameters

  • orgId string Required

    Id of the organization

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • stack array[object] Required

        Top of the stack first

        Hide stack attributes Show stack attributes object
        • couponId string Required
        • pushedAt string(date-time) Required
        • name string | null Required
        • percentOff number | null Required
        • amountOffCents number | null Required
        • duration string | null Required
        • status string Required

          active/expired/deleted, or "unknown" when the coupon is missing from the local mirror

        • eligible boolean Required

          Whether this entry could be the active discount

        • active boolean Required

          The ONE entry currently mirrored onto the Stripe customer — the top eligible coupon

      • activeCouponId string | null Required

        The coupon currently discounting this org, if any

    • statusCode number Required
    • timestamp string(date-time) Required
GET /admin/orgs/{orgId}/coupons
curl \
 --request GET 'http://api.example.com/admin/orgs/{orgId}/coupons' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "stack": [
      {
        "couponId": "SPRING20",
        "pushedAt": "2026-01-15T10:15:00.000Z",
        "name": "Spring 20% off",
        "percentOff": 20,
        "amountOffCents": 42.0,
        "duration": "repeating",
        "status": "active",
        "eligible": true,
        "active": true
      }
    ],
    "activeCouponId": "SPRING20"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}