---
title: "Create Inventory Contract"
method: POST
path: "/api/admin/inventory/contracts"
tags: ["admin-inventory"]
---

# Create Inventory Contract

`POST /api/admin/inventory/contracts`

## Query parameters

- `dryRun` boolean

## Request body

- ContractMutationRequest — Contract create/update. All fields optional (partial update); create validates `name`, `vendor_id` and `start_date` in the service. `node_types` and `carry_over_node_ids` are create-only conveniences: they are not columns, they seed the term set and the initial node membership.
  - `name` string, nullable
  - `reference` string, nullable
  - `type` 'ONE_OFF' | 'RECURRING' | 'RENEWABLE'
  - `status` 'DRAFT' | 'ACTIVE' | 'ENDED' | 'CANCELLED'
  - `startDate` string, date-time, nullable
  - `endDate` string, date-time, nullable
  - `billingPeriod` 'ONE_TIME' | 'DAILY' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'BIMONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'BIENNIAL'
  - `paymentTiming` 'ADVANCE' | 'ARREARS'
  - `autoRenew` boolean, nullable
  - `noticePeriodDays` integer, nullable
  - `currency` string, nullable
  - `description` string, nullable
  - `notes` string, nullable
  - `extra` object, nullable
  - `vendorId` string, nullable
  - `continuesFromId` string, nullable
  - `nodeTypes` ContractNodeTypeTerm[], nullable
    - `nodeTypeId` string, required
    - `committedNodeCount` integer, nullable
    - `pricePerGpuHr` number, nullable
    - `pricePerNodeHr` number, nullable
    - `notes` string, nullable
    - `extra` object, nullable
  - `carryOverNodeIds` string[], nullable

## Response `200`

Successful Response

- GenericResponseMutationResult
  - `data` MutationResult
    - `operationId` string, required
    - `targetId` string, nullable
    - `targetName` string, nullable
    - `message` string, required
    - `created` integer, nullable
    - `updated` integer, nullable
    - `assigned` integer, nullable
    - `detached` integer, nullable
    - `retired` integer, nullable
  - `status` string, nullable — Response status

## Other responses

- `401` — Authorization failed
- `403` — Insufficient permissions
- `422` — Invalid request data

## Changes

- **2026-09-04** `cf5a8be325a9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/primeintellect/apis/pi-api/changes/api/admin/inventory/contracts/post.md)

---

[API](https://skmtc.dev/primeintellect/apis/pi-api.md) · [All operations](https://skmtc.dev/primeintellect/apis/pi-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primeintellect/pi-api/revisions/cf5a8be325a9/schema)
