v1

latestOpenAPI 3.0.3Open Source2026-07-1791325.1 KB

Complete multistep upload

Final step in the multistep upload process. Called with the redirect URL from S3 after successful file upload to provide additional plan metadata and trigger scoring.

post/uploaded

Request body

descriptionstring

Short description of the plan

incumbentsstring[]

Ordered list of incumbency scenario strings for each district

vote_swingsnumber[]

Ordered list of vote swings to model for each district

model_versionstring

Predictive model version. If omitted, the most recent one is used.

Example request

{
  "description": "A Plan",
  "incumbents": [
    "R",
    "D",
    "O"
  ],
  "vote_swings": [
    0.04,
    0.05,
    0.06
  ]
}

Response

Upload completed successfully

index_urlstring uri required

Machine-readable JSON representation of the plan being scored. The response follows the structure defined in the PlanIndex schema.

plan_urlstring uri required

Human-readable web page with graphs and maps for the plan

Example response

{
  "index_url": "https://planscore.s3.amazonaws.com/uploads/20210307T032912.752515089Z/index.json",
  "plan_url": "https://planscore.org/plan.html?20210307T032912.752515089Z"
}