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

# Vehicles

## GET /vehicles/

> List all vehicles

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Vehicles":{"properties":{"count":{"type":"integer"},"next":{"nullable":true,"type":"string"},"previous":{"nullable":true,"type":"string"},"results":{"items":{"$ref":"#/components/schemas/Vehicle"},"type":"array"}},"type":"object"},"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/":{"get":{"operationId":"listVehicles","parameters":[{"description":"A page number within the paginated result set.","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Search by license plate or fleet number","in":"query","name":"text","required":false,"schema":{"type":"string"}},{"description":"Comma separated list of vehicle ids","in":"query","name":"id__in","required":false,"schema":{"type":"string"}},{"description":"Filter vehicles with or without a license plate","in":"query","name":"has_license_plate","required":false,"schema":{"type":"boolean"}},{"description":"Comma separated list of tag ids","in":"query","name":"tags__in","required":false,"schema":{"type":"string"}},{"description":"Filter own fleet or dedicated vehicles","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Carrier id to filter on","in":"query","name":"carrier","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicles"}}},"description":"Get successful"}},"summary":"List all vehicles","tags":["Vehicles"]}}}}
````

## Create a vehicle

> Adds a vehicle in the requester's company fleet

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"NewVehicle":{"properties":{"remote_id":{"description":"The ID of the vehicle in your system.","type":"string"},"fleet_number":{"description":"Your vehicle fleet number. It has to be unique among all your vehicles. When filled, fleet number will be displayed in the web and mobile app next to license plate number. It can also be used for searches.","maxLength":10,"type":"string"},"license_plate":{"description":"License plate number (has to be unique)","maxLength":200,"type":"string"},"category":{"$ref":"#/components/schemas/vehicle_category"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for vehicle that can handle a load without trailer). This value is used to add a Qualimat logo next to the vehicle in forms, in order to help the user selecting the vehicle when creating a transport. The is no control on the value. You can create a Qualimat transport with a vehicle that is not flagged for Qualimat. In this case a warning is displayed in the transport detail.","type":"boolean"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"telematic_data_source":{"description":"The telematic where the vehicle is refered","enum":["alertgasoil","astrata","addsecure","dashdoc","eliott","fleetboard","geodynamics","geotracer","geotab","koovea","mappingcontrol","mapandtruck","masternaut","qeos","quartix","rio","scania","sudtelematique","transics","trimble","truckonline","vehizen","volvo","webfleet","strada","verizon","mapon","bump","samsara","samsara_mapandtruck","webeye","pass_tracabilite","bizztrack","aktkc_etransportas_mapandtruck","anima_mapandtruck","arvento_mapandtruck","as24_mapandtruck","axxess_mapandtruck","bornemann_infleet_mapandtruck","bpw_mapandtruck","cartrack_mapandtruck","commander_services_mapandtruck","dkv_mapandtruck","easytrack_mapandtruck","ecofleet_mapandtruck","edrive_mapandtruck","effitrailer_mapandtruck","ekolis_mapandtruck","fleetgo_mapandtruck","fleethand_mapandtruck","fleetmaster_mapandtruck","framelogic_mapandtruck","frotcom_mapandtruck","geotab_mapandtruck","gestracking_mapandtruck","globaltrack_mapandtruck","goodyear_france_mapandtruck","gps_mobile_mapandtruck","icell_mapandtruck","ims_telematics_mapandtruck","inelo_mapandtruck","infis_mapandtruck","jaltest_mapandtruck","k2gps_mapandtruck","keeptrace_mapandtruck","konsalnet_mapandtruck","krone_telematic_mapandtruck","legal_telematics_mapandtruck","linqo_mapandtruck","localizare_mapandtruck","locationsolutions_mapandtruck","loctracker_mapandtruck","mecomo_mapandtruck","microlise_mapandtruck","mix_telematics_mapandtruck","movertis_mapandtruck","movildata_mapandtruck","mtrack_mapandtruck","n2mobil_mapandtruck","naocom_mapandtruck","navifleet_mapandtruck","nexus_mapandtruck","ocean_mapandtruck","optifleet_mapandtruck","optimo_gps_mapandtruck","orbcomm_mapandtruck","orbcomm_africa_mapandtruck","pulsit_electronics_mapandtruck","quake_tracking_mapandtruck","riverlong_mapandtruck","sas_fleet_mapandtruck","satko_mapandtruck","schmitz_cargobull_mapandtruck","seyir_mobil_mapandtruck","skywatch_mapandtruck","solustop_mapandtruck","spedion_mapandtruck","speedtelematics_mapandtruck","starcom_mapandtruck","telepass_mapandtruck","terramar_networks_mapandtruck","tracker_mapandtruck","trackit_mapandtruck","tracknamic_mapandtruck","trendfire_mapandtruck","v3_smart_technologies_mapandtruck","vektor_teknoloji_mapandtruck","viafleet_mapandtruck","viasat_mapandtruck","visirun_mapandtruck","waynet_mapandtruck","wayzz_mapandtruck","webdispecink_mapandtruck"],"type":"string"},"vendor_id":{"description":"ID of the vehicle in the telematics system","type":"string"}},"type":"object"},"vehicle_category":{"description":"Vehicle category","enum":["unknown","light","straight","straight_tipper","tipper","tipper_cereal","tipper_construction","refrigerated","isotherm","platform","curtainsider","box_body","trailer_truck","flatbed","low_flatbed","log","coil","container","vehicle","heavy_equipment","solid_tanker","petrol_tanker","chemical_tanker","food_tanker","livestock","special_convoy"],"maxLength":200,"type":"string"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/":{"post":{"description":"Adds a vehicle in the requester's company fleet","operationId":"createVehicle","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewVehicle"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Create successful"}},"summary":"Create a vehicle","tags":["Vehicles"]}}}}
````

## GET /vehicles/{pk}/

> Read a vehicle

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/{pk}/":{"get":{"operationId":"readVehicle","parameters":[{"in":"path","name":"pk","required":true,"schema":{"type":"number"}},{"description":"If you choose to identify an object with its `remote_id` instead of its `pk` then \n\n* replace the `pk` value with the `remote_id` value in the URL \n\n* specify `lookup_field=remote_id` in the query parameters","in":"path","name":"remote_id","required":false,"schema":{"type":"string"}},{"description":"Used to specify what field is used in the URL to identify the object you're requesting, e.g. with the `remote_id` (see path parameters)","in":"query","name":"lookup_field","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Get successful"}},"summary":"Read a vehicle","tags":["Vehicles"]}}}}
````

## DELETE /vehicles/{pk}/

> Delete a vehicle

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}}},"paths":{"/vehicles/{pk}/":{"delete":{"operationId":"deleteVehicle","parameters":[{"in":"path","name":"pk","required":true,"schema":{"type":"number"}},{"description":"If you choose to identify an object with its `remote_id` instead of its `pk` then \n\n* replace the `pk` value with the `remote_id` value in the URL \n\n* specify `lookup_field=remote_id` in the query parameters","in":"path","name":"remote_id","required":false,"schema":{"type":"string"}},{"description":"Used to specify what field is used in the URL to identify the object you're requesting, e.g. with the `remote_id` (see path parameters)","in":"query","name":"lookup_field","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Empty body"}},"summary":"Delete a vehicle","tags":["Vehicles"]}}}}
````

## Partially update a vehicle

> Update information for a vehicle in the requester's company fleet

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"UpdateVehicle":{"properties":{"remote_id":{"description":"The ID of the vehicle in your system.","type":"string"},"fleet_number":{"description":"Your vehicle fleet number. It has to be unique among all your vehicles. When filled, fleet number will be displayed in the web and mobile app next to license plate number. It can also be used for searches.","maxLength":10,"type":"string"},"license_plate":{"description":"License plate number","maxLength":200,"type":"string"},"category":{"$ref":"#/components/schemas/vehicle_category"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for vehicle that can handle a load without trailer). This value is used to add a Qualimat logo next to the vehicle in forms, in order to help the user selecting the vehicle when creating a transport. The is no control on the value. You can create a Qualimat transport with a vehicle that is not flagged for Qualimat. In this case a warning is displayed in the transport detail.","type":"boolean"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"}},"type":"object"},"vehicle_category":{"description":"Vehicle category","enum":["unknown","light","straight","straight_tipper","tipper","tipper_cereal","tipper_construction","refrigerated","isotherm","platform","curtainsider","box_body","trailer_truck","flatbed","low_flatbed","log","coil","container","vehicle","heavy_equipment","solid_tanker","petrol_tanker","chemical_tanker","food_tanker","livestock","special_convoy"],"maxLength":200,"type":"string"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/{pk}/":{"patch":{"description":"Update information for a vehicle in the requester's company fleet","operationId":"partialUpdateVehicle","parameters":[{"in":"path","name":"pk","required":true,"schema":{"type":"number"}},{"description":"If you choose to identify an object with its `remote_id` instead of its `pk` then \n\n* replace the `pk` value with the `remote_id` value in the URL \n\n* specify `lookup_field=remote_id` in the query parameters","in":"path","name":"remote_id","required":false,"schema":{"type":"string"}},{"description":"Used to specify what field is used in the URL to identify the object you're requesting, e.g. with the `remote_id` (see path parameters)","in":"query","name":"lookup_field","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVehicle"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Get successful"}},"summary":"Partially update a vehicle","tags":["Vehicles"]}}}}
````

## Create an unavailability for a vehicle for a given period

> A vehicle can be marked as unavailable for a given period of time for various reasons. These unavailabilities are marked on the planning or can be accessed by API by fetching the vehicle.

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"CreateUnavailability":{"properties":{"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"},"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/{pk}/unavailability/":{"post":{"description":"A vehicle can be marked as unavailable for a given period of time for various reasons. These unavailabilities are marked on the planning or can be accessed by API by fetching the vehicle.","operationId":"createVehicleUnavailability","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUnavailability"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Successfully created the unavailability, returns the vehicle, which contains the unavailability."}},"summary":"Create an unavailability for a vehicle for a given period","tags":["Vehicles"]}}}}
````

## DELETE /vehicles/{pk}/unavailability/{pk\_unavailability}/

> Delete an unavailability for a vehicle

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}}},"paths":{"/vehicles/{pk}/unavailability/{pk_unavailability}/":{"delete":{"operationId":"deleteVehicleUnavailability","parameters":[{"description":"The vehicle's primary key","in":"path","name":"pk","required":true,"schema":{"type":"number"}},{"description":"The unavailability's primary key","in":"path","name":"pk_unavailability","required":true,"schema":{"type":"number"}}],"responses":{"204":{"description":"Empty body"}},"summary":"Delete an unavailability for a vehicle","tags":["Vehicles"]}}}}
````

## PATCH /vehicles/{pk}/unavailability/{pk\_unavailability}/

> Partially update an unavailability for a vehicle

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Vehicles"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"UpdateUnavailability":{"properties":{"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"},"Vehicle":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the vehicle","type":"number"},"category":{"description":"Vehicle category","type":"string"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your vehicle fleet number","type":"string"},"remote_id":{"description":"The ID of the vehicle in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"used_for_qualimat_transports":{"description":"True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"telematic_vehicle":{"description":"Ignore. Dashdoc technical data","type":"number"},"original":{"type":"number"},"tags":{"description":"List of tags applied to the vehicle.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_deadline":{"format":"date-time","type":"string"},"tachograph_deadline":{"format":"date-time","type":"string"},"speed_limiter_deadline":{"format":"date-time","type":"string"},"country":{"$ref":"#/components/schemas/country"},"unavailability":{"description":"List of unavailable period","items":{"$ref":"#/components/schemas/Unavailability"},"type":"array"},"events":{"description":"Ignore. Dashdoc technical data.","items":{"type":"object"},"type":"array"}},"type":"object"},"Tag":{"properties":{"pk":{"description":"The unique identifier of the tag","type":"integer"},"name":{"description":"The name of the tag","type":"string"},"color":{"description":"The color of the tag in hex format","type":"string"},"tag_group_id":{"description":"The ID of the tag group this tag belongs to, if any","nullable":true,"type":"integer"}},"required":["color","name","pk"],"type":"object"},"country":{"description":"Only the 2-character codification is accepted (ISO 3166-1 alpha-2)","type":"string"},"Unavailability":{"properties":{"id":{"description":"Dashdoc's internal id","type":"number"},"remote_id":{"description":"The ID of the unavailability in your system","type":"string"},"created":{"description":"Date of creation on our server","format":"date-time","type":"string"},"start_date":{"description":"Start date of the unavailability","format":"date-time","type":"string"},"end_date":{"description":"End date of the unavailability","format":"date-time","type":"string"},"unavailability_type":{"description":"Type of unavailability","enum":["paid_vacation","day_off","sick_leave","training","vacation","maintenance","rental","other"],"type":"string"},"unavailability_note":{"description":"Notes about the unavailability","type":"string"}},"type":"object"}}},"paths":{"/vehicles/{pk}/unavailability/{pk_unavailability}/":{"patch":{"operationId":"partialUpdateVehicleUnavailability","parameters":[{"description":"The vehicle's primary key","in":"path","name":"pk","required":true,"schema":{"type":"number"}},{"description":"The unavailability's primary key","in":"path","name":"pk_unavailability","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUnavailability"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Successfully updated the unavailability, returns the vehicle, which contains the unavailability."}},"summary":"Partially update an unavailability for a vehicle","tags":["Vehicles"]}}}}
````
