Bima Bima API Docs v1

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
refidstring500YesQuotation Id (encrypted). Note: refid, not quotation_id
offer_idnumber-ConditionalSelected offer's id as a number; 0 for a group offer
offer_group_idnumber-ConditionalSelected group offer's id as a number; 0 for a single offer
lang_codestring2YesRequest language: en, ar
include_previous_docsboolean-Optionaltrue: 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": [] }
Different id format This call takes refid (the quotation id) and numeric offer ids: send 0 for the one not used.

Response fields

Field Type Description
data[]arrayGroups. Show type_name as a heading only when there is more than one group
doc_type_id, doc_type_code, doc_type_nameint, stringDocument to collect (see document types)
doc_type_descriptionstringHTML help text (may be empty)
doc_type_allowedstringComma list of image, pdf (word, excel possible)
doc_source_allowedstringgallery,camera = file or photo; camera = the photo must be taken with the device camera
is_uploaded, previous_uplodeds[]boolean, arrayAlready provided: do not ask again. Items may carry file_name and download_url
templates[]arrayA form to download and fill: open template_url (or download_url) when not empty
entity_type_id, ref_id_subintInternal references
Camera-only documents When 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
67LICENSE_FRONTDriving licence front side
68LICENSE_BACKDriving licence back side
60VEHICLE_FRONTVehicle front photo
69MULKIYA_FRONTMulkiya (vehicle registration card) front side
52CLAIM_HISTORYClaim history
39CAR_CLAIM_FORMCar 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_idint-YesDocument type from the list above
file_namestring-YesFile name with extension
data_base64stringstring5 MBYesFile 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.

Coming soon An is_required flag for mandatory documents is planned but not sent yet. The size limit per request is being confirmed with the API team.