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

# \_calculateTravel

Returns travel costs for a given Appointment.

### Parameters

#### id

The ID of the Appointment.

### Example

```
FM_api('Job_calculateTravel', ['id' => '1']);
```

#### On Success

```
{"duration":667,"distance":9208,"last_job":"1","next_duration":"600","next_distance":"9000"}
```
