ko
팀 및 차량›Add a vehicle to the fleet

Add a vehicle to the fleet

Registers a van, truck or car in the business's own fleet. Vehicles are what a confirmed job's crew travels in: at confirm, Crisphive auto-selects one vehicle for the whole crew from the lead technician's vehicles, then from unowned fleet vehicles, and blocks a vehicle already booked for an overlapping job. `name` is the only required field, so a bulk fleet import needs nothing else; brand, model, year, plate_number, current_mileage and vehicle_type (van, truck or car) can be filled in later with updateVehicle. Names and plate numbers must be unique in the business (VEHICLE_DUPLICATE_NAME / VEHICLE_DUPLICATE_PLATE). `owner_id` records who has CLAIMED the vehicle as their primary one. The owner must be a lead technician or a management role; a buddy- or float-tier profile is refused with VEHICLE_OWNER_TIER_NOT_ALLOWED, an unknown profile with VEHICLE_INVALID_OWNER. Deciding which vehicles a technician may USE is a separate relation: use replaceTechnicianVehicles for that, not this tool. Send an Idempotency-Key header (the `idempotency_key` argument over MCP) so a retried call replays the original response instead of creating a duplicate vehicle.

인수

Idempotency-Keystringheader선택
Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE.
brandstringbody선택
Manufacturer / make. Optional.
current_mileageintegerbody선택
Odometer reading. Optional; must be >= 0 when sent.
modelstringbody선택
Model name. Optional.
namestringbody필수
Vehicle display name (required). The only mandatory field — a fleet import needs nothing but names to get vehicles into the system.
owner_idstringbody선택
UUID of the technician who owns (has claimed) this vehicle. Optional. The owner must be a lead technician or a management role — a buddy- or float-tier profile is refused with VEHICLE_OWNER_TIER_NOT_ALLOWED. Assigning which vehicles a technician USES is a different relation: PUT /technicians/{id}/vehicles.
plate_numberstringbody선택
License plate. Optional.
vehicle_typeenumbody선택
yearintegerbody선택
Model year. Optional.
POST/v1/vehicles
curl -X POST "https://api.crisphive.com/v1/vehicles" \
  -H "Authorization: Bearer chsk_test_4eC8xQ9mZ2pL7Ka0rT" \
  -H "Content-Type: application/json" \
  -d '{
  "brand": "Ford",
  "current_mileage": 50000,
  "model": "Transit",
  "name": "North Van 01",
  "owner_id": "550e8400-e29b-41d4-a716-446655440000",
  "plate_number": "ABC-1234",
  "vehicle_type": "van",
  "year": 2023
}'
요청 본문
{
"brand": ,
"current_mileage": ,
"model": ,
"name": ,
"owner_id": ,
"plate_number": ,
"vehicle_type": ,
"year":
}

응답