---
title: "Plan Contract"
method: POST
path: "/api/v1/contracts/{asset_public_id}/plan"
tags: ["contracts"]
---

# Plan Contract

`POST /api/v1/contracts/{asset_public_id}/plan`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/contracts/{asset_public_id}/plan`
- Auth: none declared

Plan an import: parse YAML + diff against current asset state.

Does not mutate anything. The request body is raw YAML (same
content-type flexibility as `/validate`). Returns per-domain
DomainDiff objects plus a count summary.

## Path parameters

- `asset_public_id` string, uuid, required

## Query parameters

- `mode` 'extended' | 'odcs-pure': Portability mode for exports. Values match the CLI `--mode` flag and the REST `mode` query parameter exactly, so string round-trips via FastAPI's query parser work without custom coercion.
- `include` string, nullable: Comma-separated domains to include in the diff.
- `exclude` string, nullable: Comma-separated domains to exclude.

## Headers

- `Authorization` string

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

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