Skip to main content
GET
/
analytics
/
dashboards
/
payment-plans
/
payment-plans-grouped
Get Payment Plans Grouped
curl --request GET \
  --url https://api.decodahealth.com/analytics/dashboards/payment-plans/payment-plans-grouped \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
{
  "groups": [
    {
      "key": "<string>",
      "label": "<string>",
      "count": 123,
      "summary": {
        "planCount": 0,
        "totalPlanValue": 0,
        "totalAmountPaid": 0,
        "totalAmountRemaining": 0,
        "activeCount": 0,
        "completedCount": 0,
        "failedCount": 0,
        "cancelledCount": 0
      },
      "rows": [
        {
          "paymentPlanId": "<string>",
          "patientId": "<string>",
          "patientFirstName": "<string>",
          "patientLastName": "<string>",
          "planTotal": 123,
          "amountPaid": 123,
          "amountRemaining": 123,
          "installmentsCompleted": 123,
          "installmentsTotal": 123,
          "frequency": "<string>",
          "status": "<string>",
          "nextPaymentDate": "2023-12-25",
          "createdDate": "2023-11-07T05:31:56Z",
          "locationId": "<string>",
          "locationName": "<string>",
          "paymentMethodLast4": "<string>",
          "paymentMethodBrand": "<string>",
          "plannedPayments": [
            {
              "id": "<string>",
              "amount": 123,
              "paymentDate": "2023-12-25",
              "status": "<string>"
            }
          ]
        }
      ]
    }
  ],
  "grandTotals": {
    "planCount": 0,
    "totalPlanValue": 0,
    "totalAmountPaid": 0,
    "totalAmountRemaining": 0,
    "activeCount": 0,
    "completedCount": 0,
    "failedCount": 0,
    "cancelledCount": 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:
status,
location,
frequency,
none
start_date
string<date> | null
end_date
string<date> | null
location_ids
string[] | null
statuses
string[] | null
frequencies
string[] | null

Response

Successful Response

groups
PaymentPlanGroup · object[]
required
grandTotals
PaymentPlanSummary · object
required
totalCount
integer
required