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

# Run Selection Criteria

Selection Criteria (SC) validates your loan tape against eligibility rules — checking that loans meet underwriting standards before a deal progresses. This recipe shows how to trigger a run and review any exceptions.

## Overview

```
1. POST /originator/sc/run                        → trigger SC job
2. GET  /originator/sc/loans/:dealId/results      → fetch results
3. GET  /originator/sc/exceptions                 → list all exceptions
4. GET  /originator/sc/exceptions/:exceptionId    → inspect exception detail
```

***

## Step 1 — Trigger a Selection Criteria Run

Pass the `deal_id` (loan ID) you want to validate.

```bash theme={null}
curl -X POST https://api.9squid.com/v1/api/originator/sc/run \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{ "loan_id": "clx1a2b3c4d5e6f7g8h9" }'
```

**Response**

```json theme={null}
{
  "success": true,
  "data": {
    "sc_job_id": "clxjob123456"
  }
}
```

The SC job runs asynchronously. Results are available once the job completes.

***

## Step 2 — Fetch Results for a Deal

```bash theme={null}
curl https://api.9squid.com/v1/api/originator/sc/loans/clx1a2b3c4d5e6f7g8h9/results \
  -H "Authorization: Bearer <your_token>"
```

**Response**

```json theme={null}
{
  "success": true,
  "data": [
    {
      "sc_job_id": "clxjob123456",
      "run_date": "2026-04-15T10:00:00Z",
      "pass": false,
      "exception_count": 3,
      "results": [
        { "field": "fico_score", "rule": "min_fico_700", "passed": false },
        { "field": "ltv", "rule": "max_ltv_80", "passed": true },
        { "field": "dti", "rule": "max_dti_45", "passed": false }
      ]
    }
  ]
}
```

***

## Step 3 — List All Exceptions

View all exception files across all SC runs for your organization.

```bash theme={null}
curl https://api.9squid.com/v1/api/originator/sc/exceptions \
  -H "Authorization: Bearer <your_token>"
```

**Response**

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "clxexc789",
      "deal_id": "clx1a2b3c4d5e6f7g8h9",
      "sc_job_id": "clxjob123456",
      "exception_count": 3,
      "created_at": "2026-04-15T10:00:00Z"
    }
  ]
}
```

***

## Step 4 — Inspect Exception Detail

Drill into a specific exception file to see loan-level data and the full exception history.

```bash theme={null}
curl https://api.9squid.com/v1/api/originator/sc/exceptions/clxexc789 \
  -H "Authorization: Bearer <your_token>"
```

**Response**

```json theme={null}
{
  "success": true,
  "data": {
    "id": "clxexc789",
    "loan_data": { },
    "exception_history": [
      {
        "field": "fico_score",
        "rule": "min_fico_700",
        "actual_value": 680,
        "threshold": 700,
        "passed": false
      }
    ]
  }
}
```

***

## Re-running After Corrections

If you correct your loan data and re-upload the tape, trigger a fresh SC run with the same `loan_id`. Each run creates a new job — results are tracked per `sc_job_id` so you have a full history.

***

## What's Next

* [ALM Analytics](/api-reference/originator-analytics/analyticscontroller_runalmanalysis) — run duration, convexity and stress tests on your deal
* [View Pool Summary](/api-reference/originator-pools/poolscontroller_getpoolsummary) — inspect aggregate pool statistics
* [Approve a Deal](/api-reference/originator-loans/loanscontroller_approvedeal) — accept or reject a securitization approval request
