---
title: "Dashboard Preview Subnational"
method: POST
path: "/api/dashboard/preview-subnational"
---

# Dashboard Preview Subnational

`POST /api/dashboard/preview-subnational`

## Request

- Base URL: `https://panafricadata.com` (the document declares no server; this is the origin it was published from)
- URL: `https://panafricadata.com/api/dashboard/preview-subnational`
- Auth: none declared
- TypeScript: <https://skmtc.dev/panafricadata/apis/pan-africa-data-api/docs/api/dashboard/preview-subnational/post.ts> (a function with typed inputs; its response is checked against the schema)

Sub-national tab preview (24 Oct 2026): ONLY what the tab displays, at most 8 rows, the record count
for the selection and, for a single country, the national class shares of the latest year (summary
cards). Dashboard session only (no API-key access); not metered. Full data comes from the metered
download or the API.

## Cookies

- `pad_session` string

## Request body

- SubnationalPreviewRequest
  - `country_codes` string[], required
  - `year_from` integer, nullable
  - `year_to` integer, nullable
  - `include_forecasts` boolean
  - `level` string, nullable
  - `admin_level` integer, nullable
  - `income_class` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-30** `d90d6bf3a6e2`: 1 info
  - added the new optional request property `level`
- **2026-10-25** `05c7ed0515f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/panafricadata/apis/pan-africa-data-api/changes/api/dashboard/preview-subnational/post.md)

---

[API](https://skmtc.dev/panafricadata/apis/pan-africa-data-api.md) - [All operations](https://skmtc.dev/panafricadata/apis/pan-africa-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/panafricadata/apis/pan-africa-data-api/revisions/1803a1857b20?raw)
