# Create and follow rental orders

## Introduction

Rental transports provide a way for truckers to generate and sign a rental order with the following informations:

* the company that asked for rental
* the list of transports executed for this company (where, what, when, LV number)
* the date
* the trucker and associated plates
* the worked hours (excluding breaks)
* signature of trucker and third party

## Activation

The rental orders feature must be enabled by the Dashdoc team on your account.

## Rental transports details

#### Documents

A rental transport **does not have** a digital consignment note or CMR.

A rental transport has a rental order (see below).

A rental transport can have all sorts of documents attached to it, including paper consignment notes. They can be used for invoicing.

#### Statuses

The status of a rental transport are limited to:

* `loading_complete` → start of a working period, the first one is the "start of the day"
* `unloading_complete` → end of a working period, the last one is the "end of the day"

#### Breaks

`status_updates` with `category = break_time`are used to represent unworking hours of the trucker . They are be used to compute the actual working hours displayed on the document (worked hours are not persisted).

## Create rental order transport

Specific screens will be displayed to truckers when executing a rental order transport. Also, specific information will be stored in the transport detail.

In order do to so, transport data must contain a unique `planned_loads` object with `"category" = "rental"`.

## Retrieve rental order data

#### Rental deliveries

Information about transports executed by the trucker during the rental is stored in a `rental_deliveries` object at the root of the transport's JSON.

Here is an exemple of `rental_deliveries` detail for a transport. The inner data structure is a list of transports :

{% file src="<https://3074350244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LU-jgnMbbOKXxePIFGq%2Fuploads%2Fgit-blob-4dad7d81fbc0c682be837725ec0391058e28acab%2Fexemple_content_rental_deliveries.json?alt=media>" %}
rental\_deliveries exemple
{% endfile %}

#### Legal document

As mentionned above, there is no eCMR generated by Dashdoc for those transports. Instead another document is created and stored also in the `documents` part of the transport's JSON. Its `category` differs and has the value `rental`.

Exemple:

```javascript
"documents": [
    {
        "pk": 2836097,
        "file_updated_date": "2021-04-23T07:19:13.115643Z",
        "delivery": "6de64936-2602-4538-b1b1-c8c4d9f83d4d",
        "delivery_sequential_id": 2708600,
        "reference": 2708600,
        "category": "rental",
        "name": "Rental order",
        "file": "https://www.dashdoc.eu/api/delivery-documents/c28e57ec-c073-495c-87d9-c2d48758e418",
        "business_privacy_scope": null
    }
]
```

#### Global exemple of rental order transport:

{% file src="<https://3074350244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LU-jgnMbbOKXxePIFGq%2Fuploads%2Fgit-blob-321e0352aa1e6e02c2f1bce7b11bba4b05167046%2Fexemple_transport_rental_order.json?alt=media>" %}
JSON of a rental order transport
{% endfile %}

## User guide for rental order

The following pages provide user documentation about how to create and use rental order in the web app and mobile app:

{% embed url="<https://help.dashdoc.eu/fr/articles/3853825-comment-lancer-un-transport-en-location-avec-dashdoc>" %}

{% embed url="<https://help.dashdoc.eu/fr/articles/4991059-le-bon-de-regie-sur-dashdoc>" %}
