Relocates a vehicle to another yard slot and records a yard move, the same way the Relocate button does. Dwell days are not reset. Use this instead of updating the yard_slot_id of the vehicle.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not found. |
| 422 | Unprocessable entity. |
| 500 | Server crashed for some reason. |
curl "https://app.octopi.co/api/v1/vehicles/:vehicle_id/relocate.json" -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE" -d '{"yard_slot_id": 123}'
{
"message": "1 unit of Toyota Corolla has been relocated to LOT-B-12",
"merged": false,
"cargo": {
"id": 987,
"number": null,
"vin": "1HGCM82633A004352",
"quantity": 1.0,
"yard_slot": { "id": 123, "custom_name": "LOT-B-12" }
}
}
| Param name | Description |
|---|---|
|
vehicle_id required |
The Octopi ID or the VIN of the vehicle. Validations:
|
|
yard_slot_id required |
The Octopi ID of the destination yard slot. Yard slot IDs are listed by GET /yard_areas/:id. Validations:
|