Unavailability

Create an unavailability for a trailer for a given period

post

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.

Authorizations
Body
remote_idstringOptional

The ID of the unavailability in your system

Example: tr123type1
createdstring · date-timeOptional

Date of creation on our server

Example: 2020-07-30T21:10:06.44551Z
start_datestring · date-timeOptional

Start date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
end_datestring · date-timeOptional

End date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
unavailability_typestring · enumOptional

Type of unavailability

Possible values:
unavailability_notestringOptional

Notes about the unavailability

Example: I'm on vacation
Responses
201
Successfully created the unavailability, returns the trailer, which contains the unavailability.
application/json
post
POST /api/v4/trailers/{pk}/unavailability/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225

{
  "remote_id": "tr123type1",
  "created": "2020-07-30T21:10:06.44551Z",
  "start_date": "2020-07-30T21:10:06.44551Z",
  "end_date": "2020-07-30T21:10:06.44551Z",
  "unavailability_type": "paid_vacation",
  "unavailability_note": "I'm on vacation"
}
201

Successfully created the unavailability, returns the trailer, which contains the unavailability.

{
  "pk": 928,
  "original": 1,
  "carrier": 928,
  "license_plate": "WE749RM",
  "fleet_number": "TRAILER120",
  "remote_id": "tr123type1",
  "created": "2020-07-30T21:10:06.44551Z",
  "used_for_qualimat_transports": true,
  "tags": [
    {
      "pk": 23498,
      "name": "Remorque"
    }
  ],
  "technical_control_deadline": "2020-12-22T15:31:39.26167Z",
  "country": "FR",
  "unavailability": [
    {
      "id": 928,
      "remote_id": "tr123type1",
      "created": "2020-07-30T21:10:06.44551Z",
      "start_date": "2020-07-30T21:10:06.44551Z",
      "end_date": "2020-07-30T21:10:06.44551Z",
      "unavailability_type": "paid_vacation",
      "unavailability_note": "I'm on vacation"
    }
  ],
  "events": [
    {}
  ]
}

Delete an unavailability for a trailer

delete
Authorizations
Path parameters
pknumberRequired

The trailer's primary key

pk_unavailabilitynumberRequired

The unavailability's primary key

Responses
204
Empty body
delete
DELETE /api/v4/trailers/{pk}/unavailability/{pk_unavailability}/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Accept: */*
204

Empty body

No content

Partially update an unavailability for a trailer

patch
Authorizations
Path parameters
pknumberRequired

The trailer's primary key

pk_unavailabilitynumberRequired

The unavailability's primary key

Body
remote_idstringOptional

The ID of the unavailability in your system

Example: tr123type1
createdstring · date-timeOptional

Date of creation on our server

Example: 2020-07-30T21:10:06.44551Z
start_datestring · date-timeOptional

Start date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
end_datestring · date-timeOptional

End date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
unavailability_typestring · enumOptional

Type of unavailability

Possible values:
unavailability_notestringOptional

Notes about the unavailability

Example: I'm on vacation
Responses
200
Successfully updated the unavailability, returns the trailer, which contains the unavailability.
application/json
patch
PATCH /api/v4/trailers/{pk}/unavailability/{pk_unavailability}/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225

{
  "remote_id": "tr123type1",
  "created": "2020-07-30T21:10:06.44551Z",
  "start_date": "2020-07-30T21:10:06.44551Z",
  "end_date": "2020-07-30T21:10:06.44551Z",
  "unavailability_type": "paid_vacation",
  "unavailability_note": "I'm on vacation"
}
200

Successfully updated the unavailability, returns the trailer, which contains the unavailability.

{
  "pk": 928,
  "original": 1,
  "carrier": 928,
  "license_plate": "WE749RM",
  "fleet_number": "TRAILER120",
  "remote_id": "tr123type1",
  "created": "2020-07-30T21:10:06.44551Z",
  "used_for_qualimat_transports": true,
  "tags": [
    {
      "pk": 23498,
      "name": "Remorque"
    }
  ],
  "technical_control_deadline": "2020-12-22T15:31:39.26167Z",
  "country": "FR",
  "unavailability": [
    {
      "id": 928,
      "remote_id": "tr123type1",
      "created": "2020-07-30T21:10:06.44551Z",
      "start_date": "2020-07-30T21:10:06.44551Z",
      "end_date": "2020-07-30T21:10:06.44551Z",
      "unavailability_type": "paid_vacation",
      "unavailability_note": "I'm on vacation"
    }
  ],
  "events": [
    {}
  ]
}

Last updated

Was this helpful?