> 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/trailers.md).

# Trailers

## GET /trailers/

> List all trailers

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"Trailers":{"properties":{"count":{"type":"integer"},"next":{"nullable":true,"type":"string"},"previous":{"nullable":true,"type":"string"},"results":{"items":{"$ref":"#/components/schemas/Trailer"},"type":"array"}},"type":"object"},"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/":{"get":{"operationId":"listTrailers","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 trailer ids","in":"query","name":"id__in","required":false,"schema":{"type":"string"}},{"description":"Filter trailers 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 trailers","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/Trailers"}}},"description":"Get successful"}},"summary":"List all trailers","tags":["Trailers"]}}}}
````

## Create a trailer

> Adds a trailer in the requester's company fleet

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"NewTrailer":{"properties":{"remote_id":{"description":"The ID of the trailer in your system.","type":"string"},"fleet_number":{"description":"Your trailer fleet number. It has to be unique among all your trailers. 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"},"used_for_qualimat_transports":{"description":"True if the trailer can be used for Qualimat transport. This value is used to add a Qualimat logo next to the trailer in forms, in order to help the user selecting the trailer when creating a transport. The is no control on the value. You can create a Qualimat transport with a trailer 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 trailer.","items":{"$ref":"#/components/schemas/Tag"},"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"},"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/":{"post":{"description":"Adds a trailer in the requester's company fleet","operationId":"createTrailer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTrailer"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trailer"}}},"description":"Create successful"}},"summary":"Create a trailer","tags":["Trailers"]}}}}
````

## GET /trailers/{pk\_or\_remote\_id}/

> Read a trailer

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/{pk_or_remote_id}/":{"get":{"operationId":"readTrailer","parameters":[{"description":"Dashdoc `pk` or your `remote_id`. With a `remote_id`, you must add `lookup_field=remote_id` to the query parameters.","in":"path","name":"pk_or_remote_id","required":true,"schema":{"oneOf":[{"title":"pk","type":"integer"},{"title":"remote_id","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/Trailer"}}},"description":"Get successful"}},"summary":"Read a trailer","tags":["Trailers"]}}}}
````

## DELETE /trailers/{pk\_or\_remote\_id}/

> Delete a trailer

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"/trailers/{pk_or_remote_id}/":{"delete":{"operationId":"deleteTrailer","parameters":[{"description":"Dashdoc `pk` or your `remote_id`. With a `remote_id`, you must add `lookup_field=remote_id` to the query parameters.","in":"path","name":"pk_or_remote_id","required":true,"schema":{"oneOf":[{"title":"pk","type":"integer"},{"title":"remote_id","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 trailer","tags":["Trailers"]}}}}
````

## Partially update a trailer

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

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"UpdateTrailer":{"properties":{"remote_id":{"description":"The ID of the trailer in your system.","type":"string"},"fleet_number":{"description":"Your trailer fleet number. It has to be unique among all your trailers. 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"},"used_for_qualimat_transports":{"description":"True if the trailer can be used for Qualimat transport. This value is used to add a Qualimat logo next to the trailer in forms, in order to help the user selecting the trailer when creating a transport. The is no control on the value. You can create a Qualimat transport with a trailer 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 trailer.","items":{"$ref":"#/components/schemas/Tag"},"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"},"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/{pk_or_remote_id}/":{"patch":{"description":"Update information for a trailer in the requester's company fleet","operationId":"partialUpdateTrailer","parameters":[{"description":"Dashdoc `pk` or your `remote_id`. With a `remote_id`, you must add `lookup_field=remote_id` to the query parameters.","in":"path","name":"pk_or_remote_id","required":true,"schema":{"oneOf":[{"title":"pk","type":"integer"},{"title":"remote_id","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/UpdateTrailer"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trailer"}}},"description":"Get successful"}},"summary":"Partially update a trailer","tags":["Trailers"]}}}}
````

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

> A trailer 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 trailer.

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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"},"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/{pk}/unavailability/":{"post":{"description":"A trailer 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 trailer.","operationId":"createTrailerUnavailability","parameters":[{"description":"The trailer's primary key","in":"path","name":"pk","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUnavailability"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trailer"}}},"description":"Successfully created the unavailability, returns the trailer, which contains the unavailability."}},"summary":"Create an unavailability for a trailer for a given period","tags":["Trailers"]}}}}
````

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

> Delete an unavailability for a trailer

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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":{"/trailers/{pk}/unavailability/{pk_unavailability}/":{"delete":{"operationId":"deleteTrailerUnavailability","parameters":[{"description":"The trailer'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 trailer","tags":["Trailers"]}}}}
````

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

> Partially update an unavailability for a trailer

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Trailers"}],"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"},"Trailer":{"properties":{"pk":{"description":"Dashdoc's internal id","type":"number"},"original":{"description":"Ignore. Dashdoc technical data","type":"number"},"carrier":{"description":"Dashdoc's internal id of the carrier owning the trailer","type":"number"},"license_plate":{"description":"License plate number","type":"string"},"fleet_number":{"description":"Your trailer fleet number","type":"string"},"remote_id":{"description":"The ID of the trailer 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 trailer can be used for Qualimat transport (only used for visual help and warnings)","type":"boolean"},"tags":{"description":"List of tags applied to the trailer.","items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"technical_control_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":{"/trailers/{pk}/unavailability/{pk_unavailability}/":{"patch":{"operationId":"partialUpdateTrailerUnavailability","parameters":[{"description":"The trailer'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/Trailer"}}},"description":"Successfully updated the unavailability, returns the trailer, which contains the unavailability."}},"summary":"Partially update an unavailability for a trailer","tags":["Trailers"]}}}}
````
