> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a contract

> Update a contract

### Path parameters

<ParamField path="id" type="string" required>
  Revenue contract ID
</ParamField>

### Request body

`UpdateRevenueContractRequest`

<ParamField body="effective_date" type="string,null">
  ISO date (`YYYY-MM-DD`).
</ParamField>

<ParamField body="invoice_id" type="string,null" />

<ParamField body="order_id" type="string,null" />

<ParamField body="status" type="string,null">
  One of `draft`, `active`, `completed`, `cancelled`.
</ParamField>

### Responses

<ResponseField name="200" type="RevenueContractResponse" />

<ResponseField name="409" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url 'https://api.stateset.com/api/v1/revenue-contracts/{id}' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "effective_date": null,
    "invoice_id": null,
    "order_id": null,
    "status": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "contract_number": "string",
    "created_at": "string",
    "currency": "string",
    "customer_id": "string",
    "deferred_balance": "string",
    "effective_date": "string",
    "id": "string",
    "obligations": [
      {
        "allocated_amount": "string",
        "contract_id": "string",
        "deferred_amount": "string",
        "description": "string",
        "id": "string",
        "recognition_method": "string",
        "recognized_amount": "string"
      }
    ],
    "status": "string",
    "total_recognized": "string",
    "transaction_price": "string"
  }
  ```
</ResponseExample>
