3.9 KiB
Retrieve submitted hull files and expertise sections
Implemented from the supplied Fanavaran V2.0 customer documents:
CAR.VHUD.APIH.GEN.05 - سرویس فایل های پیوست خسارت بدنه.docxCAR.VHUD.APIH.GEN.12 - سرویس بازیابی نقاط آسیب دیده کارشناسی خسارت بدنه.docx
All routes require the existing actor Bearer token and access to the local claim.
The path's claimCaseId is a local MongoDB ObjectId. The backend resolves the
saved external claimId (never claimNo), hull ContractId, and the claim staff's
Location using the submission header resolver. Non-hull claims are rejected.
Routes
Base: /v2/fanavaran/{client}/claim-cases/{claimCaseId}/hull
| Local GET route | Fanavaran GET resource | Result |
|---|---|---|
/files |
/car/vehicle-hull-claims/{claimId}/files |
Live file metadata: Id, ClaimId, FileName, FileTypeId, Status |
/files/{fileId} |
/car/vehicle-hull-claims/{claimId}/files/{fileId} |
One file with the same metadata plus Base64 Data |
/expertise/dmg-sections |
/car/vehicle-hull-claims/{claimId}/expertise/{expertiseId}/dmg-sections |
Damage sections, nested costs, section/cost IDs, and provider tracking codes |
The sections route defaults to the saved expertiseId. To read a historical
expertise on this same claim, supply ?expertiseId=44237. A missing saved
expertise ID without an explicit override returns 400. File and expertise IDs
must be positive safe integers.
Local validation errors return a stable code, a specific Persian message, and
the relevant field/product metadata. They do not collapse to the generic form
validation message:
| Code | Meaning |
|---|---|
FANAVARAN_LOCAL_CLAIM_ID_INVALID |
claimCaseId must be a local MongoDB ObjectId, not the numeric external claim ID |
FANAVARAN_HULL_CLAIM_REQUIRED |
The linked claim resolves to third-party; actualProduct and expectedProduct identify the mismatch |
FANAVARAN_HULL_CLAIM_NOT_SUBMITTED |
No external claimId is saved for the local claim |
FANAVARAN_HULL_EXPERTISE_ID_MISSING |
No expertise ID is saved and no override was supplied |
FANAVARAN_HULL_FILE_ID_INVALID / FANAVARAN_HULL_EXPERTISE_ID_INVALID |
The selected external ID is not a positive safe integer |
FANAVARAN_CLIENT_INVALID |
The requested tenant is unsupported |
Selecting parsian chooses the insurer; it does not change a third-party claim
into a hull claim. These VHUD routes intentionally reject third-party claims.
Every response wraps the unmodified vendor body in data, with clientKey,
claimCaseId, claimId, and the selected fileId or expertiseId when relevant:
{
"clientKey": "parsian",
"claimCaseId": "6af4594a32d485128a55742d",
"claimId": 5190845,
"data": [
{
"Id": 2008737,
"ClaimId": 5190845,
"FileName": "1.jpg",
"FileTypeId": 70,
"Status": 2003
}
]
}
The list response does not contain image bytes. Retrieve the desired file ID
with the single-file route to obtain data.Data as Base64. Preserve the numeric
Status value; its meaning belongs to Fanavaran's
/common/code-list/file-status lookup and is not inferred by these routes.
GEN.12 responses preserve Id, ExpertiseId, AccessoryKindId,
VehicleHullAccessoryId, DmgKindId, Count, WasteValue, DmgAmount, Desc,
CINumber, CITrackingCode, and DmgSectionCosts when returned. Each nested cost
can include its own Id, DmgSectionId, DmgCostKindId, Caption, and Amount.
These reads call Fanavaran directly without resubmitting claims/files/expertise,
using local upload receipt caches, or changing local claim records. In particular,
the remote file list can reveal historical uploads whose file IDs were not saved
by the old batch uploader. Vendor errors retain their original Message and
RuleName; transient errors participate in the shared tenant backoff.