Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

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

Updates which membership tiers have access to a specific benefit. This replaces all existing tier assignments.

URL Parameters

id
integer
required
The ID of the benefit

Request Body

tier_ids
array
required
Array of tier IDs to assign this benefit to. Pass an empty array to remove all assignments.

Returns

Returns the updated benefit object with new tier assignments.
curl -X POST https://api.onlydrams.app/odis/v1/benefits/1/assign_to_tiers \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "tier_ids": [1, 2, 3]
     }'
{
  "id": 1,
  "name": "Early Access to Releases",
  "description": "Get first access to new bottle releases",
  "position": 1,
  "status": "active",
  "tier_ids": [1, 2, 3],
  "tiers": [
    {
      "id": 1,
      "name": "Gold Member",
      "position": 1
    },
    {
      "id": 2,
      "name": "Platinum Member",
      "position": 2
    },
    {
      "id": 3,
      "name": "Diamond Member",
      "position": 3
    }
  ],
  "community": {
    "id": 1,
    "name": "Whisky Enthusiasts"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:00:00Z"
}

Notes

  • Authorization: Community owner or admin only
  • Replacement: This replaces all existing tier assignments, it does not add to them
  • Empty Array: Passing an empty array removes all tier assignments
  • Tier Validation: All tier IDs must belong to the same community as the benefit