My Vehicles

A user may view the vehicles they have previously used to get a policy.

Screenshots

User vehicles

User vehicles

API

Vehicle (List)

Request

curl -X 'GET' \
  'https://st.igate-test.co.uk/api/v1/user/vehicles/' \
  -H 'Authorization: Bearer abc123xyz...' \
  -H 'accept: application/json'

Response

  • Type: 200 OK

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "url": "https://st.igate-test.co.uk/api/v1/user/vehicles/edfe9daa-346c-4894-8417-87b081b2e97a/",
      "uuid": "edfe9daa-346c-4894-8417-87b081b2e97a",
      "created_at": "2025-01-24T09:55:45.110720Z",
      "updated_at": "2025-01-24T09:55:45.110760Z",
      "vehicle_type": 1,
      "reg_no": "kr10ygd",
      "abi_code": 16545701,
      "year_of_manufacture": 2010,
      "cc": 1242,
      "number_of_doors": 3,
      "number_of_seats": 4,
      "make": "Fiat",
      "model": "500",
      "gearbox_type_id": "002",
      "gearbox_type_name": "Manual",
      "body_type_id": "02",
      "body_type_name": "Hatchback",
      "fuel_type_id": "002",
      "fuel_type_name": "Petrol"
    },
    {
      "url": "https://st.igate-test.co.uk/api/v1/user/vehicles/09eef7c7-e1b3-4574-ab7b-2d935cf209fc/",
      "uuid": "09eef7c7-e1b3-4574-ab7b-2d935cf209fc",
      "created_at": "2025-01-24T09:55:29.111563Z",
      "updated_at": "2025-01-24T09:55:29.111607Z",
      "vehicle_type": 1,
      "reg_no": "dn64mwx",
      "abi_code": 35690462,
      "year_of_manufacture": 2014,
      "cc": 1598,
      "number_of_doors": 5,
      "number_of_seats": 5,
      "make": "Nissan",
      "model": "Juke",
      "gearbox_type_id": "002",
      "gearbox_type_name": "Manual",
      "body_type_id": "02",
      "body_type_name": "Hatchback",
      "fuel_type_id": "002",
      "fuel_type_name": "Petrol"
    }
  ]
}

Notes

  • A list of urls for individual vehicles can also be retrieved by performing a GET request to the user retrieve endpoint.

Using the above as an example, the response would be:

{
  "url": "https://st.igate-test.co.uk/api/v1/users/c0eb56f0-453a-4520-b392-75f38c6fe1d8/",
  "uuid": "c0eb56f0-453a-4520-b392-75f38c6fe1d8",
  "username": "example@gmail.com",
  "email": "example@gmail.com",
  "accepts_terms": true,
  "accepts_marketing": true,
  "profile": "https://st.igate-test.co.uk/api/v1/user/profile/cb7d3f93-ccce-48d4-bf82-4c3dcb54d6ee/",
  "address": "https://st.igate-test.co.uk/api/v1/user/address/898c6364-eaff-49bc-8ce6-7256029a81d1/",
  "vehicles": [
    "https://st.igate-test.co.uk/api/v1/user/vehicles/edfe9daa-346c-4894-8417-87b081b2e97a/",
    "https://st.igate-test.co.uk/api/v1/user/vehicles/09eef7c7-e1b3-4574-ab7b-2d935cf209fc/"
  ],
  "occupations": [
    "https://st.igate-test.co.uk/api/v1/user/occupations/70df4cea-42fe-42cf-a5fa-071af4cdab78/",
    "https://st.igate-test.co.uk/api/v1/user/occupations/1873dbb4-ccd6-4d74-b64b-cbb0fc687b35/"
  ]
}

Vehicle (Delete)

A user may delete a vehicle from their account.

Screenshot

Delete vehicle

Delete vehicle

Request

curl -X 'DELETE' \
  'https://st.igate-test.co.uk/api/v1/user/vehicles/edfe9daa-346c-4894-8417-87b081b2e97a/' \
  -H 'Authorization: Bearer abc123xyz...' \
  -H 'accept: application/json'

Response

  • Type: 204 No Content