---
title: "Get contract by ID"
method: GET
path: "/bus/contract/{id}"
tags: ["bus"]
---

# Get contract by ID

`GET /bus/contract/{id}`

Returns the metadata of the contract with the specified ID.

## Path parameters

- `id` string, required — A unique identifier for a file contract

## Response `200`

Contract metadata

- ContractMetadata
  - `id` string — The unique identifier for the file contract.
  - `hostKey` string — The public key of the host.
  - `v2` boolean — Indicates if the contract is a V2 contract.
  - `proofHeight` integer — The height at which the storage proof needs to be submitted
  - `renewedFrom` string — The ID of the contract this one was renewed from
  - `revisionHeight` integer — The block height of the latest revision
  - `revisionNumber` integer — The current revision number of the contract
  - `size` integer — The size of the contract in bytes
  - `startHeight` integer — The block height at which the contract created
  - `state` 'pending' | 'active' | 'complete' | 'failed' — The state of the contract
  - `usability` 'good' | 'bad' — The usability status of the contract
  - `windowStart` integer — The block height when the contract's proof window starts.
  - `windowEnd` integer — The block height when the contract's proof window ends.
  - `contractPrice` string — The price of forming the contract.
  - `initialRenterFunds` string — The initial funds provided by the renter.
  - `spending` object — Costs and spending details of the contract.
    - `deletions` string — Total amount spent on sector deletions
    - `fundAccount` string — Total amount spent on funding ephemeral accounts
    - `sectorRoots` string — Total amount spent on listing sector roots
    - `uploads` string — Total amount spent on storing sectors
  - `archivalReason` 'renewed' | 'removed' | 'hostpruned' — The reason for archiving the contract, if applicable.
  - `renewedTo` string — The ID of the contract this one was renewed to, if applicable.

## Other responses

- `500` — Internal server error

---

[API](https://skmtc.net/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.net/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/versions/184a3d5207da/schema)
