1.0 API Reference
You can use the CarFix API in test environment, which does not affect the production data. The API key used to authenticate the request determines whether the request is production or test mode.
In order to start using our API, you will be required to register with us as developer by contacting us via email info@carfix.my.
The base URL of the CarFix API for both Production and Testing (UAT) Mode:
2.0
Authentication
Your clientusername and clientkey carry many privileges, so be sure to keep them secure! Do not share them in publicly accessible areas.
All API request must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
2.1
Get Access Token for Affiliate API
2.1.1
Request
{ "clientusername": "CARFIX-REFERRED", "clientkey": "627a1c11-0ea4-4e23-9632-10621297ffe3" }
Request Body Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | clientusername | <string> | Username provided by Carfix for each affiliate | NA |
2 | clientkey | <string> | Key provided by Carfix for each affiliate | NA |
2.1.2
Response
{ "access_token": "xxx", "token_type": "bearer", "expires_in": 215999.93749759998, "scope": "", "schema": "" }
2.2
Get Access Token for Workshop API
2.2.1
Request
{ "clientusername": "ONEWORKS-TOWING", "clientkey": "b96ed12a-91af-4049-9067-aae9793b4347" }
Request Body Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | clientusername | <string> | Refer to Appendix A to get username from company setting page | NA |
2 | clientkey | <string> | Refer to Appendix A to get key from company setting page | NA |
2.2.2
Response
{ "access_token": "xxx", "token_type": "bearer", "expires_in": 215999.93749759998, "scope": "", "schema": "" }
3.0
List of Functions for Affiliate API
3.1
Test
3.1.1
Post Request Body
- Not Required
{ "clientusername": "CARFIX-REFERRED", "clientkey": "627a1c11-0ea4-4e23-9632-10621297ffe3" }
3.2
Initial Call Centre Case
3.2.1
Post Request Body
3.2.1.1
Example
{ "CaseInfo": { "VehicleNo": "ABC1234", "CallerContactNo": "60123456789", "Name": "Wong Wai Yan" }, "IncidentLocation": "70300 SEREMBAN, NEGERI SEMBILAN, MALAYSIA", "LocationCoordinate": "2.725889,101.9378239", }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | VehicleNo | <string(30)> | NA | |
2 | CallerContactNo | <string(30)> | Format: {60+ Example: 60123456789 |
NA |
3 | Name | <string(200)> | Insured Name | NA |
4 | IncidentLocation | <varchar(300)> | NA | |
5 | LocationCoordinate | <string,string> | NA |
3.2.1.2
Response
{ "CaseID": "*******", "Message": "Case Created Successfully", "Result": true }
3.3
Create Case
3.3.1
Post Request Body
3.3.1.1
Example
{ "CaseInfo": { "VehicleNo": "ABC1234", "NatureOfCall": "*******", "ServiceNeeded": "*******", "Make": "PERODUA", "Model": "PERODUA MYVI 1.3EZ1", "Type": "Manual", "CallerName": "Lana", "CallerContactNo": "60123456789", "InsuredEmail": "lana@gmail.com" }, "ServiceInfo": { "BreakDownCause": "*******", "IsLowered": true, "SteeringCantTurn": true, "GearCantMove": false, "HandBreakCantRelease": false, "BasementORRoofTop": false, "IsCarBlocking": false, "IsSpareTyreGoodCondition": false, "IsSpecialToolsAndNutAvailable": false, "TyrePuncture": 3 }, "IncidentLocation": "70300 SEREMBAN, NEGERI SEMBILAN, MALAYSIA", "LocationCoordinate": "2.725889,101.9378239", "LocationState": "NEGERI SEMBILAN", "LocationArea": "SEREMBAN", "PanelWorkshopName": "WORKSHOP A", "WorkshopName": "", "TowDestination": "70300 SEEMBAN", "TowDestinationCoordinate": "2.725889,101.9378239", "TowDestinationState": "NEGERI SEMBILAN", "TowDestinationArea": "SEREMBAN" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | VehicleNo | <string(30)> | NA | |
2 | NatureOfCall | <string> | NA | |
3 | ServiceNeeded | <string> | NA | |
4 | Make | <string(50)> | NA | |
5 | Model | <string(200)> | NA | |
6 | Type | <string(100)> | NA | |
7 | CallerName | <string(100)> | NA | |
8 | CallerContactNo | <string(50)> | Format: {60+ Example: 60123456789 |
NA |
9 | InsuredEmail | <string(100)> | NA | |
10 | BreakDownCause | <string> | 3.15 Get Breakdown Causes | |
11 | IsLowered | <bool> | NA | |
12 | SteeringCantTurn | <bool> | NA | |
13 | GearCantMove | <bool> | NA | |
14 | HandBreakCantRelease | <bool> | NA | |
15 | BasementORRoofTop | <bool> | NA | |
16 | IsCarBlocking | <bool> | NA | |
17 | IsSpareTyreGoodCondition | <bool> | NA | |
18 | IsSpecialToolsAndNutAvailable | <bool> | NA | |
19 | TyrePuncture | <int> | Uses the label return from api | 3.14 Get Type of Punctures |
20 | IncidentLocation | <varchar(300)> | NA | |
21 | LocationCoordinate | <string,string> | NA | |
22 | LocationState | <string> | Uses the label return from api | 3.10 Get States |
23 | LocationArea | <string> | Uses the label return from api | 3.11 Get Areas |
24 | PanelWorkshopName | <varchar(300)> | NA | |
25 | WorkshopName | <varchar(300)> | [Optional]. If Panel workshop name is provided, this field left blank. | NA |
26 | TowDestination | <varchar(300)> | NA | |
27 | TowDestinationCoordinate | <string,string> | NA | |
28 | TowDestinationState | <string> | Uses the label return from api | 3.10 Get States |
29 | TowDestinationArea | <string> | Uses the label return from api | 3.11 Get Areas |
3.3.1.2
Response
{ "CaseID": "*******", "Message": "Case Created Successfully", "Result": true }
3.4
Get Case Details
3.4.1
Post Request Body
3.4.1.1
Example
{ "CaseID": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | CaseID | <string> | CaseID of created case in Carfix | 3.2 Create Case |
3.4.1.2
Response
{ "VehicleNo": "ABC1234", "CaseStatus": "Open", "CreatedDate": "2023-03-13T14:56:18.67", "TruckNo": null, "TruckLatitude": null, "TruckLongitude": null, "ArrivedTime": "2023-03-13T15:26:18.61", "IncidentLocation": "70300 SEREMBAN, NEGERI SEMBILAN, MALAYSIA", "LocationCoordinate": "2.72588900, 101.93782390", "TowDestination": "70300 SEEMBAN", "TowDestinationCoordinate": "2.72588900, 101.93782390", "CoverByUs": null, "PayableByInsured": null, "DriverName": null, "ImageUrl": "", "ServiceNeeded": "Towing - Tow Truck A", "InsuranceName": "CARFIX REFERRED", "InsImageURL": "", "PolicyDue": "Inactive", "ServiceConfirmedDate": null, "TruckAssignedDate": null, "CaseResolvedDate": null, "CaseClosedDate": null, "data": [] }
3.5
Update Case Resolved
3.5.1
Post Request Body
3.5.1.1
Example
{ "CaseID": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | CaseID | <string> | CaseID of created case in Carfix | 3.2 Create Case |
3.5.1.2
Response
{ "Result": true }
3.6
Update Caller Satisfaction Rating
3.6.1
Post Request Body
3.6.1.1
Example
{ "CaseID": "*******", "CustomerSatisfactionID": 3, "CustomerRemarks": "Service Is Good" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | CaseID | <string> | CaseID of created case in Carfix | 3.2 Create Case |
2 | CustomerSatisfactionID | int | Rating for service satisfaction from 0,1,2,3,4,5 | NA |
3 | CustomerRemarks | <varchar(200)> | Customer feedback in text form | NA |
3.6.1.2
Response
{ "Result": true }
3.7
Update Arrival Time
3.7.1
Post Request Body
3.7.1.1
Example
{ "CaseID": "*******", "ArrivalDateTime": "2012-07-23T18:25:43.511Z" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | CaseID | <string> | CaseID of created case in Carfix | 3.2 Create Case |
2 | ArrivalDateTime | Datetime | Datetime format for update arrival time of provider | NA |
3.7.1.2
Response
{ Result": true }
3.8
Update Incident Photos
3.8.1
Post Request Body
3.8.1.1
Example
{ "CaseID": "*******", "images": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAA ... QdBo7SnBcuR3RKs//2Q==", }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | CaseID | <string> | CaseID of created case in Carfix | 3.2 Create Case |
2 | images | <string> | List of images (.jpg). Base-64 encode string of the image. | NA |
3.9
Get List of Workshop
3.9.1
Post Request Body
3.9.1.1
Example
{ "Area": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | Area | <string> | Uses the id return from api | 3.12 Get Areas |
3.9.1.2
Response
[ { "id": "*******", "label": "AAM CARFIX SDN BHD" } ]
3.10
Get List of RSA Workshop
3.10.1
Post Request Body
3.10.1.1
Example
{ "Area": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | Area | <string> | Uses the id return from api | 3.12 Get Areas |
3.10.1.2
Response
[ { "id": "*******", "label": "LIM TRANSPORT ENTERPRISE" } ]
3.11
Get Car Makes
3.11.1
Post Request Body
- Not Required
3.11.2
Response
[ { "label": "ALFA ROMEO" }, { "label": "APRILIA" }, { "label": "AUDI" }, ]
3.12
Get States
3.12.1
Post Request Body
- Not Required
3.12.2
Response
[ { "id": "*******", "label": "Johor" }, { "id": "*******", "label": "Kedah" }, { "id": "*******", "label": "Kelantan" }, ]
3.13
Get Areas
3.13.1
Post Request Body
3.13.1.1
Example
{ "State": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | State | <string> | Uses the id return from api | 3.10 Get States |
3.13.1.2
Response
[ { "id": "*******", "label": "BATU PAHAT" }, { "id": "*******", "label": "BUKIT INDAH" }, { "id": "*******", "label": "DESARU" } ]
3.14
Get Nature of Calls
3.14.1
Post Request Body
- Not Required
3.14.2
Response
[ { "id": "*******", "label": "Accident" }, { "id": "*******", "label": "Breakdown" }, { "id": "*******", "label": "Extended Warranty" }, { "id": "*******", "label": "General Enquiry" }, { "id": "*******", "label": "Others" } ]
3.15
Get Service Needed
3.15.1
Post Request Body
3.15.1.1
Example
{ "NatureOfCall": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | NatureOfCall | <string> | Uses the id return from api | 3.13 Get Nature of Calls |
3.15.1.2
Response
[ { "id": "*******", "label": "Towing - Tow Truck A" }, { "id": "*******", "label": "Towing - Vehicle Carrier A" } ]
3.16
Get Type of Punctures
3.16.1
Post Request Body
- Not Required
3.16.2
Response
[ { "id": 1, "label": "Front Left" }, { "id": 2, "label": "Front Right" }, { "id": 4, "label": "Rear Left" }, { "id": 8, "label": "Rear Right" } ]
3.17
Get Breakdown Causes
3.17.1
Post Request Body
- Not Required
3.17.2
Response
[ { "id": "*******", "label": "Electrical Fault" }, { "id": "*******", "label": "Engine Problem" }, { "id": "*******", "label": "Flat Battery" }, { "id": "*******", "label": "Flat Tyre" }, { "id": "*******", "label": "Flood" }, { "id": "*******", "label": "Overheat" }, { "id": "*******", "label": "Transmission Problem" }, { "id": "*******", "label": "Unable To Start" }, { "id": "*******", "label": "Unknown" } ]
3.18
Get Truck Coordination
3.18.1
Post Request Body
3.18.1.1
Example
{ "TruckNo": "ABC1234", "CaseID": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | TruckNo | <string> | TruckNo of truck driver | NA |
2 | UserCode | <string> | Usercode of tow driver | NA |
3.18.1.2
Response
{ "items": [ { "TruckNo": "ABC1234", "Status": "ACTIVE", "Online": "Offline", "CurrentDriver": null, "LastUpdateTime": "17/02/2024 01:58:16 PM", "Latitude": null, "Longitude": null }, ] }
3.19
Cancel Case
3.19.1
Post Request Body
3.19.1.1
Example
{ "Key": "*******", "IsCheckOnly": "false" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | Key | <string> | Key of the case | NA |
2 | IsCheckOnly | <string> | Is for checking purpose only | NA |
3.19.1.2
Response
{ "Result": "Yes", "CaseStatus": "Cancelled", "CancellationCharges": 0.00, "ErrorMessage": "" }
3.20
Get Case Status
3.20.1
Post Request Body
3.20.1.1
Example
{ "Key": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | Key | <string> | Key of the case | NA |
3.20.1.2
Response
{ "Result": "Yes", "CaseStatus": [ "Open", "WorkInProgress", "CaseResolved", "Closed", "Cancelled" ] }
3.21
Get List of Cases
3.21.1
Post Request Body
3.21.1.1
Example
{ "VehicleNumber": "*******", "CreatedFromDate": "*******", "CreatedToDate": "*******" }
Definition
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | VehicleNumber | <string(30)> | Filter by case vehicle number | NA |
2 | CreatedFromDate | <string> | Filter by case created date, date format as yyyy-MM-dd HH:mm:ss | NA |
3 | CreatedToDate | <string> | Filter by case created date, date format as yyyy-MM-dd HH:mm:ss | NA |
3.21.1.2
Response
[ { "ReferenceNo": "xxxxxx-xxx-xxxxx", "CaseID": "*******", "CreatedDate": "2023-10-02T14:31:28.673" }, { "ReferenceNo": "xxxxxx-xxx-xxxxx", "CaseID": "*******", "CreatedDate": "2023-10-02T14:53:14.37" }, { "ReferenceNo": "xxxxxx-xxx-xxxxx", "CaseID": "*******", "CreatedDate": "2023-10-02T15:38:17.317" } ]
3.22
Get Incident Photos
3.22.1
Post Request Body
- Not Required
3.22.2
Response
[ { "CaseID": "*******", "Images": [ { "FileName": "fileName.jpg", "Base64String": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAA ... QdBo7SnBcuR3RKs//2Q==" } ] }, ]
4.0
List of Functions for Workshop API
4.1
GetTrucks
4.1.1
Request
Request Header
Request Body
- Not Required
4.1.2
Response
{ "items": [ { "TruckNo": "ABC1234", "Status": "ACTIVE", "Online": "Offline", "CurrentDriver": “Ali”, "LastUpdateTime": "18/03/2021 01:44:10 PM", "Latitude": 3.08983780, "Longitude": 101.68929460 } ] }
4.2
GetDrivers
4.2.1
Request
Request Header
Request Body
- Not Required
4.2.2
Response
{ "items": [ { "Name": "Ali", "IsLeader": "NO", "UserCode": "123456", "PhoneNo": "0123456789", "Status": "ACTIVE" } ] }
4.3
Update Truck Coordinate
4.3.1
Request
Request Header
Request Body
{ "IMEI": "123456789012345", "TruckNo": "ABC1234", "Latitude": 3.19746700 "Longitude": 101.71457700 }
4.3.2
Response
{ "IMEI": "123456789012345", "TruckNo": "ABC1234", "Status": "ACTIVE", "Online": "Offline", "CurrentDriver": null, "LastUpdateTime": "22/07/2022 11:23:11 AM", "Latitude": 3.19746700, "Longitude": 101.71457700 }
4.4
Get Claims
4.4.1
Request
Request Header
Request Parameter
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | accidentFromDate | date | Example: YYYY-MM-DD | NA |
2 | accidentToDate | date | Example: YYYY-MM-DD | NA |
Request Body
- Not required
4.4.2
Response
{ "items": [ { "key": "*******", "ClaimType": "OD Notification", "VehicleNo": "ABC1234", "AccidentDate": "2022-09-03T08:27:11.313", "InsuredName": "Ali", "MakeModel": "MAZDA CX30", "Insurer": "CARFIX REFERRED", "ClaimStatus": "Unsubmitted" } ] }
4.5
Get Claim Detail
4.5.1
Request
Request Header
Request Parameter
# | Key | Value Type | Description | API to obtain value |
---|---|---|---|---|
1 | key | <string> | 4.4 Get Claims |
Request Body
- Not required
4.5.2
Response
{ "ClaimDetail": { "InCompanyName": "Insurance BHD", "CarRegNo": "ABC1234", "AccidentDate": "2022-08-22T14:24:00", "AccidentPlace": "58200 Kuala Lumpur, KL, Malaysia", "PolicyNo": "PN123", "PolicyCover": "", "ClaimType": "Own Damage", "Make": "BMW", "Model": "1-Series 2013 On", "VehYear": null, "EngineNo": null, "ChassisNo": null, "InsuredName": "Ali", "InsuredEmail": "ali@mail.com", "DriverName": "Ali" }, "EstimateDetail": { "Parts": 1550.00, "Labour": 0.00, "PaintworkLabour": 0.00, "PaintMaterials": 0.0, "Towing": 0.0, "Miscellenous": 0.00, "Total": 1550.00, "EstimateParts": [ { "Description": "*BONNET", "PartNo": null, "Src": 1, "Qty": 1, "Price": "*1,000.00", "Disc": 0.00, "Btmt": 0.00, "Total": "1,000.00F" }, { "Description": "*Fender RH", "PartNo": null, "Src": 1, "Qty": 1, "Price": "*250.00", "Disc": 0.00, "Btmt": 0.00, "Total": "250.00F" }, { "Description": "*Fender LH", "PartNo": null, "Src": 1, "Qty": 1, "Price": "*300.00", "Disc": 0.00, "Btmt": 0.00, "Total": "300.00F" } ], "EstimateMiscellaneous": [], "EstimateLabours": [ { "Description": "Bonnet", "Src": "T", "MET": "0.60", "Panel": "0.40", "Paint": "6.10", "CP": "0.40", "Other": "", "Total": 7.50 }, { "Description": "Fender Front LH", "Src": "T", "MET": "1.20", "Panel": "0.50", "Paint": "6.30", "CP": "0.40", "Other": "", "Total": 8.40 }, { "Description": "Fender Front RH", "Src": "T", "MET": "1.20", "Panel": "0.50", "Paint": "6.30", "CP": "0.40", "Other": "", "Total": 8.40 } ] } }
Appendix
A
API Information in Company Setting Page
The API information is located at Company Setting page, the following settings are available:
API | Key | Value |
---|---|---|
Workshop API | clientusername | Refer to API Username in API Login Information |
clientkey | Refer to API Password in API Login Information |
From the Section API Login Information, API Username and API Password can be generated by clicking the button ‘Generate Username & Password’. All current API connection will be disconnected if credentials are re-generated.