---
title: Claim submission via API
summary: Submits a completed Online 801 submission to ClaimCenter via CCClaimDataApi, adopting the returned ClaimID and marking the submission Submitted.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.Claim.Entry
reference_type: package
operation_id: OP-CE-15
trigger: cls801Submission.SubmitClaim, delegating to clsSubmitClaimByAPI
---

# Claim submission via API

Once an Online 801 submission and its detail have been completed, `SubmitClaim` packages the submission into the payload ClaimCenter expects, adjusts dates to avoid a same-day rollback edge case, and posts it to CCClaimDataApi. A successful call returns a new ClaimCenter `ClaimID`, which is adopted onto the submission before it is marked Submitted.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CE-15 |
| **Trigger** | `cls801Submission.SubmitClaim`, called once a submission and its detail have passed validation |
| **Inputs** | Validated submission and submission-data objects, acting user |
| **Outputs** | ClaimCenter `ClaimID`; updated submission status `Submitted`; `clsSubmissionResult` |
| **Primary components** | `cls801Submission.SubmitClaim`, `clsNewClaimModel`, `clsSubmitClaimByAPI.AfterInsert` |
| **Entry point** | `Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Submission.vb` |

## Steps

1. **Build the ClaimCenter payload.** `clsNewClaimModel` maps the submission and submission-data fields into the DTO shape expected by the CCClaimDataApi new-claim endpoint.
2. **Shift dates to avoid a same-day rollback** ([BR-CE-023](../business-rules.md#br-ce-023-claimcenter-submission-shifts-loss-date-and-claimant-birth-date-to-avoid-same-day-rollback)). The loss (injury) date and the claimant's birth date are adjusted before submission when they would otherwise cause ClaimCenter to roll back the case on the same day it is created.*
3. **Post the payload to CCClaimDataApi.**
   - Sub-step: `clsSubmitClaimByAPI` issues the REST call and receives a response array.
4. **Handle the API response in `AfterInsert`.**
   - If the response array contains at least one element and it indicates success: read the new `ClaimID` from the response and adopt it onto the submission.
   - If the response array contains at least one element and it indicates failure: read the error/exception data from `response(0)` and surface it as a broken rule.
   - **Confirmed defect**: if the response array has zero elements, the same failure-handling branch still attempts to read `response(0).ExceptionData`, which throws an index/null-reference exception because there is no element at index 0 — this fallback path is not actually safe for a genuinely empty response.
5. **Mark the submission Submitted.** After the local save attempt, `SubmitClaim` sets `IsSubmitted = True` on the result object unconditionally — regardless of whether the adopted `ClaimID`/local save actually succeeded — which can mask a failed local persist behind an apparently successful submission flag.*
6. **Persist the adopted `ClaimID` and Submitted status** back onto the submission header (see [801 submission CRUD](801-submission-crud.md)).

## Process flow

```mermaid
flowchart TD
	Start([SubmitClaim called]) --> Build[Build ClaimCenter<br>payload from submission/detail]
	Build --> Shift[Shift loss date and<br>birth date if needed]
	Shift --> Post[POST to CCClaimDataApi<br>new-claim endpoint]
	Post --> RespCheck{Response array<br>has any elements?}
	RespCheck -->|No| Defect([Defect: response(0) access<br>throws on empty response])
	RespCheck -->|Yes| Success{Response indicates<br>success?}
	Success -->|Yes| Adopt[Adopt returned ClaimID]
	Success -->|No| Error([Surface error from<br>response(0)])
	Adopt --> MarkSubmitted[Set IsSubmitted = True<br>unconditionally]
	MarkSubmitted --> Persist([Persist ClaimID and<br>Submitted status])
```

## Failure and edge-case behavior

- **Confirmed defect**: `clsSubmitClaimByAPI.AfterInsert`'s empty-response fallback branch dereferences `response(0)` when `response.Length = 0`, which throws rather than surfacing a graceful "no response received" error.
- **`IsSubmitted` set unconditionally**: `SubmitClaim` marks the result `IsSubmitted = True` after the local save attempt regardless of whether that save succeeded, which can present a submission as successfully submitted even when the local persist step failed.*
- The date-shifting logic in step 2 is a workaround for a downstream ClaimCenter rollback behavior rather than a data-correctness rule; the shifted dates are what get submitted to ClaimCenter, not what remains on the local submission record.*

## Related documentation

- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources

- `Business\SAIF.Business.Claim.Entry\Online801\Submission\cls801Submission.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\Submission\clsSubmitClaimByAPI.vb`
- `Business\SAIF.Business.Claim.Entry\Online801\Submission\ApiNewClaimModels\clsNewClaimModel.vb`
