---
title: "Enrich locations with boundary and datapack data"
method: POST
path: "/v1/data/enrich"
tags: ["Enrich"]
---

# Enrich locations with boundary and datapack data

`POST /v1/data/enrich`

## Request

- Base URL: `https://api.mapulus.com`
- URL: `https://api.mapulus.com/v1/data/enrich`
- Auth: HTTP bearer

Batch-enrich locations with boundary resolution and datapack data.

For each location, resolves the containing boundaries and attaches enrichment
data from the requested datapacks.

**Datapacks available**: `demographics`, `fundraising`.

**Limits**: Up to 100 locations per request.

**Example request body**:
```json
{
  "locations": [
    {"id": "loc1", "location": {"lng": 151.2093, "lat": -33.8688}}
  ],
  "resolve": ["sa2", "lga"],
  "enrich": [{"datapack": "demographics", "fields": "population.total"}],
  "output_boundary": "sa2"
}
```

## Request body

- EnrichLocationsRequest: Request body for batch location enrichment.
  - `locations` EnrichLocationItem[], required: Locations to enrich (max 100).
    - `id` string, required: Client-provided identifier for this location.
    - `location` PointLocation, required: A geographic point as longitude/latitude.
      - `lng` number, required: Longitude in decimal degrees.
      - `lat` number, required: Latitude in decimal degrees.
  - `resolve` BoundaryType[]: Boundary types to resolve for each location.
  - `enrich` EnrichLayerConfig[]: Datapacks to attach to each location.
    - `datapack` 'demographics' | 'fundraising', required: Datapack name: `demographics` or `fundraising`.
    - `fields` string, nullable: Comma-separated field paths to include (e.g. `population.total`).
  - `output_boundary` 'sa1' | 'sa2' | 'sa3' | 'sa4' | 'lga' | 'poa' | 'sal' | 'ced' | 'sed' | 'gccsa' | 'ste' | 'sua' | 'ucl' | 'ra' | 'sos' | 'sosr' | 'iloc' | 'iare' | 'ireg' | 'flood' | 'us_state' | 'us_county' | 'us_tract' | 'us_bg' | 'us_place' | 'us_cousub' | 'us_cd' | 'us_sldu' | 'us_sldl' | 'us_cbsa' | 'us_csa' | 'us_unsd' | 'us_elsd' | 'us_scsd' | 'us_aiannh' | 'us_region' | 'us_division' | 'us_zcta' | 'us_ua' | 'us_puma': Statistical and administrative boundary types (AU + US).

## Response `200`

Enriched location results with resolved boundaries and attached datapack data.

- ResponseEnvelopeEnrichLocationsResponse
  - `data` EnrichLocationsResponse, required: Response containing enriched location results.
    - `locations` EnrichedLocationItem[], required: Enriched results for each input location.
      - `id` string, required: Client-provided identifier.
      - `location` PointLocation, required: A geographic point as longitude/latitude.
        - `lng` number, required: Longitude in decimal degrees.
        - `lat` number, required: Latitude in decimal degrees.
      - `boundaries` object: Resolved boundary references by type (e.g. `{"sa2": {"id": "sa2:117011325", "name": "..."}}`).
      - `enrichment` object: Attached datapack data keyed by datapack name (e.g. `{"demographics": {...}}`).
      - `error` string, nullable: Error message if enrichment failed for this location.
    - `total` integer, required: Total number of input locations.
    - `enriched` integer, required: Number of successfully enriched locations.
    - `failed` integer, required: Number of locations that failed enrichment.
  - `meta` ResponseMeta: Response metadata.
    - `request_id` string, nullable
    - `pagination` PaginationMeta: Pagination metadata for list responses.
      - `total` integer, required: Total number of matching records.
      - `limit` integer, required: Maximum records returned per page.
      - `offset` integer, required: Number of records skipped.
      - `has_more` boolean, required: Whether more records exist beyond this page.
    - `demographics` DemographicsMeta: Demographics-specific metadata returned with census data endpoints.
      - `topics_included` string[], required: Topics included in the response.
      - `topics_available` string[]: Additional topics available but not requested.
    - `sources` object, nullable

## Other responses

- `422`: Validation Error

---

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