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

# Resubmission Workflow

> Re-evaluate a previously processed record with corrected data using the JSON resubmission path

When a record has been processed through the initial XML path and corrections are needed — such as updated candidate information or corrected charge data — use the resubmission path instead of resubmitting the original XML.

## When to Use Resubmission

| Scenario                                            | Path                                |
| --------------------------------------------------- | ----------------------------------- |
| First evaluation of a screening record              | Initial submission (`record.xml`)   |
| Re-evaluation after correcting mapped criminal data | Resubmission (`record.record_json`) |
| Re-evaluation after updating candidate identity     | Resubmission (`record.record_json`) |

## How Resubmission Differs from Initial Submission

| Field                    | Initial Submission | Resubmission            |
| ------------------------ | ------------------ | ----------------------- |
| `record.xml`             | Required           | Omit                    |
| `record.record_json`     | Omit               | Required                |
| `record.submission_type` | Omit               | `"resubmit"` (required) |
| `record.candidate_info`  | Required           | Required                |
| `record.search_id`       | Required           | Required                |
| `record.search_date`     | Required           | Required                |
| `record.order_id`        | Required           | Required                |
| `record.order_number`    | Required           | Required                |

The response shape is identical for both paths.

## Step-by-Step

### 1. Prepare the Corrected Record JSON

The `record_json` object must include a top-level `criminal_search_results` key with the corrected criminal data.

**Important placement rules:**

* `candidate_info`, `submission_type`, `order_id`, and `order_number` must be **sibling fields on `record`** — not nested inside `record_json`
* `record_json` must **not** contain `candidate_info`, `submission_type`, `order_id`, or `order_number`

### 2. Build the Request

```json theme={null}
{
  "record": {
    "search_id": "76190bc0-e58c-494f-92c5-0c9a47389528",
    "search_date": "2025-04-30",
    "order_id": "41115779",
    "order_number": "41115779.1",
    "submission_type": "resubmit",
    "record_json": {
      "criminal_search_results": {
        "courts": [
          {
            "cases": [
              {
                "case_number": "MJ-05003-TR-0006023-2020",
                "jurisdiction_state": "PA",
                "offenses": [
                  {
                    "charge": "DRIVING WHILE OPERATOR PRIVILEGES SUSPENDED",
                    "disposition": "GUILTY",
                    "offense_date": "2020-03-10",
                    "type_class": "SUMMARY"
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    "candidate_info": {
      "first_name": "John",
      "last_name": "Doe",
      "date_of_birth": "1990-05-15",
      "ssn": "123-45-6789"
    },
    "applicant_state": "CA"
  }
}
```

### 3. Submit the Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "$PR_API_BASE/evaluate" \
    -H "Authorization: Bearer $PR_TOKEN" \
    -H "Content-Type: application/json" \
    --data @resubmit.json
  ```

  ```python Python theme={null}
  import requests, os

  base = os.environ["PR_API_BASE"]
  token = os.environ["PR_TOKEN"]

  resp = requests.post(
      f"{base}/evaluate",
      headers={
          "Authorization": f"Bearer {token}",
          "Content-Type": "application/json"
      },
      json=payload
  )
  result = resp.json()
  ```
</CodeGroup>

### 4. Interpret the Response

The response uses the same structure as an initial submission. See [Evaluate endpoint](/api-reference/endpoints/evaluate) for the full response reference and [Quickstart — Step 5](/quickstart#step-5-understand-the-response) for field explanations.

## Common Mistakes

| Mistake                                                         | Result           |
| --------------------------------------------------------------- | ---------------- |
| Nesting `candidate_info` inside `record_json`                   | Validation error |
| Nesting `order_id` or `order_number` inside `record_json`       | Validation error |
| Omitting `submission_type: "resubmit"` when using `record_json` | Validation error |
| Sending both `xml` and `record_json`                            | Validation error |
| Putting `submission_type` inside `record_json.search`           | Validation error |

## Related

* [Evaluate endpoint](/api-reference/endpoints/evaluate) — Full request/response reference for both paths
* [Quickstart](/quickstart) — Initial submission walkthrough
* [Troubleshooting](/troubleshooting) — Common issues and resolution steps
