> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/backend/move-backend/move-vehicle-api.md).

# Move Vehicle API

Manage vehicles and their associated hardware devices in the MOVE SDK. This includes creating, editing, deleting vehicles and managing device assignments like Bluetooth or Beacon hardware.

***

### Create Vehicle

**Endpoint**

```http
POST /v20/vehicle
```

**Description**\
Create a new vehicle in the specified project.

#### Query Parameters

* `projectId` (string, required): Project to which the vehicle is assigned

#### Headers

* `Authorization` (string, required): Bearer JWT

#### Request Body

```json
{
  "name": "Fleet Car A",
  "props": {
    "color": "white",
    "plate": "ABC-1234"
  }
}
```

#### Response

```json
{
  "id": "a4e9bc28-1234-4b79-b60f-d8db49fc63b9",
  "name": "Fleet Car A",
  "props": {
    "color": "white",
    "plate": "ABC-1234"
  },
  "devices": []
}
```

***

### Get Vehicle

**Endpoint**

```http
GET /v20/vehicle/{vehicleId}
```

**Description**\
Retrieve details for a vehicle by its UUID.

#### Path Parameters

* `vehicleId` (string, required): UUID of the vehicle

#### Query Parameters

* `projectId` (string, required)

#### Headers

* `Authorization` (string, required)

#### Response

```json
{
  "id": "a4e9bc28-1234-4b79-b60f-d8db49fc63b9",
  "name": "Fleet Car A",
  "props": {
    "color": "white"
  },
  "devices": [
    {
      "deviceId": "bt-001",
      "type": "BT"
    }
  ]
}
```

***

### Edit Vehicle

**Endpoint**

```http
POST /v20/vehicle/{vehicleId}
```

**Description**\
Update the metadata of a vehicle (not its devices).

#### Path Parameters

* `vehicleId` (string, required): UUID

#### Query Parameters

* `projectId` (string, required)

#### Request Body

```json
{
  "name": "Fleet Car B",
  "props": {
    "color": "black"
  }
}
```

#### Response

```json
{
  "id": "a4e9bc28-1234-4b79-b60f-d8db49fc63b9",
  "name": "Fleet Car B",
  "props": {
    "color": "black"
  }
}
```

***

### Delete Vehicle

**Endpoint**

```http
DELETE /v20/vehicle/{vehicleId}
```

**Description**\
Deletes a vehicle and all related data. **This action is irreversible.**

#### Path Parameters

* `vehicleId` (string, required): UUID

#### Query Parameters

* `projectId` (string, required)

#### Headers

* `Authorization` (string, required)

**Response**

Http Response Code: 201

***

### Add / Update Vehicle Devices

**Endpoint**

```http
POST /v20/vehicle/{vehicleId}/device
```

**Description**\
Assign or update hardware devices for the vehicle. This can be either Bluetooth (BT) or Beacon (BEACON) devices.

#### Allowed `type` values:

* `BT`
* `BEACON`

#### Path Parameters

* `vehicleId` (string, required): UUID

#### Query Parameters

* `projectId` (string, required)

#### Headers

* `Authorization` (string, required)

#### Request Body

BEACON: uuid, major and minor&#x20;

BT: only Device Id

```json
{
  "name": "Beacon Front Seat",
  "type": "BEACON",
  "uuid": "c1f85fd9-f1f2-43a1-9094-feb872d2cb13",
  "major": 123,
  "minor": 456
}
```

#### Response

```json
{
  "id": "a4e9bc28-1234-4b79-b60f-d8db49fc63b9",
  "devices": [
    {
      "deviceId": "beacon-42",
      "type": "BEACON"
    }
  ]
}
```

***

### Remove Device

**Endpoint**

```http
DELETE /v20/vehicle/{vehicleId}/device
```

**Description**\
Unassigns a specific device from the vehicle.

#### Query Parameters

* `projectId` (string, required)
* `device` (string, required): ID of the device to remove

#### Path Parameters

* `vehicleId` (string, required): UUID

#### Headers

* `Authorization` (string, required)

#### Response

Returns vehicle without deleted device

```json
{
  "id": "a4e9bc28-1234-4b79-b60f-d8db49fc63b9",
  "name": "Fleet Car B",
  "props": {
    "color": "black"
  },
  "devices": [
     {
      "type": "BT",
      "deviceId": "2B:BB:3D:BA:42:92-tsco",
      "qualifier": "1000:mmue1:BT:2B:BB:3D:BA:42:92-tsco", // used internally 
      "userId": "mmue1"
    }
  ]
}
```
