# Car-body (بدنه) — Fanavaran stage bodies (current YARA) Snapshot of **what hull submit actually sends** after `toFanavaranHullBaseClaimPayload` / `toFanavaranHullExpertisePayload`. TejaratNo additionally sends expert-reviewed `NotifierTypeId` and `NotifierRelationId` on the base claim, using the tenant-supplied codebooks. Both are required before initial submission; see [expert field review](../fanavaran-stage-field-review.md#tejaratno-notifier-review). Other tenants' bodies are unchanged. Experts can now review address, city, report type, accident/culprit/authority IDs, fault percentage, repair duration and vehicle value before their sending stage. See [expert field review](../fanavaran-stage-field-review.md); defaults below remain fallbacks for unreviewed records. Staged flow (VHUD): 1. Base: `POST /car/vehicle-hull-claims` (GEN.03) 2. **No dmg-cases** (`vehicle-hull-claims/{id}/dmg-cases` does not exist) 3. Attachments: `POST …/{Id}/files` (GEN.05) 4. Expertise: `POST …/{Id}/expertise` (GEN.06) Use hull `ContractId` (`hullContractId`, else tenant `contractId`). Nested URLs use GEN.03 **`Id`**, never `ClaimNo`. A PUT to `/vehicle-hull-claims/{Id}` may run before files/expertise; Parsian often has **no PUT route**. That PUT is best-effort and must not block GEN.05/06. **Send rule:** send the **hull whitelist only**. Do not send ثالث-only keys (`DamagedCount`, `HasOtherCulprit`, `CompensationReferenceId`, `DocReceivedDate`, `IsLicenseReplacement`, plaque block on base, …). **Manual submit body:** every supplied top-level field overrides its generated value, including IDs, arrays, nested objects, `false`, `0` and JSON `null`. Omitted fields retain generated defaults. Arrays and nested objects replace the corresponding value; they are not merged element by element. Lookup validation checks a copy of manual payloads and does not refresh their supplied premium or rewrite their values. Automatic submission without overrides keeps its existing inquiry, normalization and validation behavior. This also applies to third-party base/damage submits and both products' expertise submits. **Source tags:** same as `third-party-stage-fields.md` (`system` / `lookup` / `inquiry` / `user` / `staff` / `derived`). --- ## Stage 1 — Hull base claim (GEN.03) Built by `buildFanavaranSubmitPayload` then `enrichCarBodyHullBaseClaimPayload` then `toFanavaranHullBaseClaimPayload`. **Fanavaran has rejected as required (must not be null):** `CustomerFaultPercent`, `AuthorityCulpritId`, `AccidentTypeId`, `CostSeparationToDmgSections`, `IsOwnerChanged`, `PolicyId`, `ClaimExpertId`, dates/time, `CulpritTypeId`. **IsLicenseReplaced:** derived on the server from `CulpritLicenceIssuDate` and `AccidentDate`: default `0` through the third anniversary and `null` afterward. Do not infer replacement from licence age exceeding ten years: Parsian rejects that `1` with «باید خالی باشد». The hull base-claim submit body may explicitly override `IsLicenseReplaced` with `0`, `1`, or JSON `null`; omitted fields keep the derived default. Intake accepts valid past issue dates older than ten years. The existing missing-date fallback is `1400/01/01`. | Field | Persian | Type | Null? | Current value / source | |-------|---------|------|-------|------------------------| | PolicyId | شناسه بیمه‌نامه بدنه | number | **no** | **inquiry** first-party hull policy (`processed-body-policy` / `body-policy/{id}` / stored inquiry `policyId`) | | ClaimExpertId | کارشناس مسئول پرونده | number | **no** | **staff** FileMaker `CarBodyClaimExpertId` on V4/V5, else tenant | | AccidentDate | تاریخ حادثه | string Jalali | **no** | **user** first-party `statement.accidentDate`, else createdAt | | AccidentTime | ساعت حادثه | string `HH:mm` | **no** | **user** `statement.accidentTime` if set | | AnnouncementDate | تاریخ اعلام | string Jalali | **no** | **derived** = AccidentDate | | AccidentLocationAddress | نشانی محل حادثه | string | **no** | **user** expert review, else **system** `"استان تهران شهر تهران"` | | AccidentCauseId | علت حادثه | number | **no** | **user/expert** `accidentReason.fanavaran` from blame/claim; fallback **system** `6` · lookup `accident-causes` | | AccidentCityId | شهر حادثه | number | **no** | **user** expert review, else **system** `701` · lookup `cities` | | AccidentReportTypeId | نحوه اعلام | number | **no** | **user** expert review, else **system** `155` · lookup `accident-report-type` | | AccidentTypeId | نوع حادثه بدنه | number | **no** | Reviewed choice, else current `vehicle-hull-accident-types` row caption تصادف(حادثه); no numeric fallback | | CulpritTypeId | نوع مقصر بدنه | number | **no** | Reviewed choice, else current `vehicle-hull-accident-culprit-type` row caption بیمه‌گذار; never reuse third-party `337` | | AuthorityCulpritId | مرجع تعیین مقصر | number | **no** | Reviewed choice, else current `detection-accident-culprits` row caption بیمه‌گذار; no numeric fallback | | AccidentCulpritId | شناسه مقصر فناوران | number | **no** | Actual driver from parties inquiry with RoleId **166**; submit registers GEN.44 if missing, then verifies the role. Preview warns without creating a person. | | CustomerFaultPercent | درصد تقصیر بیمه‌گذار | number | **no** | **user** expert review, else **system** `100` | | CostSeparationToDmgSections | تفکیک هزینه به نقاط | number (ans) | **no** | **system** `0` خیر · lookup `ans` | | IsOwnerChanged | مالک تغییر یافته؟ | number (ans) | **no** | **system** `0` · lookup `ans` | | IsLicenseReplaced | گواهینامه تعویضی است؟ | number | often null | **derived** `0` through three years, otherwise `null`; explicit hull submit answer is preserved (ثالث uses `IsLicenseReplacement`) | | ActualPremium | حق بیمه واقعی | number | preferred | **inquiry** hull policy `TotalPremium` via `GET /lookups/body-policy/{PolicyId}` | | EstimateAmount | برآورد | number | **no** | **user** expert prices / provisional | | CulpritLicenceNo | شماره گواهینامه | string | **no** | dummy / **user** | | CulpritLicenceIssuDate | تاریخ صدور گواهینامه | string Jalali | **no** | **user** `parties.person.driverLicenseDate`; fallback **system** `"1404/08/20"` | | CulpritLicenceTypeId | نوع گواهینامه | number | sent | tenant `2` · lookup `driving-licence-types` | | AccidentVehicleUsedId | کاربری خودرو | number | **no** | **inquiry** hull policy `VehicleId` + `VehicleVersionNo` → vehicle GET `UsedId`; no default or expert override. Unresolved inquiry warns in preview and blocks submit. | | PoliceOfficerId | افسر | number | yes | null; do not copy the shared third-party sample `1` | | IsAccidentOutOfBorder | خارج از مرز | number | sent | **system** `0` | | ArchiveNo | بایگانی | string | yes | null | | EntryDate | تاریخ ورود | string | yes | null | | CulpritLicenceForeignCityName | شهر خارجی گواهینامه | string | yes | null | | PoliceReportSeri / Serial / Desc | کروکی | string | yes | null until **user** | | CulpritLevelTwoLicenceIssuDate | صدور گواهینامه پایه ۲ | string | yes | null | | TrackingCode | کد پیگیری | string | yes | null | | CourtArchiveNo | بایگانی دادگاه | string | yes | null | | PlaqueReplacementDate | تاریخ تعویض پلاک | string | yes | null | | StatusChangeDate | تغییر وضعیت | string | yes | null | | ClaimCompletionDate | تکمیل پرونده | string | yes | null | | DmgAssessorFirstCreationTime | زمان ارزیاب | string | yes | null | | IsSurplusArticleEighthLaw | مازاد ماده ۸ | number | yes | null | | GlassBreakReasonId | علت شکست شیشه | number | yes | null | | CulpritLicenceCountryId / CityId | محل صدور گواهینامه | number | yes | null | Also persisted locally (not a GEN.03 field): `claimCase.vehicle.carPrice` from hull policy **`VehicleValue`**. **Inquiries at this stage** - Hull policy: `GET /lookups/body-policy/{PolicyId}` → `TotalPremium`, `CustomerId`, `VehicleValue`, `VehicleId` - Parties: `GET /lookups/inquiry-by-unique-identifier` - Optional VIN / vehicle used-id --- ## Stage 2 — Damage case **Skipped.** YARA returns `fanavaranSync.damageCase.status = skipped`. Do not POST `dmg-cases`. --- ## Stage 3 — Attachments (GEN.05) Multipart `Param` + `Param1`. Proven `FileTypeId=63`. | Field | Persian | Type | Null? | Source | |-------|---------|------|-------|--------| | FileName | نام فایل | string | **no** | **user** (exact match to binary) | | FileTypeId | نوع مدرک | number | **no** | **lookup** `file-types` / tenant `ClaimFileTypeId` | | ClaimId | کد رایانه پرونده بدنه | number | **no** | stage 1 `Id` | --- ## Stage 4 — Expertise (GEN.06) Not ثالث GEN.08: no `DmgCaseId`, `InspectionPlaceId`, `RepairWage` on the root. Uses `Wage` + vehicle identity. `ClaimExpertId` = FileReviewer `CarBodyExpertiseClaim` on V4/V5, else tenant `ExpertiseClaimExpertId`. | Field | Persian | Type | Null? | Current source | |-------|---------|------|-------|----------------| | ClaimExpertId | کارشناس ارزیاب بدنه | number | **no** | **staff** / tenant | | DmgAssessmentDate | تاریخ بازدید | string Jalali | **no** | **derived** expert `submittedAt` | | InspectionTime | ساعت بازدید | string | **no** | **derived** | | MotorNo | شماره موتور | string | preferred | **inquiry** hull vehicle / party mapped `MtrNum` | | ChassisNo | شماره شاسی | string | preferred | **inquiry** `ShsNum` | | BuiltYear | سال ساخت | number | preferred | **inquiry** `BuiltYear` / `PrdDte` | | VIN | VIN | string | preferred | **inquiry** | | PlaqueNo | پلاک رشته‌ای | string | preferred | **inquiry** plk1+letter+plk3 | | PlaqueSerial | سریال پلاک (ایران) | string | preferred | **inquiry** | | ColorId | رنگ | number | preferred | **inquiry** `GET` vehicle by policy `VehicleId` | | Wage | اجرت کل | number | **no** | **user** sum `salary` | | ComponentReplacementCost | قطعه کل | number | **no** | **user** sum `price` | | WasteValue | داغی کل | number | **no** | **user** daghi | | RepairDuration | مدت تعمیر (روز) | number | **no** | **user** expert review, else **system** `3` | | VehicleCurrentValue | ارزش روز خودرو | number | preferred | **user** expert field review (rials), else `vehicle.carPrice` / `vehicle.price`, else **inquiry** policy `VehicleValue` | | DropAmount | افت قیمت | number | **no** | **user** price-drop total or `0` | | CarryAndRescueCost | حمل و نجات | number | yes | null | | WreckHighestValue | بالاترین ارزش لاشه | number | yes | null | | InspectionDeduction | کسر بازدید | number | yes | null | | DmgAndWasteDesc | شرح خسارت و داغی | string | yes | null | | WentDistanceByExpert | مسافت | number | yes | null | | IsDestruction | اسقاط؟ | number | yes | null | | PlaqueDesignId | طرح پلاک | number | yes | null | | PlaqueCityId | شهر پلاک | number | yes | null | | AccidentPercent | درصد حادثه | number | yes | null | | TheftCases | موارد سرقت | array | empty `[]` | system | | DmgSections[].Count | تعداد | number | **no** | **system** `1` | | DmgSections[].Desc | شرح قطعه | string | **no** | **user** part label | | DmgSections[].WasteValue | داغی ردیف | number | **no** | **user** | | DmgSections[].AccessoryKindId | نوع قطعه کاتالوگ | number | preferred | **user** `partId` · lookup `car-components` | | DmgSections[].DmgKindId | نوع آسیب بدنه | number | **no** | Current `vehicle-hull-dmg-kind` API row caption تخریب; no numeric fallback | | DmgSections[].VehicleHullAccessoryId | شناسه لوازم بدنه | number | preferred | Current policy `dmg-accessories`: exact `AccessoryKindId` or caption match; else the «کليه قطعات فابريک» factory-bundle row `Id`. Keep selected car-components `AccessoryKindId` + part `Desc` | | DmgSections[].DmgSectionCosts[].Caption | عنوان هزینه | string | **no** | **user** label | | DmgSections[].DmgSectionCosts[].Amount | مبلغ (قطعه+اجرت) | number | **no** | **user** | | DmgSections[].DmgSectionCosts[].DmgCostKindId | نوع هزینه | number | **no** | Current `vehicle-hull-dmg-cost-kinds` API row caption مجموع لوازم; no numeric fallback | **Lookups used:** `vehicle-hull-dmg-kind`, `vehicle-hull-dmg-cost-kinds`, `detection-accident-culprits`, `vehicle-hull-accident-types`, `vehicle-hull-accident-culprit-type`, `ans`, optional `vehicle-hull-policies/{id}/dmg-accessories` (no longer used for AccessoryId). **Inquiries:** `body-policy/{PolicyId}`, `vehicleById` (color + identity), parties inquiry, VIN/plate inquiry on blame. --- ## YARA preview / submit Same routes as ثالث (`/base-claim`, `/attachments`, `/expertise`). `/damage-case` preview/submit **skips** for `CAR_BODY`. ### Hull driver registration A policyholder-only (`RoleId=161`) inquiry does not satisfy the hull driver role. Before base-claim submission or hull synchronization, YARA checks the actual driver for `RoleId=166` (سایر) and registers `common/other-people` when missing, using national code, birthday and person details. The policyholder role is preserved. The returned create ID is used only after a subsequent inquiry verifies role 166. A successful registration is cached with national code and birthday so retries wait for verification rather than creating the same role again. Missing identity, lookup failures or unverified registration block the external hull write with `FANAVARAN_HULL_DRIVER_ROLE_REQUIRED`; local claim creation remains best-effort. Third-party driver/owner resolution continues to accept roles 161 or 166.