Skip to main content

Import a mileage rate

Apart from manually creating a single mileage rate, you can import multiple rates into Yokoy simultaneously.

Written by Yokoy Team

🌐 Web | 👤 Admin with Mileage rates permissions

You can import mileage rates using a CSV file. The mileage rates import file is a comma-delimited CSV file. It contains mandatory and optional columns that must be present during import. Otherwise, the import fails. Values are required in all mandatory fields. Any additional columns that are not part of the standard import file format are ignored.

To import a mileage rate:

  1. Go to Admin > Mileage rates.

  2. Click Import file.

  3. In the dialog, download the example template if needed.

  4. Select the company, choose your file, and click Start import.

  5. Once complete, view the status and download a report with details on created, updated, or duplicated rates, and any errors.

✏️ Note

Yokoy supports CSV files with UTF-8, UTF-16, and ISO/IEC 8859-1:1998 (Latin1) encoding.

Mileage rate import file

Attribute

Required

Description

Accepted values

id

The unique identifier of the mileage rate, which is automatically generated if you leave this field empty. If you want to update an existing mileage rate, you must provide this value

String / null

name

Yes

The name of the mileage rate.

String

categoryId

Yes

The category to which the mileage rate should be linked. This ensures that the mileage is booked on the correct expense account.

String

mileageRateType

Yes

Type of mileage rate.

simple / stepped

rate

  • simple: yes

  • stepped: no

If the mileage type is simple, then the rate(s) per kilometer or mile.

Number

description

No

Include a description for the mileage rate, if needed.

String

currency

Yes

Type in the currency in which the mileage rate is displayed.

String

validityStartDate

No

Set a start date from which the mileage rate is active, if applicable.

validityEndDate

No

Set an end date until which the mileage rate is active, if applicable

applicableCountries

No

Define in which countries the mileage rate is valid

ISO 3166-1 alpha-2 code

applicableMinUserDistance

No

Define the minimum number of kilometers or miles that are required to activate the mileage rate.
The mileage counter at employee level chooses the correct rate according to the employee’s accumulated total.

Number

applicableMaxUserDistance

No

Define the maximum number of kilometers or miles that are covered by the mileage rate.
The mileage counter at employee level chooses the correct rate according to the employee’s accumulated total.

Number

rates

  • simple: no

  • stepped: yes

If the rate type is stepped, then all rates with the threshold.

Object, Array of objects

rate

Yes

The rate(s) per kilometer or mile. The applicable rate is the rate until the next rate bracket.

Number

threshold

Yes

Maximum threshold of the rate bracket.

Number

priority

No

Prioritize the mileage rate by entering a number (from 1 to 99). A higher number indicates a higher priority. This enables Yokoy to automatically assign a mileage rate to an expense report

Number

distanceCutOff

No

When entered, the mileage is only calculated if the distance driven per trip is < distanceCutOff, meaning that if the distance driven per mileage trip is lower, nothing is paid.

Number

🚧 Caution

To calculate VAT automatically for mileage expenses, you need to associate the tax rate in the mileage rate manually. Currently, you can't include this as part of the mileage rate import file.

Did this answer your question?