Required Documents
List the documents the chosen offer needs, then send the files with Submit. There is no separate upload call.
List Required Documents
Lists the documents the chosen offer needs, grouped by type, including documents uploaded before. For example, a motor offer asks for the licence front and back,
a vehicle front photo (camera only) and the Mulkiya front. You need to make a POST call to the following url:
POST/v1/Quotation/RequiredDocuments
| Field | Type | Limit | Required | Description |
|---|---|---|---|---|
| refid | string | 500 | Yes | Quotation Id (encrypted). Note: refid, not quotation_id |
| offer_id | number | - | Conditional | Selected offer's id as a number; 0 for a group offer |
| offer_group_id | number | - | Conditional | Selected group offer's id as a number; 0 for a single offer |
| lang_code | string | 2 | Yes | Request language: en, ar |
| include_previous_docs | boolean | - | Optional | true: include documents the customer uploaded before |
{
"refid": "dldTUytwK0tReHpW...",
"offer_id": 102328,
"offer_group_id": 0,
"lang_code": "en",
"include_previous_docs": true
}
{
"status_code": "200",
"data": [
{
"type_code": "ProductRequiredDocs",
"type_name": "Product required documents",
"documents": [
{
"file_name": "License front side",
"entity_type_id": 47,
"doc_type_id": 67,
"doc_type_code": "LICENSE_FRONT",
"doc_type_name": "License front side",
"doc_type_description": "",
"is_uploaded": false,
"doc_type_allowed": "image,pdf",
"doc_source_allowed": "gallery,camera",
"templates": [
{
"file_name": "...",
"is_uploaded": false,
"download_url": "",
"template_url": ""
}
],
"previous_uplodeds": [],
"ref_id_sub": 0
}
]
}
],
"messages": []
}
refid (the quotation id) and numeric offer ids: send 0 for the one not used.
Response fields
| Field | Type | Description |
|---|---|---|
| data[] | array | Groups. Show type_name as a heading only when there is more than one group |
| doc_type_id, doc_type_code, doc_type_name | int, string | Document to collect (see document types) |
| doc_type_description | string | HTML help text (may be empty) |
| doc_type_allowed | string | Comma list of image, pdf (word, excel possible) |
| doc_source_allowed | string | gallery,camera = file or photo; camera = the photo must be taken with the device camera |
| is_uploaded, previous_uplodeds[] | boolean, array | Already provided: do not ask again. Items may carry file_name and download_url |
| templates[] | array | A form to download and fill: open template_url (or download_url) when not empty |
| entity_type_id, ref_id_sub | int | Internal references |
doc_source_allowed is camera, use <input type="file" capture="environment"> on the web; on a desktop, ask the customer to continue on a phone.
Document types
| doc_type_id | doc_type_code | Document |
|---|---|---|
| 67 | LICENSE_FRONT | Driving licence front side |
| 68 | LICENSE_BACK | Driving licence back side |
| 60 | VEHICLE_FRONT | Vehicle front photo |
| 69 | MULKIYA_FRONT | Mulkiya (vehicle registration card) front side |
| 52 | CLAIM_HISTORY | Claim history |
| 39 | CAR_CLAIM_FORM | Car claim form |
| 75 | - | Agency document / vehicle invoice (new vehicles, sent with Motor Create) |
The list is not exhaustive; always use the types returned for the chosen offer.
Sending the files
Files go inside the product's Submit request as documents, one item per document type, in base64 without the data: prefix.
Keep each file at 5 MB or less; Bima's website shrinks larger photos to JPEG in the browser before sending.
| Field | Type | Limit | Required | Description |
|---|---|---|---|---|
| doc_type_id | int | - | Yes | Document type from the list above |
| file_name | string | - | Yes | File name with extension |
| data_base64string | string | 5 MB | Yes | File content in base64, no data: prefix |
"documents": [
{
"doc_type_id": 67,
"file_name": "license-front.jpg",
"data_base64string": "/9j/4AAQ..."
}
]
See Motor Submit for a complete example.
is_required flag for mandatory documents is planned but not sent yet. The size limit per request is being confirmed with the API team.