Skip to main content
PATCH
/
v1
/
customer-portal
/
benefit-grants
/
{id}
Update Benefit Grant
curl --request PATCH \
  --url https://api.spairehq.com/v1/customer-portal/benefit-grants/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "benefit_type": "<string>",
  "properties": {
    "account_id": "<string>"
  }
}
'
{
  "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>"
  }
}

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.

Path Parameters

id
string<uuid4>
required

The benefit grant ID.

Body

application/json
benefit_type
string
required
Allowed value: "discord"
properties
CustomerBenefitGrantDiscordPropertiesUpdate · object
required

Response

Benefit grant updated.

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

granted_at
string<date-time> | null
required
revoked_at
string<date-time> | null
required
customer_id
string<uuid4>
required
benefit_id
string<uuid4>
required
subscription_id
string<uuid4> | null
required
order_id
string<uuid4> | null
required
is_granted
boolean
required
is_revoked
boolean
required
customer
CustomerPortalCustomer · object
required
benefit
BenefitDiscordSubscriber · object
required
properties
BenefitGrantDiscordProperties · object
required
member_id
string<uuid4> | null
error
BenefitGrantError · object