---
title: "Find centroid(s)"
method: POST
path: "/{country}/{version}/{level}/centroid"
tags: ["Regions"]
---

# Find centroid(s)

`POST /{country}/{version}/{level}/centroid`

Find the aggregated centroid, or disaggregated centroids, of a set of regions. When the set of regions are \"aggregated\", all regions will be treated as if they were \"combined\", or \"aggregated\" into one region. Only a single pair of longitude/latitude coordinates will be returned for the entire aggregated region. When the set of regions are \"disaggregated\", the centroid for each region will be calculated \"separately\", or \"disaggregated\". A pair of longitude/latitude coordinates will be returned for each region individually.

## Path parameters

- `country` string, required
- `version` string, required
- `level` string, required

## Request body

- object
  - `codes` union[], required
    - union
      - string
      - integer
  - `aggregate` boolean — * When `aggregate` is `true`, all areas will be treated as if they were "combined", or "aggregated" into one area, and only a single pair of longitude/latitude coordinates will be returned. * When `aggregate` is `false`, the centroid for each area will be calculated "separately", or "disaggregated", and a pair of longitude/latitude coordinates will be returned for each area specified in the request.

## Response `200`

OK

- object — The centroid point of the passed regions.
  - `centroid` object, required — Mapping of codes to their centroid lat/lon points.

## Other responses

- `400` — bad request
- `404` — requested resource not found

---

[API](https://skmtc.net/lightcast/apis/alumni-pathways-2-0.md) · [All operations](https://skmtc.net/lightcast/apis/alumni-pathways-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightcast/alumni-pathways-2-0/revisions/fc66b9877391/schema)
