API
Documentation

Proprietary & Confidential Statement:

This document and the information disclosed within, including the document structure and contents, are confidential and the proprietary property of Min Xin Insurance Company Limited and are protected by patent, copyright and other proprietary rights. Any disclosure to a third party in whole or in part in any manner is expressly prohibited without the prior written permission of Min Xin Insurance Company Limited.

Sample API Request

A sample API request without any parameter and raw body.
GET https://api.mxic.com.hk/
RAW Request Body
no body
Header

api_token string(64)

Use the {api_token} that were retrieved from the `Create an Access Token` service in every request header as follows:
Authorization: {api_token}
Response
{ "status": 404, "datetime": "2022-03-01 17:04:10", "authorized": false, "message": "Requests missing a required parameters", "result": { "success": false } }

status integer(3)

Similar to HTTP status.

datetime string(19)

Response datetime format in yyyy-mm-dd hh:ii:ss

authorized boolean

message string

A message to inform your API request's overarching result.

result object

success boolean

Create an Access Token

Every request to Min Xin API requires an api_token to authorize a user.
POST https://api.mxic.com.hk/?m=access_token
RAW Request Body
api_user={user_name}&api_key={api_key}

api_user string

You can find api_user in User > Update User Info.

api_key string

You can find and modify the api_key in User > Update User Info.
Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": false, "message": "API token has been successfully created", "result": { "success": true, "token": "wzd0Fdsg7gL01HISXYq1t1uwJo.dw.yZckd!EkCZ9uQaBNthjFCy85RFrzgR10uQ", "expire": "2022-01-30 16:00:00" } }

token string(64)

Containing digit,uppercase, lowercase and special characters.

expire string(19)

The access token's expiration time format in yyyy-mm-dd hh:ii:ss

Find your api key at the User Dashboard

Login to the platform > User > Update User Info

eMotor - List Brands

Returns a list of car brands.
GET https://api.mxic.com.hk/?m=emotor/quotation/getBrands&order_by={order_by}
RAW Request Body
no body

brand_name string

Optionally returns specify brand information.

order_by string

Specify the order of brands to return.
Use ':asc' after the value for ASC and ':desc' for DESC (e.g. brand_name:desc).
Default sorted by 'brand_name:asc' ASC.
Header

api_token string(64)

Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": true, "message": "The request was successfully completed", "result": { "total": 44, "order_by": "label:asc", "rows": [ { "brand_id": 1, "brand_name": "ACURA" }, { "brand_id": 2, "brand_name": "ALFA ROMEO" }, ... ] } }

total integer

order_by array

rows [object]

brand_id integer(10)

A unique identifier of the brand.

brand_name string

Brand name.

eMotor - List Models

Returns a list of car models.
GET https://api.mxic.com.hk/?m=emotor/quotation/getModels&brand_name={brand_name}&order_by={order_by}
RAW Request Body
no body

brand_name string

Required parameter or using brand_id for search the models.

order_by string

Specify the order of models to return.
Use ':asc' after the value for ASC and ':desc' for DESC (e.g. model_name:desc).
Default sorted by 'model_name:asc' ASC.
Header

api_token string(64)

Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": true, "message": "The request was successfully completed", "result": { "total": 4, "order_by": [ "brand_name:asc" ], "search": { "brand_name": "ACURA" }, "rows": [ { "brand_id": 1, "brand_name": "ACURA", "model_id": 1, "model_name": "2.5", "cc": 2451 }, { "brand_id": 1, "brand_name": "ACURA", "model_id": 2, "model_name": "3.2", "cc": 3206 }, ... ] } }

total integer

order_by array

search object

rows [object]

brand_id integer(10)

A unique identifier of each brand.

brand_name string

Brand name.

model_id integer(10)

A unique identifier of the model.

model_name string

Model name.

cc integer(4)

Default engine capacity of the car.

eMotor - List Occupations

Returns a list of occupations.
GET https://api.mxic.com.hk/?m=emotor/quotation/getOccupations&order_by={order_by}
RAW Request Body
no body

occupation_name string

Optionally returns specify occupation information.

order_by string

Specify the order of occupations to return.
Use ':asc' after the value for ASC and ':desc' for DESC (e.g. occupation_name:desc).
Default sorted by 'brand_name:asc' ASC.
Header

api_token string(64)

Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": true, "message": "The request was successfully completed", "result": { "total": 35, "order_by": [ "occupation_name:asc" ], "search": {}, "rows": [ { "occupation_id": 14, "occupation_name": "Actors / Actresses, Musicians, Professional Model," }, { "occupation_id": 1, "occupation_name": "Advertising, Marketing, Culture, Art, Music, Design" }, ... ] } }

total integer

order_by array

rows [object]

occupation_id integer(10)

A unique identifier of the occupation.

occupation_name string

Occupation name.

eMotor - Get Quote

Get a car insurance quote.
POST https://api.mxic.com.hk/?m=emotor/quotation/getQuote
RAW Request Body
custom_code={custom_code}&class={class}&client_type={client_type}&client_discount={client_discount}&year_manufacture={year_manufacture}&model={model}&cc={cc}&est_value={est_value}&drivers_occupation={drivers_occupation}&drivers_age={drivers_age}&drivers_penalty={drivers_penalty}&drivers_experience={drivers_experience}&drivers_accident={drivers_accident}&drivers_suspension={drivers_suspension}&drivers_claim={drivers_claim}

custom_code string(64)

Optionally, specify a code for identify the response (e.g. your quote id / no.).

class integer(1)

Class of Insurance, 1 = Comprehensive (including Third-party) / 2 = Third-party Only.

client_type integer(1)

Client Type, 1 = Individual Client / 2 = Company Client

client_discount integer(3)

Optionally apply a discount for your client, default 0 (e.g. 10).

year_manufacture date(Y)

Between 16 years ago from today (e.g. 2021).

model integer(5)

Car Model id, retrieved from the getModels service (model_id).

cc integer(4)

Cylinder Capacity, retrieved from the getModels service (cc) +/-5%.

est_value integer(7)

Estimated Value, only required for Comprehensive (e.g. 100000).

drivers_occupation integer(3)

Occupation id, retrieved from the getOccupations service (occupation_id)

drivers_age integer(2)

Age of the driver (e.g. 35).

drivers_experience integer(2)

Driving experience of the driver, (e.g. 3)

drivers_penalty integer(2)

Penalty record(s) of the driver in the last 3 years (e.g. 0).

drivers_accident integer(2)

Accident record(s) of the driver in the last 3 years, 0 = No / 1 = Yes.

drivers_suspension integer(1)

License suspension of the driver in the last 3 years, 0 = No / 1 = Yes.

drivers_claim integer(1)

Having claims history of the driver in the last 3 years, 0 = No / 1 = Yes.
Header

api_token string(64)

Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": true, "message": "The request was successfully completed", "result": { "referral": false, "custom_code": "", "class_name": "Third-party", "client_type": "Individual Client", "drivers": [ { "occupation": "Logistics, Shipping, Transportation", "age": "25-39", "experience": "3+", "penalty": "0", "accident": "No", "suspension": "No", "claim": "No" } ], "premiums": { "gross_premium_amt": "5000.00", "cp_discount_pct": "0.00", "cp_discount_amt": "0.00", "mib_pct": "0.00", "mib_amt": "0.00", "levy_pct": "0.1", "levy_amt": "5.00", "total_premium_amt": "5005.00", "commission_pct": "60.00", "commission_amt": "3000.00" }, "excesses": [ { "code": "tppd_excess", "description": "Third Party Property Damage", "amt": "11000.00" }, { "code": "tppd_young_driver_excess", "description": "TPPD Young Driver", "amt": "11000.00" }, { "code": "tppd_inexperienced_driver_excess", "description": "TPPD Inexperienced Driver", "amt": "11000.00" }, { "code": "tppd_unnamed_driver_excess", "description": "TPPD Unnamed Driver", "amt": "11000.00" } ] } }

referral boolean

If referral is equal to `true`, that means the premiums of the quote are not certain.

custom_code string(64)

Return your custom_code.

class_name string(13)

The class name of insurance.

client_type string(18)

Description of the client type.

drivers [object]

occupation string

Description of the occupation.

age string(5)

Age range of the driver.

experience string(5)

Description of the driving experience.

penalty string(5)

A number or a range of the penalty record(s).

accident string(3)

Description of the accident record.

suspension string(3)

Description of the license suspension record.

claim string(3)

Description of the claim record.

premiums object

gross_premium_amt string

cp_discount_pct string

The percentage of client discount.

cp_discount_amt string

Amount of client discount.

mib_pct string

mib_amt string

levy_pct string

levy_amt string

total_premium_amt string

commission_pct string

commission_amt string

excesses [object]

code string(32)

A unique excess code.

description string

Description of excess.

amt string(8)

Amount of excess.

eMotorcycle - List Brands, Models, Occupations

Returns a list of records such as eMotor.
List Brands
GET https://api.mxic.com.hk/?m=emotorcycle/quotation/getBrands&order_by={order_by}

List Models
GET https://api.mxic.com.hk/?m=emotorcycle/quotation/getModels&brand_name={brand_name}&order_by={order_by}

List Occupations
GET https://api.mxic.com.hk/?m=emotorcycle/quotation/getOccupations&order_by={order_by}

eMotorcycle - Get Quote

Get a car insurance quote.
POST https://api.mxic.com.hk/?m=emotorcycle/quotation/getQuote
RAW Request Body
custom_code={custom_code}&class={class}&client_type={client_type}&client_discount={client_discount}&year_manufacture={year_manufacture}&model={model}&cc={cc}&ncb={ncb}&est_value={est_value}&is_delivery={is_delivery}&drivers_occupation={drivers_occupation}&drivers_licence={drivers_licence}&drivers_age={drivers_age}&drivers_penalty={drivers_penalty}&drivers_accident={drivers_accident}&drivers_claim={drivers_claim}

custom_code string(64)

Optionally, specify a code for identify the response (e.g. your quote id / no.).

class integer(1)

Class of Insurance, 2 = Third-party Only.

client_type integer(1)

Client Type, 1 = Individual Client / 2 = Company Client

client_discount integer(3)

Optionally apply a discount for your client, default 0 (e.g. 10).

year_manufacture date(Y)

Between 16 years ago from today (e.g. 2021).

model integer(5)

Car Model id, retrieved from the getModels service (model_id).

cc integer(4)

Cylinder Capacity, retrieved from the getModels service (cc) +/-5%.

ncb integer(2)

NCD, 0/10/20/30.

est_value integer(7)

Estimated Value, only required for Comprehensive (e.g. 100000).

is_delivery integer(1)

Will the named driver use it for express or food delivery? 0 = No / 1 = Yes.

drivers_occupation integer(3)

Occupation id, retrieved from the getOccupations service (occupation_id)

drivers_licence string(1)

Driving licence of the driver, F = Full / P = Probationary / L = Learner.

drivers_age integer(2)

Age of the driver (e.g. 35).

drivers_experience integer(2)

Driving experience of the driver, (e.g. 3)

drivers_penalty integer(2)

Penalty record(s) of the driver in the last 3 years (e.g. 0).

drivers_accident integer(2)

Accident record(s) of the driver in the last 3 years, 0 = No / 1 = Yes.

drivers_claim integer(1)

Having claims history of the driver in the last 3 years, 0 = No / 1 = Yes.
Header

api_token string(64)

Response
{ "status": 200, "datetime": "2022-03-01 17:04:10", "authorized": true, "message": "The request was successfully completed", "result": { "referral": false, "custom_code": "", "class_name": "Third-party", "client_type": "Individual Client", "is_delivery": "No", "drivers": [ { "occupation": "Logistics, Shipping, Transportation", "licence": "Full Licence", "age": "25-39", "experience": "3+", "penalty": "0", "accident": "No", "claim": "No" } ], "premiums": { "gross_premium_amt": "4810.00", "cp_discount_pct": "0.00", "cp_discount_amt": "0.00", "mib_pct": "0.00", "mib_amt": "0.00", "levy_pct": "0.1", "levy_amt": "4.81", "total_premium_amt": "4814.81", "commission_pct": "72.00", "commission_amt": "3463.20" }, "excesses": [ { "code": "tppd_excess", "description": "Third Party Property Damage", "amt": "7000.00" }, { "code": "tppd_young_driver_excess", "description": "TPPD Young Driver", "amt": "12000.00" }, { "code": "tppd_inexperienced_driver_excess", "description": "TPPD Inexperienced Driver", "amt": "12000.00" } ] } }

referral boolean

If referral is equal to `true`, that means the premiums of the quote are not certain.

custom_code string(64)

Return your custom_code.

class_name string(13)

The class name of insurance.

client_type string(18)

Description of the client type.

drivers [object]

occupation string

Description of the occupation.

age string(5)

Age range of the driver.

experience string(5)

Description of the driving experience.

penalty string(5)

A number or a range of the penalty record(s).

accident string(3)

Description of the accident record.

suspension string(3)

Description of the license suspension record.

claim string(3)

Description of the claim record.

premiums object

gross_premium_amt string

cp_discount_pct string

The percentage of client discount.

cp_discount_amt string

Amount of client discount.

mib_pct string

mib_amt string

levy_pct string

levy_amt string

total_premium_amt string

commission_pct string

commission_amt string

excesses [object]

code string(32)

A unique excess code.

description string

Description of excess.

amt string(8)

Amount of excess.