---
title: "Get Chart Data"
method: GET
path: "/v2/merchants/{merchant_id}/metrics/chart"
tags: ["Merchants"]
---

# Get Chart Data

`GET /v2/merchants/{merchant_id}/metrics/chart`

## Request

- Base URL: `https://api.loyalty.dog`
- URL: `https://api.loyalty.dog/v2/merchants/{merchant_id}/metrics/chart`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/loyalty/apis/loyaltydog/docs/v2/merchants/:merchant_id/metrics/chart/get.ts> (a function with typed inputs; its response is checked against the schema)

Get time-series chart data for performance visualization.

### Args:
- `merchant_id`: The ID of the merchant (program)
- `metric`: The metric to chart (member_growth, redemptions, points_issued, engagement_rate)
- `period`: The time period (7d, 30d, 90d, custom)
- `user`: The authenticated user

### Returns:
- ChartDataResponse with daily data points and event markers

## Path parameters

- `merchant_id` string, required

## Query parameters

- `metric` string
- `period` string

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- ChartDataResponse
  - `data` ChartDataPoint[], required
    - `date` string, required
    - `value` number, required
  - `events` EventMarker[], required
    - `date` string, required
    - `label` string, required
    - `type` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/loyalty/apis/loyaltydog.md) - [All operations](https://skmtc.dev/loyalty/apis/loyaltydog/llms.txt) - [OpenAPI document](https://skmtc.dev/loyalty/apis/loyaltydog/revisions/5803242b0551?raw)
