Skip to main content
GET
/
v1
/
customer-portal
/
benefit-grants
List Benefit Grants
curl --request GET \
  --url https://api.spairehq.com/v1/customer-portal/benefit-grants/ \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "granted_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z",
      "customer_id": "<string>",
      "benefit_id": "<string>",
      "subscription_id": "<string>",
      "order_id": "<string>",
      "is_granted": true,
      "is_revoked": true,
      "customer": {
        "created_at": "2023-11-07T05:31:56Z",
        "modified_at": "2023-11-07T05:31:56Z",
        "id": "<string>",
        "email": "<string>",
        "email_verified": true,
        "name": "<string>",
        "billing_name": "<string>",
        "billing_address": {
          "line1": "<string>",
          "line2": "<string>",
          "postal_code": "<string>",
          "city": "<string>",
          "state": "<string>"
        },
        "tax_id": {
          "[0]": "<string>"
        },
        "oauth_accounts": {},
        "default_payment_method_id": "<string>"
      },
      "benefit": {
        "id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "modified_at": "2023-11-07T05:31:56Z",
        "type": "<string>",
        "description": "<string>",
        "selectable": true,
        "deletable": true,
        "organization_id": "<string>",
        "metadata": {},
        "organization": {
          "created_at": "2023-11-07T05:31:56Z",
          "modified_at": "2023-11-07T05:31:56Z",
          "id": "<string>",
          "name": "<string>",
          "slug": "<string>",
          "avatar_url": "<string>",
          "allow_customer_updates": true
        },
        "properties": {
          "guild_id": "<string>"
        }
      },
      "properties": {
        "account_id": "<string>",
        "guild_id": "<string>",
        "role_id": "<string>",
        "granted_account_id": "<string>"
      },
      "member_id": "<string>",
      "error": {
        "message": "<string>",
        "type": "<string>",
        "timestamp": "<string>"
      }
    }
  ],
  "pagination": {
    "total_count": 123,
    "max_page": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the Create Customer Session endpoint.

Query Parameters

query
string | null

Filter by benefit description.

type

Filter by benefit type.

Available options:
custom,
discord,
github_repository,
downloadables,
license_keys,
meter_credit,
course_access
benefit_id

Filter by benefit ID.

checkout_id

Filter by checkout ID.

order_id

Filter by order ID. The order ID.

subscription_id

Filter by subscription ID. The subscription ID.

member_id

Filter by member ID.

page
integer
default:1

Page number, defaults to 1.

limit
integer
default:10

Size of a page, defaults to 10. Maximum is 100.

sorting
enum<string>[] | null

Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

Available options:
granted_at,
-granted_at,
type,
-type,
organization,
-organization,
product_benefit,
-product_benefit

Response

Successful Response

items
(CustomerBenefitGrantDiscord · object | CustomerBenefitGrantGitHubRepository · object | CustomerBenefitGrantDownloadables · object | CustomerBenefitGrantLicenseKeys · object | CustomerBenefitGrantCustom · object | CustomerBenefitGrantMeterCredit · object)[]
required
pagination
Pagination · object
required