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

# Contract Processes

> Retrieve the processing status and extraction results for an uploaded contract.

After uploading a contract, use this endpoint to check the status of extraction processes running against it.

***

## Get Contract Processes

Returns the processing status and extraction results for a specific contract.

### Request

```
GET /v1/contracts/{contract_id}/processes
```

### Path Parameters

| Parameter     | Type   | Required | Description                                               |
| ------------- | ------ | -------- | --------------------------------------------------------- |
| `contract_id` | string | Yes      | The staging contract ID returned from the upload endpoint |

### Query Parameters

| Parameter   | Type | Required | Default | Description                         |
| ----------- | ---- | -------- | ------- | ----------------------------------- |
| `projectId` | UUID | Yes      | —       | The project the contract belongs to |

### Headers

| Header          | Required | Description                                                |
| --------------- | -------- | ---------------------------------------------------------- |
| `Authorization` | Yes      | `Bearer <token>` — must be scoped to the requested project |

### Response

| Field                              | Type    | Description                                                               |
| ---------------------------------- | ------- | ------------------------------------------------------------------------- |
| `staging_id`                       | integer | The staging contract identifier                                           |
| `contract_id`                      | integer | The contract ID (available after staging completes)                       |
| `staging_done`                     | boolean | Whether staging (pre-processing) has completed                            |
| `extraction_done`                  | boolean | Whether all extractions have completed                                    |
| `staging_processes`                | object  | Staging stage and info                                                    |
| `staging_processes.stage`          | string  | Current staging stage (`queued`, `processing`, `completed`, `failed`)     |
| `staging_processes.info`           | object  | Staging check details                                                     |
| `extraction_processes`             | object  | Extraction stage and individual extraction statuses                       |
| `extraction_processes.stage`       | string  | Overall extraction stage (`pending`, `processing`, `completed`, `failed`) |
| `extraction_processes.extractions` | array   | List of individual extraction tasks                                       |

```json theme={null}
{
  "data": {
    "staging_id": 456,
    "contract_id": 789,
    "staging_done": true,
    "extraction_done": false,
    "staging_processes": {
      "stage": "completed",
      "info": {}
    },
    "extraction_processes": {
      "stage": "processing",
      "extractions": [
        {
          "name": "extract-royalties",
          "status": "completed",
          "completed_at": "2025-03-01T12:02:30Z"
        },
        {
          "name": "extract-dates",
          "status": "processing",
          "completed_at": null
        }
      ]
    }
  }
}
```

<Note>
  Process statuses reflect real-time extraction progress. Poll this endpoint to track when all requested extractions have completed. `contract_id` and `extraction_processes` are `null` until staging completes successfully.
</Note>

### Errors

| Status | Description                                  |
| ------ | -------------------------------------------- |
| `400`  | Missing or invalid `projectId`               |
| `403`  | Token is not scoped to the requested project |
| `404`  | Contract not found                           |
| `429`  | Rate limit exceeded                          |

### Example

```bash theme={null}
curl "https://api.royaltyport.com/v1/contracts/stg-456/processes?projectId=a1b2c3d4-..." \
  -H "Authorization: Bearer rp_your_token_here"
```
