# Get a contract

`GET https://app.shuttleglobal.com/c/api/instances/{instance_key}/contracts/{contract_id}`

Retrieve details of a specific contract, by its ID or the `alt_key` you gave it.

You can expand the following fields:
* account
* created_session
* payment_method
* last_transaction
* last_charge
* updated_session

## Authentication

- basicAuth: Basic Authentication using secret key
- bearerAuth: OAuth 2.0 Bearer Token Authentication

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contract_id` | path | string | yes | The contract's ID (`co_...`), or the `alt_key` you gave it. |
| `expand` | query | string | no | Fields to expand into full objects |

## Responses

### 200: Contract details

```json
{
  "contract": {
    "account": "string",
    "alt_key": "string",
    "amount": "string",
    "channel": "string",
    "completed": "2026-01-01T12:00:00Z",
    "created": "2026-01-01T12:00:00Z",
    "currency": "string",
    "description": "string",
    "designation": "string",
    "frequency": "WEEKLY",
    "gateway": "string",
    "id": "string",
    "initiated": "2026-01-01T12:00:00Z",
    "initiative": "string",
    "keep_active_until": "2026-01-01T12:00:00Z",
    "last_charge": "string",
    "last_transaction": "string",
    "legal_entity": "string",
    "metadata": {
      "order_id": "12345",
      "customer_reference": "CUS-001"
    },
    "next_contract": "string",
    "next_payment": "2026-01-01T12:00:00Z",
    "nonce": "string",
    "account_alt_key": "string",
    "charge_count": 0,
    "event_date": "2026-01-01T12:00:00Z",
    "outstanding_amount": "string",
    "payment_method": "string",
    "recurring": true,
    "retry_complete": true,
    "retry_count": 0,
    "status": "SETUP",
    "updated": "2026-01-01T12:00:00Z"
  }
}
```

### 400: Bad request

```json
{
  "code": "string",
  "message": "string"
}
```

### 401: Unauthorised: the API key is missing or not valid

```json
{
  "code": "UNAUTHORIZED",
  "message": "Unauthorised"
}
```

## Example request

```sh
curl --request GET \
  --url https://app.shuttleglobal.com/c/api/instances/YOUR_INSTANCE_KEY/contracts/CONTRACT_ID \
  --header 'Authorization: Basic <base64 of SECRET_KEY:>'
```

Reference page: https://docs.shuttleglobal.com/platforms/reference/operations/getcontract/