---
title: "Prepare indicator data upload"
method: POST
path: "/indicator_dsd/data_upload_prepare/{sid}"
tags: ["Indicator DSD"]
---

# Prepare indicator data upload

`POST /indicator_dsd/data_upload_prepare/{sid}`

Upload a CSV (or reference a completed resumable `upload_id`), validate required DSD column headers, stage the file on the project, and return distinct values in the indicator_id column. Does not require `indicator_id_value` or `implied_freq_code` (those are enforced on `data_upload_import`). Provide **either** `file` **or** `upload_id`, not both.

## Path parameters

- `sid` string, required

## Response `200`

Headers valid; CSV staged for import

- IndicatorDsdDataUploadPrepareResponse
  - `status` 'success', required
  - `headers_valid` true, required
  - `expected_columns` string[] — DSD column names required in the CSV
  - `import_columns` string[] — Column names passed to the DuckDB import
  - `keep_extra_csv_columns` boolean
  - `indicator_column` string — DSD column name for indicator_id
  - `indicator_id_value` string, nullable — Bound value on the project (may be empty at prepare time)
  - `indicator_values` IndicatorDsdCsvIndicatorValue[] — Distinct indicator_id values found in the CSV
    - `value` string
    - `count` integer, nullable
  - `indicator_values_truncated` boolean
  - `indicator_values_limit` integer
  - `series_idno` string, nullable
  - `series_idno_in_csv` boolean
  - `ignored_columns` string[] — Extra CSV columns not in the DSD
  - `extra_in_csv` string[]
  - `csv_row_count` integer, nullable

## Other responses

- `400` — Header validation failed or request error

---

[API](https://skmtc.net/worldbank/apis/metadata-editor-api.md) · [All operations](https://skmtc.net/worldbank/apis/metadata-editor-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worldbank/metadata-editor-api/versions/f4c8258bab5a/schema)
