---
title: "Update an existing gas contract"
method: PUT
path: "/users/{userId}/gas-contracts/{contractId}"
tags: ["Contracts|Gas"]
---

# Update an existing gas contract

`PUT /users/{userId}/gas-contracts/{contractId}`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/users/{userId}/gas-contracts/{contractId}`
- Auth: API key in header `clevergy-api-key`

Updates the details of an existing gas contract

## Path parameters

- `userId` string, required
- `contractId` string, required

## Request body

- GasContractRequest: Request to create a new gas contract
  - `startDate` string, date, required: Start date of the gas contract
  - `endDate` string, date: End date of the gas contract
  - `status` 'ACTIVE' | 'INACTIVE', required: Status of the gas contract
  - `address` string, required: Address associated with the gas contract
  - `postalCode` string: Postal code associated with the gas contract
  - `cups` string, required: Universal Point of Supply Code (CUPS)
  - `tariffAccess` 'RL01' | 'RL02' | 'RL03' | 'RL04' | 'RL05' | 'RL06' | 'RL07' | 'RL08' | 'RL09' | 'RL10' | 'RL11', required: Tariff access code
  - `tariffName` string, required: Name of the tariff applied to the contract
  - `iban` string: IBAN for billing purposes
  - `distributorName` string: Name of the gas distributor company
  - `holderName` string: Name of the contract holder
  - `commercialName` string: Name of the commercial gas company
  - `fixedPrice` number: Fixed price component of the gas contract (€/day)
  - `energyPrice` number: Energy price component of the gas contract (€/kWh)
  - `pressure` number: Supply pressure in bar
  - `contractNumber` string: Contract number

## Response `200`

Gas contract updated successfully

- GasContract: Gas contract details
  - `id` string, required: Unique identifier of the gas contract
  - `startDate` string, date, required: Start date of the gas contract
  - `endDate` string, date: End date of the gas contract
  - `status` 'ACTIVE' | 'INACTIVE', required: Status of the gas contract
  - `address` string, required: Address associated with the gas contract
  - `postalCode` string: Postal code associated with the gas contract
  - `connectionId` string: UUID of the gas connection
  - `connectionContractId` string: ID of the connection contract
  - `cups` string, required: Universal Point of Supply Code (CUPS)
  - `tariffAccess` 'RL01' | 'RL02' | 'RL03' | 'RL04' | 'RL05' | 'RL06' | 'RL07' | 'RL08' | 'RL09' | 'RL10' | 'RL11', required: Tariff access code
  - `tariffName` string, required: Name of the tariff applied to the contract
  - `iban` string: IBAN for billing purposes
  - `distributorName` string: Name of the gas distributor company
  - `holderName` string: Name of the contract holder
  - `commercialName` string: Name of the commercial gas company
  - `fixedPrice` number: Fixed price component of the gas contract (€/day)
  - `energyPrice` number: Energy price component of the gas contract (€/kWh)
  - `pressure` number: Supply pressure in bar
  - `fileUrl` string, required: URL to access the gas contract file. Also used to upload a new contract file as response in POST and PUT methods.
  - `contractNumber` string: Contract number

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Gas contract not found
- `409`: Contract already exists (only if contract number is provided)
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
