Get Vehicle Checks By Registration

From MyMobileWorkers API
Jump to: navigation, search

Summary

Forms
URL https://:base_url/:api_path/:version/vehicleChecks/registration?api_key=YOUR_KEY&registration=REGISTRATION&start_date=DATETIME&end_date=DATETIME
Type GET
Params: api_key required
registration required
start_date
end_date
Response JSON

The Get Vehicle Checks by Registration method returns all vehicle checks for a vehicle with a registration matching the 'registration' parameter. A start_date and end_date can be specified if required.

Example response

{
    "vehicle_checks" : [
	{
                "signature": "",
                "vehicle": {
                    "registration": "TEST",
                    "model": "",
                    "deleted": false,
                    "make": "",
                    "vehicleStatus": {
                        "branchId": null,
                        "vehicleAvailable": true,
                        "statusName": "TestStatus",
                        "additionalInfo": "true",
                        "helpText": "Vehicle is OK for mobile users to use"
                    },
                    "currentMileage": 0,
                    "motExpiry": null,
                    "taxExpiry": null,
                    "lastServiceDate": null,
                    "lastInspectionDate": null,
                    "nextServiceDate": null,
                    "nextInspectionDate": null
                },
                "createdAt": "2020-02-06T11:17:17+00:00",
                "mobile_user": {
                    "username": "Test User",
                    "external_id": null,
                    "color": "A42E5A",
                    "uat": false,
                    "engineer_registration_number": null,
                    "email": "",
                    "contact_number": "",
                    "panicked": false,
                    "lastInternetConnection": null
                },
                "startMileage": 0,
                "defectNotes": null,
                "endMileage": null,
                "signee": null,
                "updatedAt": "2020-02-06T11:17:17+00:00",
                "formId": {
                    "created_at": "2020-02-06T11:17:07+00:00",
                    "name": "Test",
                    "id": 2951,
                    "notes": null,
                    "mobile_user": {
                        "username": "Test User",
                        "external_id": null,
                        "color": "A42E5A",
                        "uat": false,
                        "engineer_registration_number": null,
                        "email": "",
                        "contact_number": "",
                        "panicked": false,
                        "lastInternetConnection": null
                    },
                    "vehicle": {
                        "registration": "TEST",
                        "model": "",
                        "deleted": false,
                        "make": "",
                        "vehicleStatus": {
                            "branchId": null,
                            "vehicleAvailable": true,
                            "statusName": "TestStatus",
                            "additionalInfo": "true",
                            "helpText": "Vehicle is OK for mobile users to use"
                        },
                        "currentMileage": 0,
                        "motExpiry": null,
                        "taxExpiry": null,
                        "lastServiceDate": null,
                        "lastInspectionDate": null,
                        "nextServiceDate": null,
                        "nextInspectionDate": null
                    },
                    "updated_at": "2020-02-06T11:17:18+00:00",
                    "checklist": [
                        {
                            "created_at": "2020-02-06T11:17:14+00:00",
                            "name": "Test1",
                            "linked_uuid": "52fcadf6-bf20-4285-aecd-b077ad02cba8",
                            "checklist_questions": [
                                {
                                    "notes": null,
                                    "question": "Question1",
                                    "answer": "ANSWER1"
                                },
                                {
                                    "notes": null,
                                    "question": "Question2",
                                    "answer": null
                                }
                            ]
                        },
                        {
                            "created_at": "2020-02-06T11:17:16+00:00",
                            "name": "Test2",
                            "linked_uuid": null,
                            "checklist_questions": [
                                {
                                    "notes": null,
                                    "question": "Question3",
                                    "answer": null
                                },
                                {
                                    "notes": null,
                                    "question": "Question4",
                                    "answer": null
                                }
                            ]
                        }
                    ]
                },
                "startFuelLevel": "Test",
                "endFuelLevel": null,
                "decodedSignature": null,
                "customisation_results": []
            }
    ]
}

Example curl request

curl "https://api.mymobileworkers.com:8181/api/1/vehicleChecks/registration?api_key=YOUR_KEY&registration=TEST_REG&start_date=2015-05-07%2012:50:44&end_date=2015-06-08%2012:50:44"

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox