# members_count_snapshot (timeseries)

| Required permit | Rate limit tokens cost | Available intervals | Data lag |
| --- | --- | --- | --- |
| Reporting:Api:Report:MembersCountSnapshot | 3 | 1h, 1d, 1w, 1mo | ~15 minutes |

This report allows you to get information members' count in loyalty club (community).

Implementation is done by periodic (~15 minutes) snapshots of members' count.

* it allows to query members' count with filtering over some of fields
* it has values present in every time bucket
* it's not so precise as counts are materialized each 15 minutes and last one in time bucket is taken to be returned

## Fields

### community_id

| Type | Filterable |
| --- | --- |
| Integer | <Icon icon="material-outline-done"/> (via `X-Customer` header) |

ID of member's community

### optin_channel

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-done"/> |

See [members report](/doc-344016#Un0optin_channel).

### optin_subchannel

| Type | Filterable |
| --- | --- |
| String | <Icon icon="material-outline-done"/> |

See [members report](/doc-344016#Un0optin_subchannel).

### optin_platform

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

See [members report](/doc-344016#Un0optin_platform).

### gender

| Type | Filterable | Readonly |
| --- | --- | --- |
| String | <Icon icon="material-outline-done"/> | <Icon icon="material-outline-highlight_off"/> |

See [members report](/doc-344016#Un0gender).

### age

| Type | Filterable |
| --- | --- |
| Enum | <Icon icon="material-outline-done"/> |

See [members report](/doc-344016#Un0age).

## Query without aggregations

Query returns series with members' count.

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                850,
                850,
                850,
                850
            ]
        }
    ],
    "data_points": 4,
    "result_type": "timeseries"
}
```

## Aggregations

### consents

Members count aggregated by given consents by members.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| consent_key | String | See `consents` in `Fields` |

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {
                "consent_key": "facebook_ads"
            },
            "values": [
                61,
                61,
                61,
                61
            ]
        },
        {
            "label": {
                "consent_key": "email_marketing"
            },
            "values": [
                133,
                133,
                133,
                133
            ]
        },
        {
            "label": {
                "consent_key": "cookie_tracking"
            },
            "values": [
                213,
                213,
                212,
                212
            ]
        },
    ],
    "data_points": 12,
    "result_type": "timeseries"
}
```

### total_consents

Members count aggregated by given consents by members in context of all communities.

#### Labels

| Key | Type | Description |
| --- | --- | --- |
| consent_key | String | See `consents` in `Fields` |

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {
                "consent_key": "facebook_ads"
            },
            "values": [
                61,
                61,
                61,
                61
            ]
        },
        {
            "label": {
                "consent_key": "email_marketing"
            },
            "values": [
                133,
                133,
                133,
                133
            ]
        },
        {
            "label": {
                "consent_key": "cookie_tracking"
            },
            "values": [
                213,
                213,
                212,
                212
            ]
        },
    ],
    "data_points": 12,
    "result_type": "timeseries"
}
```

### marketing_via_anything

Count of members that can be reached with marketing sendings.

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                529,
                529,
                528,
                528
            ]
        }
    ],
    "data_points": 4,
    "result_type": "timeseries"
}
```

### total_marketing_via_anything

Count of members that can be reached with marketing sendings in context of all communities.

### marketing_via_sms

Count of members that can be reached with marketing SMS sendings.

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                529,
                529,
                528,
                528
            ]
        }
    ],
    "data_points": 4,
    "result_type": "timeseries"
}
```

### total_marketing_via_sms

Count of members that can be reached with marketing SMS sendings in context of all communities.

### marketing_via_email

Count of members that can be reached with marketing email sendings.

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                529,
                529,
                528,
                528
            ]
        }
    ],
    "data_points": 4,
    "result_type": "timeseries"
}
```

### total_marketing_via_email

Count of members that can be reached with marketing email sendings in context of all communities.


### marketing_via_push

Count of members that can be reached with marketing push notification sendings.

#### Example query

```json
{
    "interval": "1h",
    "range_timezone": "America/Denver",
    "time_buckets": [
        "2024-08-22T01:00:00.000-06:00",
        "2024-08-22T02:00:00.000-06:00",
        "2024-08-22T03:00:00.000-06:00",
        "2024-08-22T04:00:00.000-06:00"
    ],
    "series": [
        {
            "label": {},
            "values": [
                529,
                529,
                528,
                528
            ]
        }
    ],
    "data_points": 4,
    "result_type": "timeseries"
}
```

### total_marketing_via_push

Count of members that can be reached with marketing push notification sendings in context of all communities.
