---
title: "Get Affiliate Metrics"
method: GET
path: "/app/affiliate/{affiliate-id}/metrics"
tags: ["Affiliates"]
---

# Get Affiliate Metrics

`GET /app/affiliate/{affiliate-id}/metrics`

## Request

- Base URL: `https://api.centralcart.io/v1`
- URL: `https://api.centralcart.io/v1/app/affiliate/{affiliate-id}/metrics`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/centralcart/apis/centralcart-api/docs/app/affiliate/:affiliate-id/metrics/get.ts> (a function with typed inputs; its response is checked against the schema)

Retorna as métricas de um afiliado em um período específico.

## Path parameters

- `affiliate-id` string, required

## Query parameters

- `from` string, required
- `to` string, required

## Response `200`

OK

- object
  - `affiliate` object
    - `id` number
    - `name` string
    - `ref_code` string
    - `balance` number
  - `commissions` MetricBlock
    - `total_count` number: Quantidade total de operações
    - `total_value` number: Valor total em reais
    - `graph` object[]: Array de dados para construção de gráfico
      - `date` string
      - `count` number
      - `total` number
  - `withdraws` MetricBlock
    - `total_count` number: Quantidade total de operações
    - `total_value` number: Valor total em reais
    - `graph` object[]: Array de dados para construção de gráfico
      - `date` string
      - `count` number
      - `total` number
  - `store_revenue` MetricBlock
    - `total_count` number: Quantidade total de operações
    - `total_value` number: Valor total em reais
    - `graph` object[]: Array de dados para construção de gráfico
      - `date` string
      - `count` number
      - `total` number

---

[API](https://skmtc.dev/centralcart/apis/centralcart-api.md) - [All operations](https://skmtc.dev/centralcart/apis/centralcart-api/llms.txt) - [OpenAPI document](https://skmtc.dev/centralcart/apis/centralcart-api/revisions/6cbd98848375?raw)
