Skip to main content
GET
/
analytics
/
dashboards
/
memberships
/
grouped
Get Memberships Grouped
curl --request GET \
  --url https://api.decodahealth.com/analytics/dashboards/memberships/grouped \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "membership_ids": [],
  "member_statuses": [],
  "location_ids": [],
  "sold_by_provider_ids": []
}
'
{
  "groups": [
    {
      "key": "<string>",
      "label": "<string>",
      "count": 123,
      "summary": {
        "memberCount": 0,
        "monthlyEquivalentRevenue": 0,
        "activeCount": 0,
        "frozenCount": 0,
        "cancelledCount": 0,
        "delinquentCount": 0,
        "expiredCount": 0
      },
      "rows": [
        {
          "id": "<string>",
          "patientId": "<string>",
          "membershipId": "<string>",
          "membership": {
            "name": "<string>",
            "price": 123,
            "id": "<string>",
            "externalId": "<string>",
            "description": "<string>",
            "globalDiscountPercentage": 0,
            "patientCreditAmount": 0,
            "patientCreditFrequency": "MONTHLY",
            "patientCreditExpiryDays": 123,
            "maxRenewals": 0,
            "autoRenew": true,
            "setupFee": 0,
            "freezeFee": 0,
            "minimumBillingCycles": 0,
            "billingFrequency": "MONTHLY",
            "textColor": "<string>",
            "isArchived": false,
            "ruleSetId": "<string>",
            "merchantAccountId": "<string>",
            "feeSchedule": [
              {
                "cycleNumber": 2,
                "price": 1,
                "id": "<string>",
                "membershipId": ""
              }
            ]
          },
          "startDate": "2023-11-07T05:31:56Z",
          "status": "ACTIVE",
          "autoRenew": true,
          "billingFrequency": "DAILY",
          "patient": {
            "id": "<string>",
            "type": "PROVIDER",
            "createdDate": "2023-11-07T05:31:56Z",
            "firstName": "<string>",
            "lastName": "<string>",
            "phoneNumber": "<string>",
            "email": "<string>",
            "locationId": "<string>",
            "externalId": "<string>",
            "address": "<string>",
            "addressLineTwo": "<string>",
            "city": "<string>",
            "state": "<string>",
            "zipCode": "<string>",
            "country": "<string>",
            "addressValid": true,
            "meta": {},
            "isArchived": true,
            "primaryLocationId": "<string>",
            "gender": "<string>",
            "pronouns": "<string>",
            "preferredName": "<string>",
            "dateOfBirth": "2023-12-25",
            "patientMedications": [
              "<string>"
            ],
            "patientSource": "SELF_SCHEDULING",
            "leadSource": "<string>",
            "onSchedulingBlacklist": true,
            "surchargeDisabled": true,
            "tags": [
              {
                "id": "<string>",
                "name": "<string>",
                "isActive": true,
                "createdDate": "2023-11-07T05:31:56Z",
                "emoji": "<string>",
                "color": "<string>",
                "updatedDate": "2023-11-07T05:31:56Z"
              }
            ],
            "creditBalance": 123,
            "preferredProviderId": "<string>",
            "dosespotPatientId": "<string>",
            "primaryLocation": {
              "id": "<string>",
              "name": "<string>",
              "isVirtual": true
            }
          },
          "charges": [
            {
              "id": "<string>",
              "patientId": "<string>"
            }
          ],
          "soldByProviderId": "<string>",
          "endDate": "2023-11-07T05:31:56Z",
          "nextBillingDate": "2023-11-07T05:31:56Z",
          "freezeDate": "2023-11-07T05:31:56Z",
          "unfreezeDate": "2023-11-07T05:31:56Z",
          "soldByProvider": {
            "id": "<string>",
            "firstName": "<string>",
            "lastName": "<string>"
          },
          "createdDate": "2023-11-07T05:31:56Z",
          "updatedDate": "2023-11-07T05:31:56Z",
          "paymentMethod": {
            "id": "<string>",
            "patientId": "<string>",
            "rainforestPaymentMethodId": "<string>",
            "brand": "<string>",
            "last4": "<string>",
            "expMonth": 123,
            "expYear": 123,
            "accountHolderType": "<string>",
            "accountNumberLast4": 123,
            "bankName": "<string>",
            "routingNumber": 123,
            "description": "<string>",
            "type": "CARD",
            "isDefault": false,
            "isArchived": false,
            "availableMerchantIds": [
              "<string>"
            ],
            "createdDate": "2023-11-07T05:31:56Z"
          }
        }
      ],
      "totalPages": 123
    }
  ],
  "grandTotals": {
    "memberCount": 0,
    "monthlyEquivalentRevenue": 0,
    "activeCount": 0,
    "frozenCount": 0,
    "cancelledCount": 0,
    "delinquentCount": 0,
    "expiredCount": 0
  },
  "totalCount": 123
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Query Parameters

group_by
enum<string>
default:none
Available options:
location,
membership,
status,
soldByProvider,
none
location_ids
string[]
membership_ids
string[]
member_statuses
string[]
sold_by_provider_ids
string[]
pagination[pageSize]
integer | null
pagination[groupKey]
string | null
pagination[page]
integer | null
page
integer | null
per_page
integer | null
sort_by
string | null
sort_direction
enum<string> | null
Available options:
asc,
desc
location_id
string | null
patient_name
string | null
created_date_start
string<date-time> | null
created_date_end
string<date-time> | null
start_date_start
string<date-time> | null
start_date_end
string<date-time> | null
next_billing_date_start
string<date-time> | null
next_billing_date_end
string<date-time> | null
timezone
string
default:UTC

Body

application/json
membership_ids
string[]
member_statuses
enum<string>[]
Available options:
ACTIVE,
EXPIRED,
CANCELLED,
DELINQUENT,
FROZEN,
INACTIVE
location_ids
string[]
sold_by_provider_ids
string[]

Response

Successful Response

Complete response from the memberships grouped endpoint.

groups
MembershipsGroup · object[]
required
grandTotals
MembershipsSummary · object
required

Aggregated summary for a group or grand totals.

totalCount
integer
required