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.

ENDPOINTS
GET /odis/v1/communities/:community_id/members
GET /odis/v1/communities/:community_id/members/:id
PATCH /odis/v1/communities/:community_id/members/:id
POST /odis/v1/communities/:community_id/members/:id/cancel_subscription
POST /odis/v1/communities/:community_id/members/:id/issue_refund
POST /odis/v1/communities/:community_id/members/:id/refund_charge
POST /odis/v1/communities/:community_id/members/:id/block
DELETE /odis/v1/communities/:community_id/members/:id/unblock
GET /odis/v1/communities/:community_id/members/:id/payment_history
GET /odis/v1/communities/:community_id/members/:id/subscription_details

Overview

Community members represent active or past subscribers to a community’s membership tiers. The API provides comprehensive member management including subscription control, payment tracking, refunds, and moderation.

Authentication

All endpoints require authentication:
  • Community Owner: Full access to their community’s members
  • Admin: Full access to all members
Include the authentication token in the header:
Authorization: Bearer YOUR_ACCESS_TOKEN

Community Membership Object

{
  "id": 50,
  "status": "active",
  "current_period_start": "2024-11-01T00:00:00Z",
  "current_period_end": "2024-12-01T00:00:00Z",
  "trial_start": null,
  "trial_end": null,
  "canceled_at": null,
  "ended_at": null,
  "shipping_address": {
    "name": "John Doe",
    "line1": "123 Main St",
    "line2": "Apt 4B",
    "city": "Portland",
    "state": "OR",
    "postal_code": "97201",
    "country": "US"
  },
  "metadata": {},
  "is_blocked": false,
  "block_reason": null,
  "total_refunded": 0,
  "lifetime_spend_cents": 2997,
  "requires_shipping_address": true,
  "has_shipping_address": true,
  "user": {
    "id": 200,
    "username": "whisky_lover",
    "email": "member@example.com",
    "first_name": "John",
    "last_name": "Doe"
  },
  "membership_tier": {
    "id": 1,
    "name": "Bronze Member",
    "monthly_price_dollars": 9.99
  },
  "community": {
    "id": 1,
    "name": "Whisky Enthusiasts"
  },
  "created_at": "2024-08-15T10:30:00Z",
  "updated_at": "2024-11-14T08:20:00Z"
}

Membership Status

Members can have the following subscription statuses:
  • active - Subscription is active and paid
  • trialing - In free trial period
  • past_due - Payment failed but subscription still active
  • unpaid - Payment failed and subscription suspended
  • canceled - Subscription has been canceled
  • incomplete - Initial payment not completed

Member Metadata

The metadata field is a flexible JSONB object for storing custom data about members:
{
  "lifetime_spend_cents": 2997,
  "blocked": false,
  "blocked_at": null,
  "blocked_by": null,
  "block_reason": null,
  "refunds": [
    {
      "refund_id": "re_xxx",
      "charge_id": "ch_xxx",
      "amount_cents": 999,
      "reason": "requested_by_customer",
      "issued_at": "2024-11-10T15:30:00Z",
      "issued_by": 100
    }
  ],
  "notes": "VIP member - send exclusive samples"
}

Shipping Addresses

Members with tiers that require_shipping_address must provide shipping details during checkout:
  • Collected automatically via Stripe Checkout
  • Stored in the shipping_address field
  • Required for physical product fulfillment

Payment Tracking

Each member has comprehensive payment tracking:
  • Lifetime Spend: Total amount paid (minus refunds)
  • Payment History: Full invoice and charge details
  • Refund History: All refunds issued
  • Subscription Details: Current Stripe subscription status

Member Moderation

Community owners can moderate members:
  • Block: Prevent access while maintaining subscription
  • Unblock: Restore access
  • Cancel Subscription: End membership immediately or at period end
  • Issue Refunds: Full or partial refunds for payments