# Trip

A Trip is an aggregate entity that combines various entities to model visiting various locations, potentially doing one or multiple actions on each location, such as loading or unloading consignments. It is optionally coupled to a Vehicle that is/was driving this trip.

## Start a trip

 - [GET /trip/{id}/start](https://docs.transportial.com/apis/trip/handle.md): Starting a trip and attaching it to the vehicle

## Finish a trip and start a new trip

 - [GET /trip/{id}/finish/{nextId}/start](https://docs.transportial.com/apis/trip/handle_39.md): Finish a trip and start a new one

## Get combined financials

 - [GET /trip/{id}/financials/combined](https://docs.transportial.com/apis/trip/handle_47.md): Get simple and combined combined financials for a trip (linked chain).

## Update trips

 - [PUT /trips](https://docs.transportial.com/apis/trip/handle_477.md): Update a list of trips

## Create trip

 - [POST /trips](https://docs.transportial.com/apis/trip/handle_149.md): Create a new trip

## Finish a trip

 - [GET /trip/{id}/finish](https://docs.transportial.com/apis/trip/handle_153.md): Finishing a trip and detaching it to the vehicle

## Create trip and generate route

 - [POST /trip:route](https://docs.transportial.com/apis/trip/handle_181.md): Create a new trip and calculate a route

## Confirm a trip

 - [GET /trip/{id}/confirm](https://docs.transportial.com/apis/trip/handle_194.md): Confirming a trip and detaching it to the vehicle

## Get trip

 - [GET /trip/{id}](https://docs.transportial.com/apis/trip/handle_214.md): Get a trip on id

## Delete trip

 - [DELETE /trip/{id}](https://docs.transportial.com/apis/trip/handle_426.md): Delete a trip

## Update action lifeCycle

 - [PUT /trip/{id}/action/{actionId}](https://docs.transportial.com/apis/trip/update:trip:action.md): Update an actions lifeCycle, this includes all child actions

## Update vehicle trips order

 - [PUT /vehicle/{id}/trips:swap](https://docs.transportial.com/apis/trip/update:vehicle:trips.md): Update an actions lifeCycle, this includes all child actions

## Update action times

 - [PUT /trip/{id}/action](https://docs.transportial.com/apis/trip/update:trip:action_1.md): Update an actions lifeCycle, this includes all child actions

## Cancel trips

 - [POST /trips/cancel](https://docs.transportial.com/apis/trip/handle_292.md): Cancel a list of trips

## Update trip

 - [PUT /trip](https://docs.transportial.com/apis/trip/handle_304.md): Update a trip

## Create trip

 - [POST /trip](https://docs.transportial.com/apis/trip/handle_310.md): Create a new trip

## Update action times

 - [PUT /trip/{id}/action/{actionId}/times](https://docs.transportial.com/apis/trip/update:trip:action_2.md): Update an actions lifeCycle, this includes all child actions

## Complete all actions on a trip

 - [PUT /trip/{id}/complete-actions](https://docs.transportial.com/apis/trip/complete:trip:actions.md): Complete all actions on a trip in bulk, marking them as REALIZED. 
            This is useful when customers don't use driver-links or integrations and need to 
            easily complete a trip by providing the dates/times of completion.
            
            You can optionally specify start/end times and results per action, or use default 
            values that apply to all actions.

## Complete a trip

 - [GET /trip/{id}/complete](https://docs.transportial.com/apis/trip/handle_338.md): Complete a trip that is in PENDING_COMPLETION state, triggering invoices and integration events

## Get trips

 - [GET /trips/{offset}/{amount}](https://docs.transportial.com/apis/trip/handle_355.md): Get list of trips

## Search trips

 - [POST /trips/{offset}/{amount}](https://docs.transportial.com/apis/trip/handle_440.md): Get list of trips through a search

## Cancel a trip

 - [GET /trip/{id}/cancel](https://docs.transportial.com/apis/trip/handle_394.md): Cancel a trip, realize all actions below, remove from Vehicle and change Consignment status

## Create trips

 - [POST /trip/optimizer](https://docs.transportial.com/apis/trip/handle_395.md): Create a new trip

## Get trip

 - [GET /trip/{id}/{shareCode}](https://docs.transportial.com/apis/trip/handle_409.md): Get a trip on id

## Get trip activity

 - [GET /trip/{id}/activity](https://docs.transportial.com/apis/trip/handle_451.md): Get the activity timeline for a trip

## Confirm trips

 - [POST /trips/confirm](https://docs.transportial.com/apis/trip/handle_463.md): Confirm a list of trips

## Add documents

 - [PUT /trip/{id}/documents](https://docs.transportial.com/apis/trip/handle_502.md): Add documents to tripp

