---
title: "Update contract"
method: PUT
path: "/contracts/{idContract}"
tags: ["Contracts"]
---

# Update contract

`PUT /contracts/{idContract}`

## Request

- Base URL: `https://api.toriihq.com/v1.0`
- URL: `https://api.toriihq.com/v1.0/contracts/{idContract}`
- Auth: API key in header `Authorization`

Updates an existing contract.<br/><br/>Fields an admin marked as required in Torii cannot be cleared: sending one empty fails with 400 and lists it in `data.missingMandatoryFields`. Fields you leave out are not checked.<br/><br/>Currency fields (e.g., `amount`) can be numbers (`"amount": 1500`, uses org default currency) or objects to set a different currency: `"amount": { "value": 23000000, "currency": "EUR" }`. Cannot set `currency` as a top-level field.<br/><br/>Optional `lineItems` are **appended** to the contract's existing line items (each needs a `description`; the same optional value fields as on create). Items cannot carry an `id` (400), existing items are never modified or removed here, and omitting `lineItems` leaves them unchanged. Removing a line item is done in the Torii web app. Read them back with `GET /contracts/{idContract}?fields=lineItems`.<br/><br/>
<p><ul><li>Rate limit: 400 requests per minute</li></ul></p>

## Path parameters

- `idContract` integer, required

## Request body

- UpdateContract: Update contract
  - `idApp` integer: Unique app identifier
  - `amount` integer
  - `startDate` string, date-time: Contract start date, in ISO 8601 format (e.g. "2022-02-03")
  - `endDate` string, date-time: Contract end date, in ISO 8601 format (e.g. "2022-02-03")
  - `lineItems` Model74[]: Products / SKUs to append to the contract's line items; existing items are untouched
    - `description` string, required
    - `quantity` integer
    - `pricePerUnit` number
    - `totalCost` number
    - `currency` string
    - `startDate` string, date-time
    - `endDate` string, date-time
    - `discount` number
    - `tax` number
    - `paymentTerm` string
    - `costPeriod` string
    - `licensingModel` string
    - `licensingMetric` string
    - `sku` string

## Response `200`

Update contract

- Model115: Update contract
  - `contract` Contract
    - `id` integer: Unique identifier
    - `name` string
    - `status` string: Contract status

---

[API](https://skmtc.dev/toriihq/apis/torii-api-documentation.md) - [All operations](https://skmtc.dev/toriihq/apis/torii-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/toriihq/apis/torii-api-documentation/revisions/15fd1512591b?raw)
