# Flovi B2B Partner API v2

> REST API for booking car deliveries with Flovi: list offices, get a binding
> quote, create and manage reservations, and receive webhooks.

This file is the full v2 API reference as Markdown, generated from the docs
page at https://customer-api.flovi.io/customers/v2/docs. Links starting with
/customers/v2/docs# point to sections of that page.

Base URLs: production https://customer-api.flovi.io, staging
https://stage.customer-api.flovi.dev. Reservations created in production are
binding and dispatched to real drivers; build and test against staging.

Welcome to the Flovi Partner Reservation API v2 documentation. Flovi is a professional car relocation logistics platform that connects car dealers, leasing companies, rental firms, and garages with a network of vetted drivers to manage vehicle transfers. This API allows B2B partners to seamlessly request real-time pricing quotes, check vehicle delivery schedules, and book relocation jobs—such as home deliveries, inter-branch transfers, service/maintenance transport, or collections of purchased vehicles—with absolute pricing certainty.

> **Seamless Logistics Integration:** The Flovi Partner API provides a unified, RESTful interface for all your vehicle transport and relocation needs. From fetching office locations to requesting binding price quotes and confirming reservations, the API is designed to be easily embedded directly into your existing ERP, booking systems, or customer portals.

## Quick Start: How to Create a Reservation

Our B2B API leverages a guaranteed 2-step reservation workflow designed to eliminate pricing friction, handle electric vehicle schedules accurately, and secure slots before confirming. For details on how to authenticate your integration, please refer to the [Authentication section](/customers/v2/docs#auth).

#### Step 1: Request a Guaranteed Quote

Send the pickup location, dropoff location, ready time, and vehicle characteristics to [POST /customers/v2/reservation/quote](/customers/v2/docs#post-quotes). Partner offices can be queried dynamically from [GET /customers/v2/offices](/customers/v2/docs#get-offices). Providing the registration number enables automatic charging-break checks and heavy truck license checks.

#### Step 2: Present Options to Customer

The response contains a unique `quoteId` valid for **15 minutes** and multiple binding delivery options. Each option includes its own `optionId`, binding total price, and the exact earliest/latest pickup and delivery timestamps.

#### Step 3: Confirm the Reservation

Once the customer picks their preference, send the chosen `quoteId` (which uniquely locks in both the price and chosen schedule option), vehicle details, and contact names/phone numbers to [POST /customers/v2/reservation](/customers/v2/docs#post-reservations). This locks in the price and schedule, writing them directly to the Flovi database. **Warning:** In Production, this creates a real transport job dispatched to freelance drivers immediately!

## Authentication

### How to Obtain your API Key

All B2B v2 requests require authentication via a secure Partner API Key. You can generate and retrieve your key directly from the [stage.customer.flovi.io/profile](https://stage.customer.flovi.io/profile) dashboard (for Staging) or [customer.flovi.io/profile](https://customer.flovi.io/profile) dashboard (for Production). Keep this key strictly confidential, as it grants full programmatic access to your Flovi account.

### API Base URL & Environments

Depending on your environment, prepend all endpoint paths with one of the following base URLs:

| Environment | Base URL | Description |
| --- | --- | --- |
| Staging | `https://stage.customer-api.flovi.dev` | Staging environment for testing and integration. |
| Production | `https://customer-api.flovi.io` | Live production API gateway. |

### Required HTTP Header

You must include your API Key in the HTTP headers of every request:

| Header Key | Type | Description |
| --- | --- | --- |
| **x-api-key** | `string` | Your secure B2B partner API key (e.g. `flo_partner_...`). |

### Service Providers: Acting on Behalf of a Customer

A **service provider** is a third-party portal that orders Flovi drives for its own users, who are also Flovi customers. Flovi issues the provider a single API key. Each customer then connects to the provider from the Flovi customer portal, with no key handling of their own, and can disconnect there at any time.

With a provider key, every request names the customer it acts for in one extra header. The request is then answered exactly as that customer's own key would answer it, with two differences: reads and changes are limited to the reservations the provider placed itself, and every reservation and audit entry records the provider as its source.

| Header Key | Type | Description |
| --- | --- | --- |
| **x-api-key** | `string` | Your service provider API key. |
| **x-customer-business-id** | `string` | The business ID of the customer you are acting for (e.g. `1234567-8`), as returned by GET /customers/v2/connected-customers. Not needed on that endpoint itself. |

A provider request without the customer header is answered `400`. A customer that has not connected to you, has disconnected, or whose business ID is unknown is answered `403` with the same message in every case, so the header cannot be used to look customers up. A disconnect takes effect on the very next request.

### Service Providers: Status-Only Keys

Some providers onboard customers who then book with their own customer API key. Flovi links those customers to the provider and issues the provider a **status-only** key, sent as `x-api-key`. It opens [GET /customers/v2/customer-status](/customers/v2/docs#get-customer-status) and nothing else: on every other endpoint, including `GET /customers/v2/connected-customers`, it is answered `403`. To book for a customer, use the customer's own key, which Flovi sends you once the account is active.

## Errors & Validation

The API uses standard HTTP response status codes to indicate the success or failure of requests. When an error occurs, the response body contains a JSON object with structured details to help you diagnose and handle the problem.

> **Correlation ID:** Every error response includes a unique `correlationId`. Please include this ID when contacting support to help us trace and debug the request instantly.

### Error Response Structure

Every error payload adheres to the following consistent structure:

```json
{
  "statusCode": 400,
  "errorCode": "VALIDATION_ERROR",
  "timestamp": "2026-06-01T15:55:05.123Z",
  "path": "/customers/v2/reservation",
  "correlationId": "8f7d9a1b-1234-5678-abcd-ef0123456789",
  "message": [
    "vehicle.regNo is required for creating a reservation."
  ]
}
```

| Property | Type | Description |
| --- | --- | --- |
| **statusCode** | `number` | The HTTP status code matching the response header (e.g. `400`). |
| **errorCode** | `string` | A machine-readable string key representing the error category (e.g. `VALIDATION_ERROR`). |
| **timestamp** | `string` | ISO 8601 formatted timestamp of when the error occurred. |
| **path** | `string` | The API request URL path that triggered the error. |
| **correlationId** | `string` | A unique UUID generated for request tracing and support references. |
| **message** | `string \| array` | A descriptive error message. For request validation failures, this is a JSON array listing the exact constraints that failed. |

### Standard Error Codes

Here are the typical machine-readable error codes you should handle in your integration:

| HTTP Status | errorCode | When it is returned |
| --- | --- | --- |
| `400 Bad Request` | VALIDATION_ERROR | The request payload is invalid. For example, a required parameter is missing, has an incorrect type, or vehicle specs could not be resolved from Traficom. |
| `401 Unauthorized` | UNAUTHORIZED | The `x-api-key` header is missing, expired, or invalid. |
| `403 Forbidden` | FORBIDDEN | The API key is valid but you do not have permission to access the requested resource or customer store. |
| `404 Not Found` | NOT_FOUND | The requested resource (e.g. office, quote option, or reservation ID) does not exist. |
| `409 Conflict` | CONFLICT | A conflict occurs, such as when a reservation is already created using the specified `quoteId` or an option ID has expired. |
| `422 Unprocessable` | UNPROCESSABLE_ENTITY | The request is syntactically valid but business rules prevent its execution (e.g., trying to book too close to pickup time). |
| `429 Too Many Requests` | RATE_LIMITED | You have exceeded the rate limit threshold. Please implement back-off and retry strategies. |
| `500 Internal Error` | INTERNAL_ERROR | An unexpected internal error occurred on the Flovi platform. |
| `503 Service Unavailable` | INTERNAL_ERROR | Flovi, or a service it depends on, could not handle the request right now. Retry with back-off. Retrying a reservation with the same quote is safe: a quote can be booked only once, so a retry cannot create a second reservation. |

### `GET /customers/v2/offices`

Retrieves all active offices (stores) belonging to the authenticated B2B customer (partner). These office IDs (e.g. `off_1`, `off_2`) are compatible with the origin/destination `officeId` fields in quotes and bookings.

### Response Properties

Returns a JSON array of office objects with the following fields:

| Field | Type | Description |
| --- | --- | --- |
| **id** | `string` | The Office ID (e.g. `off_5`) to be used as `officeId` in quotes/bookings. |
| **name** | `string` | The descriptive name of the office (e.g. "Helsinki HQ"). |
| **street** | `string` | The street address of the office. |
| **zip** | `string` | Postal code (e.g. "00100"). |
| **city** | `string` | City (e.g. "Helsinki"). |
| **country** | `string` | Country (e.g. "FI"). |
| **lat** | `number` | Latitude coordinate. |
| **lng** | `number` | Longitude coordinate. |
| **isCostCenter** | `boolean` | Whether this office can be used as a valid cost center. |

### `POST /customers/v2/reservation/quote`

Calculates the binding, guaranteed price and delivery schedule. It verifies if the vehicle is electric (dynamically adding charging breaks if needed) and locks the resulting terms for **15 minutes**.

### Request Parameters

| Field | Type | Description |
| --- | --- | --- |
| **reservationType** | `string` | Type of transport. Must be one of: `officeToOffice`, `homeDelivery`, `serviceDrive`, `purchaseCar`, `replacementCar`, `import`. |
| **costCenter** | `string` | Billing cost center reference. Must be a valid preconfigured office/store ID fetched from the GET /customers/v2/offices endpoint (e.g. `1234`). |
| **origin** | `object` | Pickup location. Must contain EITHER an `officeId` OR structured address fields. Any address is fine; if one happens to match an office of yours, it is recognised as that office and comes back with its `officeId`. [Allowed Schemas (Choice): `officeId` Required - The ID must be fetched from the offices endpoint; `address` Required - Either a street address (`street`, `zip`, `city`) or coordinates (`location`, ideally with a `title`):; `title` Recommended - Name of the place, shown to the driver (e.g. `Home`, `Vuosaari harbour, gate 3`). Most useful with `location`, where it is often the clearest name the place has.; `location` Optional - Coordinates as `{ "lat": 60.1699, "lng": 24.9384 }` (WGS84). The point is used as is and not geocoded. With `location`, the street address below is optional: the parts you leave out are filled in from the coordinates when they can be looked up, and stay empty otherwise. The city must be found, from `city` or from the coordinates, or the quote is refused with 400.; `street` Required without `location` - Street name, with or without the house number (e.g. `Mannerheimintie` or `Mannerheimintie 1`); `street_number` Optional - House number (e.g. `1`). Omit it when the number is already in `street`.; `streetNumber` Optional - The same as `street_number`, in camelCase; send one or the other.; `zip` Required without `location` - Postal code (e.g. `00100`); `city` Required without `location` - City (e.g. `Helsinki`); `country` Optional - 2-character uppercase country code (e.g. `FI`). Without it, the country comes from the address or the coordinates, and failing that from your account.] |
| **destination** | `object` | Dropoff location. Must contain EITHER an `officeId` OR structured address fields. Any address is fine; if one happens to match an office of yours, it is recognised as that office and comes back with its `officeId`. [Allowed Schemas (Choice): `officeId` Required - The ID must be fetched from the offices endpoint; `address` Required - Either a street address (`street`, `zip`, `city`) or coordinates (`location`, ideally with a `title`):; `title` Recommended - Name of the place, shown to the driver (e.g. `Home`, `Vuosaari harbour, gate 3`). Most useful with `location`, where it is often the clearest name the place has.; `location` Optional - Coordinates as `{ "lat": 60.1699, "lng": 24.9384 }` (WGS84). The point is used as is and not geocoded. With `location`, the street address below is optional: the parts you leave out are filled in from the coordinates when they can be looked up, and stay empty otherwise. The city must be found, from `city` or from the coordinates, or the quote is refused with 400.; `street` Required without `location` - Street name, with or without the house number (e.g. `Mannerheimintie` or `Mannerheimintie 1`); `street_number` Optional - House number (e.g. `1`). Omit it when the number is already in `street`.; `streetNumber` Optional - The same as `street_number`, in camelCase; send one or the other.; `zip` Required without `location` - Postal code (e.g. `00100`); `city` Required without `location` - City (e.g. `Helsinki`); `country` Optional - 2-character uppercase country code (e.g. `FI`). Without it, the country comes from the address or the coordinates, and failing that from your account.] |
| **pickupTime** | `string (ISO Date)` | Earliest pickup timestamp in ISO format (e.g. `2026-06-20T09:00:00Z`). If the vehicle is immediately ready for pickup, you can use the timestamp of the next quarter hour. A time up to 15 minutes in the past (the time a quote stays valid) is quoted from the moment of the request, so re-quoting with the pickup time of an earlier quote keeps working; the options' `schedule` shows the window actually quoted. A time further in the past is refused with `400`. |
| **deliveryTime** | `string (ISO Date)` | Optional latest delivery timestamp in ISO format (e.g. `2026-06-20T15:00:00Z`). Provide it when the delivery has a deadline: the first option in the response is then scheduled from the requested `pickupTime` to the requested `deliveryTime`, is the `default` one, and its price is calculated for the speed that window requires. The route's other speed options follow it, as they are without `deliveryTime`, so their prices can be compared: only those priced differently from the first option, so neither its own speed nor any other at its price is repeated. They are not bound by `deliveryTime` and can arrive after it: check each option's `schedule.arriveAtLatest` before choosing it. On that first option, `schedule.departAtEarliest` is the requested `pickupTime` (or the time of the request, when `pickupTime` was in the past) and `schedule.arriveAtLatest` the requested `deliveryTime`; `departAtLatest` and `arriveAtEarliest` are calculated automatically from the drive duration. The requested window should leave at least the drive duration plus 15 minutes (and room for any checklist tasks) after `departAtEarliest`, which is later than `pickupTime` when that was in the past. A tighter window is refused with `400 Bad Request`, naming the earliest delivery time the route allows. Accounts that compare prices on behalf of their own customers can have Flovi quote a tighter window anyway: it is then quoted on the requested schedule, priced as the earliest delivery the route allows, and the response carries a `DELIVERY_TIME_TOO_TIGHT` entry in `warnings`: the driver may not make it in time. Omit the field to receive only the schedule alternatives. Not supported for `import` transports. |
| **afterHoursPickup** | `boolean` | Allow the pickup to happen outside the origin office's opening hours (key drop or a similar arrangement). The scheduler is then free to place `departAtEarliest` and `departAtLatest` outside those hours, which usually widens the window and can bring the delivery deadline earlier. Omit the field to use the origin office's own setting. That is off unless the office has opted in to after-hours pickup, so most offices are quoted without it. Has no effect when the origin is a custom address instead of an office: an address has no opening hours to fall outside of. |
| **afterHoursDelivery** | `boolean` | The same for the destination office: allow the delivery to happen outside its opening hours, letting the scheduler place `arriveAtEarliest` and `arriveAtLatest` outside them. Omit the field to use the destination office's own setting. That is on for every office that allows key drop outside opening hours, which is the default for offices — the same default Biila's own booking UI applies. Send `false` to rule it out for this quote. For a custom address the default is off. `true` is ignored for a destination office that has key drop outside opening hours disabled. The office's configuration wins; the quote comes back scheduled inside the opening hours instead of failing. Leaving it out has the biggest single effect on the schedule you get back: an after-hours delivery typically lets the drive depart the same day, while without it the window starts the next morning. |
| **carInspection** | `boolean` | Quote a vehicle inspection alongside the transport. The price comes back as a `carInspection` line in the breakdown, and the same flag must be sent to POST /customers/v2/reservation to actually order it — a reservation cannot add an inspection the quote did not price. Defaults to `false`. |
| **carCheck** | `boolean` | Whether a `purchaseCar` gets a car check before the drive. It comes back as a `check` line in the breakdown and a `checkCar` task; send `false` to leave it out. Markets without a car check on purchases (Sweden) never add one. Ignored for other reservation types. Defaults to `true`. |
| **obdCheck** | `boolean` | Order an OBD check on a `purchaseCar`: the driver reads the car's fault codes on collection and sends the report to the orderer. It is quoted in the `check` line with an `obdCheck` task, and it includes the vehicle inspection, as if `carInspection` were sent. Offered only in markets that have it (Sweden) and on accounts it is enabled for; anywhere else the quote is refused with `400`. Defaults to `false`. |
| **purchaseProtocol** | `boolean` | Order the purchase protocol on a `purchaseCar`: the standard inspection protocol the driver fills in on collection, as the portal orders it. It is quoted in the `check` line with a `purchaseProtocol` task, and it includes the vehicle inspection, as if `carInspection` were sent. An `obdCheck` already includes the protocol, so with both only the OBD check is quoted. Offered only in markets that have it (Sweden); anywhere else the quote is refused with `400`. Defaults to `false`. |
| **vehicle** | `object` | Vehicle characteristics. Providing this block with at least the registration number (`regNo`) is required to calculate accurate EV/C1 specs, binding schedule windows, and prices. [object schema: `regNo` string (Required) - Registration plate number (e.g. "ABC-123"). Used for automatic specs resolution.; `make` string (Optional) - Manufacturer/make (e.g. "Toyota").; `model` string (Optional) - Model name (e.g. "Corolla").; `year` number (Optional) - Production year (e.g. 2022).; `vin` string (Optional) - Vehicle identification number (VIN).; `fuelType` string (Optional) - The fuel type of the vehicle. Options: `gasoline`, `electric`, `diesel`, `gas`. Default: `gasoline`.; `fastCharge` boolean (Optional) - Whether the vehicle supports fast charging. Default: `false`.; `transmission` string (Optional) - The transmission type of the vehicle. Options: `manual`, `automatic`. Default: `manual`.; `requiresC1` boolean (Optional) - Requires C1 heavy license. Default: `false`. A vehicle whose registered gross weight is over 3,500 kg gets the C1 requirement on its drives at booking even when this is `false`.; `testPlates` boolean (Optional) - Whether test/dealer plates (koekilvet) are required for transport. Adds two hours of schedule slack, and the reservation's drives are offered only to drivers who carry test plates. Default: `false`.; `vehicleType` string (Optional) - Type of the vehicle. E.g. `car`.] |
| **returnDrive** | `object` | Optional return drive details. If provided, details for a return trip transport will be included. [object schema: `destination` object (Optional) - Dropoff location for the return drive. If not provided, it defaults to the origin of the outbound delivery. Must contain EITHER an `officeId` OR structured address fields.; `vehicle` object (Optional) - Vehicle specifications for the return drive. If not provided, the same vehicle as the outbound delivery is assumed. Same format as the main `vehicle` parameter.] |

### Response Properties

Returns a JSON object with the following fields:

| Field | Type | Description |
| --- | --- | --- |
| **expiresAt** | `string (ISO Date)` | The absolute timestamp when the generated quote options expire (guaranteed for 15 minutes). An option booked after its pickup window has opened gets a window that starts at the time of booking; one booked after the window has closed is refused, and a new quote is needed. |
| **reservationType** | `string` | The type of reservation requested (must be one of: `officeToOffice`, `homeDelivery`, `serviceDrive`, `purchaseCar`, `replacementCar`, `import`). |
| **origin** | `object` | Resolved details of the origin pickup location. [object schema: `officeId` string (Optional) - Resolved office ID.; `address` object - Standardized address components: `title` string - The office name, or the title sent with a custom address; empty when there is none. `street` string - Street name (without house number). `street_number` string - Street/house number. `zip` string - Postal code. `city` string - City name. `country` string - Country name. `formattedAddress` string - Full formatted single-line address.; `title` string - The office name, or the title sent with a custom address; empty when there is none.; `street` string - Street name (without house number).; `street_number` string - Street/house number.; `zip` string - Postal code.; `city` string - City name.; `country` string - Country name.; `formattedAddress` string - Full formatted single-line address.; `lat` number - Latitude coordinate.; `lng` number - Longitude coordinate.] |
| **destination** | `object` | Resolved details of the destination dropoff location. [object schema: `officeId` string (Optional) - Resolved office ID.; `address` object - Standardized address components: `title` string - The office name, or the title sent with a custom address; empty when there is none. `street` string - Street name (without house number). `street_number` string - Street/house number. `zip` string - Postal code. `city` string - City name. `country` string - Country name. `formattedAddress` string - Full formatted single-line address.; `title` string - The office name, or the title sent with a custom address; empty when there is none.; `street` string - Street name (without house number).; `street_number` string - Street/house number.; `zip` string - Postal code.; `city` string - City name.; `country` string - Country name.; `formattedAddress` string - Full formatted single-line address.; `lat` number - Latitude coordinate.; `lng` number - Longitude coordinate.] |
| **route** | `object` | Calculated optimal route characteristics. [object schema: `distanceMeters` number - Total route distance in meters.; `durationSeconds` number - Estimated pure driving time in seconds.] |
| **options** | `array (object)` | Available binding transport and speed schedule options. If the request included a `deliveryTime`, the first option matches the requested window and is the default; the route's other speeds follow it, only those priced differently from it. [item schema: `quoteId` string - The unique binding quote ID for this option (passed as `quoteId` in the confirm reservation request).; `name` string - Speed profile name (e.g. "Standard", "Express", "Saver (Flexible)").; `default` boolean - Indicates if this is the default quote option (exactly one option in the options array is always true).; `price` number - Total partner price (in decimal currency units).; `currency` string - Three-letter ISO currency code (e.g. "EUR").; `priceBreakdown` array (object) - Breakdown of price components.; `schedule` object - Service delivery window: `departAtEarliest` string (ISO Date) - Earliest pickup window start. `departAtLatest` string (ISO Date) - Latest pickup window end. `arriveAtEarliest` string (ISO Date) - Earliest dropoff window start. `arriveAtLatest` string (ISO Date); `departAtEarliest` string (ISO Date) - Earliest pickup window start.; `departAtLatest` string (ISO Date) - Latest pickup window end.; `arriveAtEarliest` string (ISO Date) - Earliest dropoff window start.; `arriveAtLatest` string (ISO Date); `returnDrive` object (Optional) - Return drive details. Included only if return drive was requested. Show returnDrive schema `schedule` object - Service delivery window for the return drive (starts as soon as outbound drive arrives): `departAtEarliest` string (ISO Date) - Earliest return pickup window start (matches outbound arriveAtEarliest). `departAtLatest` string (ISO Date) - Latest return pickup window end (matches outbound arriveAtLatest). `arriveAtEarliest` string (ISO Date) - Earliest return dropoff window start. `arriveAtLatest` string (ISO Date) - Latest return dropoff window end.; `schedule` object - Service delivery window for the return drive (starts as soon as outbound drive arrives): `departAtEarliest` string (ISO Date) - Earliest return pickup window start (matches outbound arriveAtEarliest). `departAtLatest` string (ISO Date) - Latest return pickup window end (matches outbound arriveAtLatest). `arriveAtEarliest` string (ISO Date) - Earliest return dropoff window start. `arriveAtLatest` string (ISO Date) - Latest return dropoff window end.; `departAtEarliest` string (ISO Date) - Earliest return pickup window start (matches outbound arriveAtEarliest).; `departAtLatest` string (ISO Date) - Latest return pickup window end (matches outbound arriveAtLatest).; `arriveAtEarliest` string (ISO Date) - Earliest return dropoff window start.; `arriveAtLatest` string (ISO Date) - Latest return dropoff window end.] |
| **vehicle** | `object` | Resolved specifications of the transport vehicle. [object schema: `fuelType` string - The fuel type of the vehicle (`gasoline`, `electric`, `diesel`, `gas`).; `fastCharge` boolean - Whether the vehicle supports fast charging.; `transmission` string - The transmission type of the vehicle (`manual`, `automatic`).; `isElectric` boolean - Whether the vehicle is electric (kept for backward compatibility).; `requiresC1` boolean - Whether a C1 heavy driver license is required.; `make` string - Vehicle make/brand.; `model` string - Vehicle model.; `year` number - Vehicle model year.; `vin` string - Vehicle Identification Number (VIN).; `gearbox` string (Optional) - Detected transmission type (e.g. "automatic", "manual").; `regNo` string (Optional) - Registration number.; `fuel` string - Same as `fuelType`.; `testPlates` boolean - Whether the car moves on test plates.; `vehicleType` string - Vehicle type, e.g. `car`.] |
| **warnings** | `array (object)` | Non-blocking issues with the request. The quote was given regardless; the field is present only when there is something to report. Show the `message` to the person ordering. [item schema: `code` string - `DELIVERY_TIME_TOO_TIGHT`: the requested `deliveryTime` leaves less than the drive duration plus 15 minutes (and any checklist time) after `departAtEarliest`. The schedule is kept as requested, but the driver may not make it in time. Only for accounts Flovi has set to quote such a window; others get `400 Bad Request`.; `message` string - Human-readable explanation in your organisation's country language, with times in local time.; `earliestDeliveryTime` string (ISO Date) - The earliest delivery the route allows.] |
| **returnDrive** | `object` | Present only when the request had a `returnDrive`: the return leg's locations and route. Each option then carries its own `returnDrive.schedule`. |
| **tasks** | `array \| null` | Checklist tasks the driver will perform before or after the drive, as priced into the options. |

### `POST /customers/v2/reservation`

Vaporizes booking friction by turning your guaranteed `quoteId` into a confirmed job. The details specified in the quote must match the booking parameters.

> PRODUCTION DISPATCH WARNING
>
> Calling this endpoint in the **Production environment** (`https://customer-api.flovi.io`) creates a live, binding transport order. The job is immediately dispatched to real freelance drivers! **All integration development and testing MUST be conducted exclusively in the Staging environment** (`https://stage.customer-api.flovi.dev`).

### Request Parameters

| Field | Type | Description |
| --- | --- | --- |
| **quoteId** | `string` | The active, unexpired quote UUID obtained from the `/quote` endpoint. |
| **contactInfo** | `object` | Operational contact at pickup site. When the phone number or email belongs to one of your portal users, the reservation is linked to that account and appears on their "My" list. [object schema: `name` *string - Full name.; `phone` *string - Phone number in E.164 format.; `email` `string` - Optional. Identifies the contact's portal account exactly, where the phone number is only a best guess. An address that matches no user of your organisation is kept as plain contact information.] |
| **recipientContactInfo** | `object (Optional)` | Contact at dropoff site. [object schema: `name` *string - Full name.; `email` `string` - Optional. Stored as contact information for this site.; `phone` *string - Phone number in E.164 format.] |
| **orderer** | `object (Optional)` | The person who placed the order, i.e. the user logged in to your system. Unlike `contactInfo`, the driver never sees or calls this person. Matched to a portal user of your organisation the same way as the contact: email first, then phone number. A match is recorded as the reservation's orderer. When nothing matches, the reservation is still created and the response carries an `ORDERER_NOT_FOUND` warning. [object schema: `email` `string` - Email of the orderer's portal account.; `phone` `string` - Phone number in E.164 format. Used when the email is missing or matches nobody, and only when it belongs to exactly one user.] |
| **contactBeforeDeparture** | `boolean (Optional)` | Ask the driver to call the pickup contact before departing. The instruction is added to the driver notes. Defaults to `false`. |
| **contactBeforeDelivery** | `boolean (Optional)` | Ask the driver to call the dropoff contact (or the end customer) before delivering the vehicle. The instruction is added to the driver notes. Defaults to `false`. |
| **publicNotes** | `string (Optional)` | Public notes visible to all drivers searching for gigs. |
| **privateNotes** | `string (Optional)` | Driver instructions (keys, parking info, etc.) visible only after the driver has accepted the gig. |
| **deliveryTimeWindow** | `object (Optional)` | Precise delivery time window. Overrides the time window from the quote. Must fall entirely within the original quote time window, must be at least 1 hour long, and will be automatically rounded to the nearest 15 minutes. The pickup window moves by the same amount. Cannot be combined with `pickupTimeWindow`. [object schema: `earliest` *string (ISO Date) - The exact earliest arrival time requested. Must not be earlier than the quote's earliest arrival time.; `latest` *string (ISO Date) - The exact latest arrival time requested. Must not be later than the quote's latest arrival time.] |
| **pickupTimeWindow** | `object (Optional)` | Precise pickup time window. Overrides the pickup window from the quote. Must fall entirely within the quote's pickup window, must be at least 1 hour long, and will be automatically rounded to the nearest 15 minutes. The delivery window moves by the same amount, so the quoted drive duration is kept. Cannot be combined with `deliveryTimeWindow`. [object schema: `earliest` *string (ISO Date) - The exact earliest pickup time requested. Must not be earlier than the quote's earliest pickup time.; `latest` *string (ISO Date) - The exact latest pickup time requested. Must not be later than the quote's latest pickup time.] |
| **carInspection** | `boolean (Optional)` | Order a vehicle inspection. The driver is shown the inspection checklist for the car, and you read what they found from GET /customers/v2/reservation/{id}/inspection. Which questions are asked depends on the drive type and country, and is configured by Flovi — you do not choose the checklist here. Defaults to `false`; without it the driver is never shown one. |
| **equipmentChecks** | `string[] (Optional)` | Equipment the driver verifies is in the vehicle before departing. Each item becomes its own checkbox on the driver's pre-drive checklist, translated once at booking time into your organisation's language. Does not affect the price. [accepted values: `spareTires` - A second set of tires travels with the vehicle.; `cables` - Charging cables.; `hatShelf` - Parcel shelf / load cover.; `secondPairOfKeys` - A second set of keys.; `carDocuments` - Service book and vehicle papers.] |
| **returnEquipmentChecks** | `string[] (Optional)` | The same values, applied to the return drive instead. Ignored when the quote has no return drive. |
| **accessCodes** | `object (Optional)` | Codes the driver needs to get to the vehicle or its keys, e.g. a key box pincode or a release number. The driver sees them once the drive has started, the same way as codes added in the customer portal. Give only the ones you have. A code given as a file (a release permit, a photo of the key box) is added after booking with `POST /customers/v2/reservation/:id/attachments` and `type=accessCode`. [object schema: `release` `object` - Code for getting the vehicle at pickup. `type` *string - Always `code`, a text code. `value` *string - The code itself. Must not be blank; at most 5000 characters.; `type` *string - Always `code`, a text code.; `value` *string - The code itself. Must not be blank; at most 5000 characters.; `return` `object` - Code for leaving the vehicle at the destination. Same shape as `release`.; `returnDrive` `object` - The return drive's codes. Only allowed when the quote has a return drive; otherwise the request is refused with 400. `release` `object` - Code for picking the vehicle up where the outbound drive delivered it. `return` `object` - Code for leaving it at the return drive's destination.; `release` `object` - Code for picking the vehicle up where the outbound drive delivered it.; `return` `object` - Code for leaving it at the return drive's destination.] |
| **externalId** | `string (Optional)` | External identifier from your system. Use this to link the reservation to your own records (e.g. order ID, work order number). Returned in all reservation responses and webhook payloads. |

### Response Properties

Returns a JSON object with the following fields:

| Field | Type | Description |
| --- | --- | --- |
| **reservationId** | `string` | The unique system ID generated for the confirmed transport order. |
| **reservationType** | `string` | The type of reservation requested (must be one of: `officeToOffice`, `homeDelivery`, `serviceDrive`, `purchaseCar`, `replacementCar`, `import`). |
| **status** | `string` | The booking status, always `confirmed`. |
| **externalId** | `string \| null` | External identifier from your system, if provided when creating the reservation. |
| **quoteId** | `string` | The exact speed-profile quote ID confirmed from the quote calculation. |
| **price** | `number` | The final binding cost billed for the transport order. |
| **currency** | `string` | Three-letter ISO currency code (e.g. `EUR`). |
| **schedule** | `object` | The definitive pickup and dropoff schedule window. [object schema: `departAtEarliest` string (ISO Date) - Earliest pickup window start.; `departAtLatest` string (ISO Date) - Latest pickup window end.; `arriveAtEarliest` string (ISO Date) - Earliest dropoff window start.; `arriveAtLatest` string (ISO Date) - Latest dropoff window end.] |
| **vehicle** | `object` | The transport vehicle specs confirmed. [object schema: `regNo` string - Registration number.; `fuelType` string - Fuel type of the vehicle.; `fastCharge` boolean - Whether the vehicle confirms fast charging.; `transmission` string - The transmission type of the vehicle (`manual`, `automatic`).; `isElectric` boolean - Electric status (kept for backward compatibility).; `testPlates` boolean - Whether test/dealer plates (koekilvet) are required for transport. When true, the drives are offered only to drivers who carry test plates.; `vehicleType` string - Vehicle category (e.g., "car").; `make` string - Manufacturer.; `model` string - Model.; `year` number (Optional) - Model year.; `vin` string \| null - Vehicle identification number.; `fuel` string - Same as `fuelType`.; `requiresC1` boolean - Whether the vehicle requires a C1 heavy driver licence.; `gearbox` string - Same as `transmission`.] |
| **warnings** | `object[] (Optional)` | Non-blocking issues with the request; the reservation was created regardless. Present only when there is something to report. Each item has a `code` and a human-readable `message`. [codes: `ORDERER_NOT_FOUND` - The given `orderer` matched no user of your organisation, so the reservation has no orderer.] |
| **createdAt** | `string` | ISO timestamp of the reservation's creation. |
| **priceBreakdown** | `array` | The items `price` is made of, as in GET /customers/v2/reservation/{id}. |
| **route** | `object` | `distanceMeters` and `durationSeconds` of the whole reservation, return drive included. |
| **origin** | `object` | The pickup location as booked: address, `lat`/`lng` and, for one of your offices, its `officeId`. |
| **destination** | `object` | The dropoff location, in the same shape as `origin`. |
| **tasks** | `array` | Checklist tasks the driver performs before or after the drive. |
| **returnDrive** | `object` | Present only when the quote had a return drive: its locations, schedule and vehicle. |

### `POST /customers/v2/reservation/:id/attachments`

Adds a file to a reservation you have created. Call it once per file; files can be added until the reservation is completed or cancelled. `type` says what the file is:

- `document` (the default): a document the driver needs, such as a power of attorney or key instructions. The driver sees it in the driver app at pickup, at drop-off, or both.
- `accessCode`: an access code given as a file, such as a release permit or a photo of the key box, in place of a text code. The driver sees it with the drive's other codes once the drive has started. It replaces the code the slot held, and can be added until the drive departs.

### Request Body (multipart/form-data)

| Field | Type | Description |
| --- | --- | --- |
| **file** | `file` | One file of at most 30 MB: a PDF, PNG, JPEG or DOCX for a document, a PDF, PNG or JPEG for an access code. The type is read from the file's content, not from its name. The name you give the file is kept and shown to the driver. |

| Field | Type | Description |
| --- | --- | --- |
| **type** | `string (Optional)` | `document` (the default) or `accessCode`. |
| **showAt** | `string (Optional)` | For a document: where the driver needs it, `pickup`, `dropOff`, or both, comma separated (`pickup,dropOff`) or as a repeated field. Defaults to both. Not allowed for an access code. |
| **accessCode** | `string (Optional)` | Required with `type=accessCode`: which code the file is. `release` (getting the vehicle at pickup), `return` (leaving it at the destination), or the return drive's `returnDrive.release` / `returnDrive.return`. |

### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| **attachmentId** | `string` | Id of the file. For an access code it is also the code's `value` in `GET /customers/v2/reservation/:id`. |
| **type** | `string` | `document` or `accessCode`. |
| **fileName** | `string` | The name the file was uploaded with, as the driver sees it. |
| **showAt** | `string[]` | Where the driver is shown the file. For an access code: `pickup` for a release code, `dropOff` for a return code. |
| **accessCode** | `string \| null` | The code slot for an access code, otherwise `null`. |

| Status | Description |
| --- | --- |
| **201 Created** | Attached. |
| **400 Bad Request** | No file in the request, the file is empty, or the fields do not fit the type: an unknown value, `type=accessCode` without `accessCode`, `accessCode` on a document, or `showAt` on an access code. |
| **404 Not Found** | No reservation with the given ID exists for your partner account, or an access code is for a return drive the reservation does not have. |
| **409 Conflict** | The reservation is cancelled or completed, it already has 20 documents, or the drive of an access code has departed. |
| **413 Payload Too Large** | The file is over 30 MB. |
| **415 Unsupported Media Type** | The file is not a PDF, PNG, JPEG or DOCX file (for an access code: not a PDF, PNG or JPEG). |

### `PUT /customers/v2/reservation/:id/edit`

Allows editing basic reservation details after creation. Details like contact info, recipient contact info, and public notes can be modified. Note that any changes that affect the quote (e.g. locations, schedules) cannot be updated via this endpoint and require a reschedule.

### Request Parameters

| Field | Type | Description |
| --- | --- | --- |
| **contactInfo** | `object (Optional)` | Operational contact at pickup site. Sent as a whole: the account the reservation is linked to moves with it, and a field left out is cleared rather than kept. [object schema: `name` *string - Full name of the contact person.; `phone` *string - Phone number in international format starting with + (e.g. +358501231234).; `email` `string` - Optional. Identifies the contact's portal account exactly, where the phone number is only a best guess.] |
| **recipientContactInfo** | `object (Optional)` | Contact name and phone number at dropoff site. [object schema: `name` *string - Full name of the recipient contact person.; `phone` *string - Phone number in international format starting with + (e.g. +358501231234).; `email` `string` - Optional. Stored as contact information for this site.] |
| **contactBeforeDeparture** | `boolean (Optional)` | Ask the driver to call the pickup contact before departing. Omit the field to leave the current setting untouched. |
| **contactBeforeDelivery** | `boolean (Optional)` | Ask the driver to call the dropoff contact (or the end customer) before delivering the vehicle. Omit the field to leave the current setting untouched. |
| **publicNotes** | `string (Optional)` | Public notes visible to all drivers searching for gigs. |
| **privateNotes** | `string (Optional)` | Driver instructions (keys, parking info, etc.) visible only after the driver has accepted the gig. |
| **vehicle** | `object (Optional)` | Vehicle details to update. Note that modifying quote-affecting fields (isElectric/fuelType, fastCharge, testPlates, requiresC1) will return a Bad Request validation error. [object schema: `regNo` string (Optional) - Registration plate number (e.g. "ABC-123").; `make` string (Optional) - Manufacturer/make (e.g. "Toyota").; `model` string (Optional) - Model name (e.g. "Corolla").; `year` number (Optional) - Production year (e.g. 2022).; `vin` string (Optional) - Vehicle identification number (VIN).; `fuelType` string (Optional) - Fuel type of the vehicle (gasoline, electric, diesel, gas). Note: changing this to or from electric will return a 400 validation error.; `fastCharge` boolean (Optional) - Whether the vehicle supports fast charging. Note: modifying this will return a 400 validation error.; `transmission` string (Optional) - Transmission type of the vehicle (manual, automatic).; `requiresC1` boolean (Optional) - Requires C1 heavy license. Note: modifying this to true will return a 400 validation error.; `testPlates` boolean (Optional) - Requires test/dealer plates. Note: modifying this to true will return a 400 validation error.; `vehicleType` string (Optional) - Type of the vehicle (e.g. "car").] |
| **returnDrive** | `object (Optional)` | Optional return drive update details. [object schema: `vehicle` object (Optional) - Vehicle details to update for the return drive. Note that modifying quote-affecting fields (isElectric/fuelType, fastCharge, testPlates, requiresC1) will return a Bad Request validation error. Show vehicle schema `regNo` string (Optional) - Registration plate number (e.g. "ABC-123"). `make` string (Optional) - Manufacturer/make (e.g. "Toyota"). `model` string (Optional) - Model name (e.g. "Corolla"). `year` number (Optional) - Production year (e.g. 2022). `vin` string (Optional) - Vehicle identification number (VIN). `fuelType` string (Optional) - Fuel type of the vehicle (gasoline, electric, diesel, gas). Note: changing this to or from electric will return a 400 validation error. `fastCharge` boolean (Optional) - Whether the vehicle supports fast charging. Note: modifying this will return a 400 validation error. `transmission` string (Optional) - Transmission type of the vehicle (manual, automatic). `requiresC1` boolean (Optional) - Requires C1 heavy license. Note: modifying this to true will return a 400 validation error. `testPlates` boolean (Optional) - Requires test/dealer plates. Note: modifying this to true will return a 400 validation error. `vehicleType` string (Optional) - Type of the vehicle (e.g. "car").; `regNo` string (Optional) - Registration plate number (e.g. "ABC-123").; `make` string (Optional) - Manufacturer/make (e.g. "Toyota").; `model` string (Optional) - Model name (e.g. "Corolla").; `year` number (Optional) - Production year (e.g. 2022).; `vin` string (Optional) - Vehicle identification number (VIN).; `fuelType` string (Optional) - Fuel type of the vehicle (gasoline, electric, diesel, gas). Note: changing this to or from electric will return a 400 validation error.; `fastCharge` boolean (Optional) - Whether the vehicle supports fast charging. Note: modifying this will return a 400 validation error.; `transmission` string (Optional) - Transmission type of the vehicle (manual, automatic).; `requiresC1` boolean (Optional) - Requires C1 heavy license. Note: modifying this to true will return a 400 validation error.; `testPlates` boolean (Optional) - Requires test/dealer plates. Note: modifying this to true will return a 400 validation error.; `vehicleType` string (Optional) - Type of the vehicle (e.g. "car").] |

### `PUT /customers/v2/reservation/:id/reschedule`

> NOT YET SUPPORTED
>
> This endpoint is not yet supported in the backend. Currently, calling this returns a placeholder stub response.

### `POST /customers/v2/reservation/:id/cancel`

Cancels the reservation and every drive still open on it. The assigned driver is released, open offers are withdrawn and the gigs are taken off the driver app.

> Cancelling can cost money
>
> A cancellation fee is charged once a driver has been assigned, and it grows as the pickup time approaches. Call `GET /customers/v2/reservation/:id/cancellation-quote` first to see the exact figure before confirming. Cancelling is not reversible — a new reservation has to be created instead.

### Request Parameters

| Field | Type | Description |
| --- | --- | --- |
| **cancellationReason** | `string` | Why the reservation is cancelled. Required, and one of the four values below — anything else returns `400 Bad Request`. In countries priced with cancellation fee tiers (currently Spain) the value also decides who carries the cost. [accepted values: `vehicleNotAvailable` - The vehicle cannot be handed over.; `otherAddress` - The transport is needed to or from somewhere else.; `notNecessary` - The transport is no longer needed.; `other` - Anything else. Requires `additionalInformation`.] |
| **additionalInformation** | `string (Optional)` | Free-text detail stored alongside the reason, max 1000 characters. Required when the reason is `other`. |

### Responses

| Status | Description |
| --- | --- |
| **200 OK** | Cancelled. Returns `id`, `status`, `cancelledAt`, the reason as stored, and `cancellationFee` — what was actually charged (`amount` and `currency`), which is `0` when no driver had been assigned or the cancellation came early enough to cost nothing. |
| **400 Bad Request** | The cancellation reason is missing or not one of the accepted values, or `additionalInformation` is missing when the reason is `other`. |
| **404 Not Found** | No reservation with the given ID exists for your partner account. |
| **409 Conflict** | The reservation can no longer be cancelled: it is already cancelled, already completed, or its drives have departed. |

### `GET /customers/v2/reservation/:id/cancellation-quote`

What cancelling would cost right now. Read-only — it changes nothing and can be called as often as needed, and it answers with the same figure the cancel call would charge, because it runs the same calculation.

The amount can still move before you act on it: assigning a driver raises it, and it grows as the pickup time approaches. Quote it again if the decision takes a while.

### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| **amount** | `number` | What cancelling would cost, in `currency`. `0` when no driver has been assigned yet, or when the cancellation would still come early enough to cost nothing. |
| **currency** | `string` | Currency of the amount. |

### `GET /customers/v2/reservations`

Retrieves all reservations (and their associated drives/trips) belonging to the authenticated B2B customer (partner), sorted by ID in descending order (newest first). Supports cursor-based pagination.

### Query Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| **start** | `string` | Optional | The reservation ID cursor to start fetching after. If omitted, retrieves the first page. |
| **limit** | `number` | Optional | Maximum number of items to return. Default is `20`, maximum is `100`. |
| **status** | `string` | Optional | Filter reservations by simplified status. Possible values: `confirmed`, `sealed`, `cancelled`, `driving`. |
| **regNo** | `string` | Optional | Filter reservations by vehicle registration number (e.g. `ABC-123`). |

### Response Properties

Returns a paginated JSON object containing the reservations:

| Property | Type | Description |
| --- | --- | --- |
| **data** | `array` | An array of reservation objects, containing the following fields: [Reservation Fields: `reservationId` string - Unique reservation ID.; `reservationType` string - The type of reservation (must be one of: `officeToOffice`, `homeDelivery`, `serviceDrive`, `purchaseCar`, `replacementCar`, `import`).; `createdAt` string - ISO timestamp of reservation creation.; `status` string - The reservation status. Possible values: `confirmed`, `sealed`, `cancelled`.; `price` number - Billed reservation price.; `currency` string - Currency code (e.g. `EUR`).; `priceBreakdown` array - Detailed cost breakdown items (containing `type`, `amount`, and `label`).; `route` object - Route details (containing `distanceMeters` and `durationSeconds`).; `origin` object - Pickup location details (containing `officeId`, `address`, `lat`, and `lng`).; `destination` object - Dropoff location details (containing `officeId`, `address`, `lat`, and `lng`).; `schedule` object - Schedule details (containing `departAtEarliest`, `departAtLatest`, `arriveAtEarliest`, and `arriveAtLatest`).; `vehicle` object - Vehicle details (containing `regNo`, `make`, `model`, `year`, `vin`, `fuelType`, `fastCharge`, `isElectric`, `vehicleType`, `transmission`, `fuel`, `testPlates`, and `requiresC1`).; `externalId` string \| null - Your own reference for the reservation, if you sent one.; `tasks` array - Checklist tasks the driver performs before or after the drive.; `returnDrive` object (Optional) - Present only when the reservation has a return drive.] |
| **nextStart** | `string \| null` | The cursor ID to pass as the `start` query parameter to retrieve the next page of results. Null when there are no more pages. |

### `GET /customers/v2/reservation/:id`

Retrieves the full details and real-time status of a specific B2B reservation by its unique ID.

Add `?include=photos` to get the photos the driver took of the car at pickup and on delivery, as permanent public links you can store. They are left out unless asked for, so a status check stays light.

### Path Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| **id** | `string` | Yes | The unique reservation ID. |

### Query Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| **include** | `string` | No | Parts left out of the answer unless asked for, comma separated. `photos` adds the departure and delivery photos: `photos` for the drive and `returnDrive.photos` for a return drive. Any other value is refused with `400`. |

### Response Properties

Returns the full reservation object, identical to the response format of creating a reservation.

| Field | Type | Description |
| --- | --- | --- |
| **reservationId** | `string` | Unique reservation ID. |
| **reservationType** | `string` | The type of reservation (must be one of: `officeToOffice`, `homeDelivery`, `serviceDrive`, `purchaseCar`, `replacementCar`, `import`). |
| **createdAt** | `string` | ISO timestamp of reservation creation. |
| **status** | `string` | The reservation status. Possible values: `confirmed`, `sealed`, `cancelled`. |
| **price** | `number` | Billed reservation price. |
| **currency** | `string` | Currency code (e.g. `EUR`). |
| **priceBreakdown** | `array` | Detailed cost breakdown items. [object schema: `type` string - Type of price component.; `amount` number - Amount in currency units.; `label` string - Human-readable description.] |
| **route** | `object` | Route details. [object schema: `distanceMeters` number - Route distance in meters.; `durationSeconds` number - Estimated drive duration in seconds.] |
| **origin** | `object` | Pickup location details. [object schema: `officeId` string \| null - Office ID if starting at an office.; `address` object - Address details.; `lat` number - Latitude.; `lng` number - Longitude.] |
| **destination** | `object` | Dropoff location details. [object schema: `officeId` string \| null - Office ID if ending at an office.; `address` object - Address details.; `lat` number - Latitude.; `lng` number - Longitude.] |
| **schedule** | `object` | Schedule details. [object schema: `departAtEarliest` string (ISO Date) - Earliest departure time.; `departAtLatest` string (ISO Date) - Latest departure time.; `arriveAtEarliest` string (ISO Date) - Earliest arrival time.; `arriveAtLatest` string (ISO Date) - Latest arrival time.] |
| **vehicle** | `object` | Vehicle details. [object schema: `regNo` string - Registration number.; `make` string - Vehicle make.; `model` string - Vehicle model.; `year` number \| null - Vehicle year.; `vin` string \| null - VIN.; `fuelType` string - Fuel type.; `fastCharge` boolean - Whether the vehicle supports fast charging.; `isElectric` boolean - Whether the vehicle is electric.; `vehicleType` string - Type of vehicle (e.g. "car").; `transmission` string - Transmission type.; `fuel` string - Fuel info.; `testPlates` boolean - Whether test plates are used.; `requiresC1` boolean - Whether the vehicle requires a C1 heavy driver licence.] |
| **returnDrive** | `object \| null` | Return drive details if configured. [object schema: `destination` object - Return destination location details.; `route` object - Return drive route details.; `schedule` object - Return drive schedule details.; `vehicle` object - Return vehicle details.; `photos` object - Only with `?include=photos`: the return drive's departure and delivery photos, in the same shape as `photos`.] |
| **externalId** | `string \| null` | Your own reference for the reservation, as sent in `externalId` when it was booked; `null` if none was given. |
| **tasks** | `array` | Checklist tasks the driver performs before or after the drive. |
| **publicNotes** | `string \| null` | Notes visible to all drivers searching for gigs. |
| **privateNotes** | `string \| null` | Driver instructions (keys, parking info, etc.), shown only after a driver has accepted the gig. |
| **contactInfo** | `object \| null` | The pickup contact: `name`, `phone` and `email` (or `null`). |
| **recipientContactInfo** | `object \| null` | The dropoff contact, in the same shape as `contactInfo`. |
| **contactBeforeDeparture** | `boolean` | Whether the driver is asked to call the pickup contact before departing. |
| **contactBeforeDelivery** | `boolean` | Whether the driver is asked to call the dropoff contact before delivering the vehicle. |
| **accessCodes** | `object` | The access codes given at booking, in the same shape as the request: `release` and `return`, each `{ type, value }` or `null`, and `returnDrive` with the same two, or `null` when the reservation has no return drive. A file code has `type: "file"`, the file's id as `value` and its `fileName`. A key box code added in the customer portal reads as `null`. |
| **photos** | `object` | Only with `?include=photos`: the photos the driver took of this drive's car, as permanent public links. A return drive's photos are in `returnDrive.photos`, in the same shape. [example: `{ "departure": { "takenAt": "2026-06-02T08:05:12Z", "photos": [ { "url": "https://usercontent.biila.io/…/a1.jpg", "photoType": "front-left", "takenAt": "2026-06-02T08:05:12Z" } ] }, "delivery": { ... } }`] |

### `GET /customers/v2/reservation/{id}/inspection`

Returns what the driver found when they inspected the car: the whole checklist, every answer, the photos they took, and a count of anything that needs attention. Read-only — asking for a report never creates one.

An inspection happens only if you **ordered one with the booking**. Send `carInspection: true` in [POST /customers/v2/reservation](/customers/v2/docs#post-reservations); without it the driver is never shown a checklist and this endpoint reports `inspected: false`.

#### Read needsAttention, not status

The checklist is not uniformly polarised, so the answer alone does not tell you whether the car is fine. "Two keys?" is a problem when the answer is *no*; "cracks in the windshield?" is a problem when the answer is *yes*. `status` reports what was answered — `passed` is yes and `failed` is no — so a flawless windshield reads as `failed`. `needsAttention` is the verdict, and the only field that carries the polarity.

### Path Parameter

| Field | Type | Description |
| --- | --- | --- |
| **id** | `string` | The reservation id returned by `POST /customers/v2/reservation` — the same id the other v2 reservation endpoints take. A decimal string, because reservation ids are 64-bit. |

### Response Properties

One report per drive on the reservation. A booking with a return leg has two, and each is inspected separately.

| Field | Type | Description |
| --- | --- | --- |
| **reservationId** | `string` | The reservation you asked for, as a decimal string — matching what `POST /customers/v2/reservation` returns. Reservation ids are 64-bit and would lose precision as a JSON number. |
| **drives** | `array` | One inspection report per drive, described below. |
| **drives[].driveId** | `number` | The drive this report belongs to. |
| **drives[].driveType** | `string` | e.g. `purchaseCar`, `returnDrive`. |
| **drives[].vehicle** | `object` | `regNo`, `make`, `model`. |
| **drives[].inspected** | `boolean` | Whether anyone actually inspected the car. False is not the same as "found nothing" — it means nobody has looked yet. |
| **drives[].inspectedAt** | `string \| null` | When the last answer was submitted (ISO 8601, UTC). |
| **drives[].checklist** | `object \| null` | Which checklist was used: `name`, `version`, `driveType`, `publishedAt`. A report always renders from the version the car was inspected under, so a report you stored last month still reads the same after the checklist is edited. |
| **drives[].summary** | `object` | Counts over the whole checklist: `total`, `passed`, `failed`, `pending`, `informational`, and `findings`. Check `findings` first — it is the number of answers that mean something is wrong with the car. |
| **drives[].categories** | `array` | The checklist's sections, each with a `key`, a `label` and its `items`. |

### Checklist Item

| Field | Type | Description |
| --- | --- | --- |
| **key** | `string` | Stable identifier for the question, e.g. `windshield_cracks`. Match on this rather than on the label. |
| **label** | `string \| null` | The question as the driver saw it. English by default; send a `preferred-locale` header for another language, falling back to English. |
| **status** | `string` | What was answered: `passed` (yes), `failed` (no), `pending` (not answered yet), or `informational` (the question takes no yes/no answer — an odometer reading, general photos). Not a verdict; see the note above. |
| **needsAttention** | `boolean` | Whether this answer means something is wrong with the car. This is the field to branch on. |
| **value** | `boolean \| null` | The raw answer. Null when unanswered. |
| **comment** | `string \| null` | The driver's note, where one was required or given. |
| **submittedAt** | `string \| null` | When this answer was submitted (ISO 8601, UTC). |
| **photos** | `array` | Urls of the photos taken for this question. Empty when none were required or none were taken. |

### Status Codes

| Code | Meaning |
| --- | --- |
| **200** | The inspection report, one entry per drive on the reservation. |
| **400** | The reservation id is not a number. |
| **401** | Missing or unknown API key. |
| **404** | No reservation with that id belongs to your account. |

### `GET /customers/v2/connected-customers`

**For service providers.** Lists every customer that has connected to you in the Flovi portal and has not disconnected since, oldest connection first. Each row carries the customer's business ID, which is the value you send in the `x-customer-business-id` header to act for that customer on the other endpoints (see [Authentication](/customers/v2/docs#auth)).

The list is answered from your service provider key alone, so no `x-customer-business-id` header is needed here. A customer that disconnects drops off this list and is refused on the next request at the same moment. A customer's own API key gets `403`: a customer has no connections to list.

### Response Properties

The same envelope as [List Reservations](/customers/v2/docs#get-reservations), so paging can be switched on later without a contract change:

| Property | Type | Description |
| --- | --- | --- |
| **data** | `array` | The connected customers, one object each: [Customer Fields: `businessId` string - The customer's business ID (e.g. `1234567-8`). Send it as `x-customer-business-id` to act for this customer.; `name` string - The customer's company name.; `connectedAt` string - When the customer connected to you, ISO 8601.] |
| **nextStart** | `string \| null` | Reserved for paging; always `null` today. Treat a non-null value as a cursor for a later page. |

### Example

```json
{
  "data": [
    {
      "businessId": "1234567-8",
      "name": "Example Oy",
      "connectedAt": "2026-10-28T08:21:41.000Z"
    },
    {
      "businessId": "556123-4567",
      "name": "Exempel AB",
      "connectedAt": "2026-11-02T12:05:09.000Z"
    }
  ],
  "nextStart": null
}
```

### Status Codes

| Code | Meaning |
| --- | --- |
| **200** | The customers connected to you, possibly none. |
| **401** | Missing or unknown API key. |
| **403** | The key is a customer key, or a status-only service provider key. |

### `GET /customers/v2/customer-status`

**For service providers.** Tells you whether a customer Flovi onboarded for you is still `pending` or already `active`. You name the customer by the email of a user on its account, normally the owner's email you sent Flovi when you asked for the account. A new account stays `pending` until the customer has signed its contract with Flovi and Flovi has activated it. After that it is `active`, and Flovi sends you the customer's own API key for booking.

Only the customers linked to you are answered. An email Flovi does not know and one that belongs to a customer not linked to you both get the same `404`, so this endpoint cannot be used to look customers up. It is answered from your service provider key alone. A status-only key (see [Authentication](/customers/v2/docs#auth-status-only)) opens this endpoint and nothing else.

### Query Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| **email** | `string` | Required | The email of a user on the customer account, normally the owner's, as you sent it to Flovi. Not case-sensitive. URL-encode it (a `+` in the address becomes `%2B`). |

### Response Properties

| Property | Type | Description |
| --- | --- | --- |
| **email** | `string` | The matched user's email, as Flovi has it. |
| **status** | `string` | `pending` until Flovi activates the customer account, `active` from then on. |

### Example

```
curl "https://customer-api.flovi.io/customers/v2/customer-status?email=owner%40workshop.pl" \
  -H "x-api-key: YOUR_SERVICE_PROVIDER_KEY"
```

### Example

```json
{
  "email": "owner@workshop.pl",
  "status": "pending"
}
```

### Status Codes

| Code | Meaning |
| --- | --- |
| **200** | The customer's status. |
| **400** | `email` is missing or not an email address. |
| **401** | Missing or unknown API key. |
| **403** | The key is a customer key, not a service provider key. |
| **404** | No customer with this email is linked to you. |
| **429** | More than 30 checks a minute with your key. Wait a minute and try again. |

## Webhooks

Flovi supports webhooks to notify your application in real-time about important events. This allows your system to react to changes automatically without polling the API.

### Creating Webhooks

Go to [https://customer.flovi.io/organisation/settings](https://customer.flovi.io/organisation/settings), click on **Webhooks -> Add**. Enter your desired URL and choose the events you want to subscribe to.

### `Webhook reservation_status_change`

The `reservation_status_change` webhook is triggered whenever the status of a reservation is updated.

#### Supported Events

This webhook may be triggered for the following events:

- `created` - A reservation has been created.
- `taken` – All the drives in reservation has assigned.
- `driving` – A drive of the reservation has started. A reservation with more than one drive, such as an outbound drive and a return drive, sends it once per drive; each drive's `departed_at` shows which have left.
- `sealed` – The reservation is completed and sealed.
- `final_costs` - After two weeks of reservation sealing webhook is called to inform total costs. Format is the same as state: sealed, but also includes vehicles information.
- `cancelled` - The reservation is cancelled.

#### Drives Data

Every webhook payload includes a `drives` array. This array contains one or more drive objects that represent the actual legs of the reservation.

| Field | Type | Description |
| --- | --- | --- |
| **driver** | `object \| null` | Driver information. `null` if the driver has not been assigned yet. [Fields: name (string): Full name of the driver.; phone (string): International format phone number.; freelancer (boolean): `true` if freelancer, `false` if employee.] |
| **origin** | `object` | Pickup location details. [Fields: address (string): Street address.; zip, city, country (string): Postal code, city, and ISO country code.; latitude, longitude (float): Coordinates.] |
| **destination** | `object` | Drop-off location details. Same structure as `origin`. |
| **vehicle** | `object \| null` | Vehicle information. `null` if no license plate is assigned. [Fields: license_plate (string): Registration number.; make, model, year (string): Vehicle details.] |
| **distance** | `integer` | Estimated or actual distance in meters. |
| **duration** | `integer` | Estimated or actual duration in seconds. |
| **departed_at** | `string \| null` | Actual departure timestamp in UTC (ISO 8601). |
| **arrived_at** | `string \| null` | Actual arrival timestamp in UTC (ISO 8601). |
| **schedule** | `object \| null` | Time windows for the drive. [Fields: depart_at_earliest, depart_at_latest (string \| null): Departure window (UTC).; arrive_at_earliest, arrive_at_latest (string \| null): Arrival window (UTC).] |

> Cancelled event also adds `cancellation_reason` field. Possible reasons are: `DOUBLE_BOOKING`, `NO_DRIVER_WAS_FOUND`, `DRIVER_CANCELED_OR_NOT_ARRIVED`, `SCHEDULE_ISSUE`, `DRIVER_WAS_FOUND_THROUGH_ANOTHER_WAY`, `UNTRANSPORTABLE_VEHICLE` and `OTHER_REASON`

### Webhook Security

To ensure the authenticity of incoming webhook requests, each request includes a signature header that can be used to verify the request was sent by Flovi.

#### Secret & Signature

When you configure a webhook endpoint, you'll receive a webhook secret. This secret is used to sign each payload using HMAC SHA256.

- **Header**: `x-hub-signature`
- **Signature Method**: HMAC SHA256
- **Secret**: Provided in the Flovi Dashboard

#### Calculating Signature

To verify that a webhook request is legitimate, you can compute the HMAC SHA256 signature of the request body using your webhook secret. Here's how to calculate the signature:

1. **Obtain the webhook secret**  You can find your secret in the Flovi Dashboard. Keep it safe and never expose it publicly.
2. **Extract the request body**  Read the raw request body exactly as it was received, without any modifications.
3. **Compute the HMAC SHA256 hash**  Use the webhook secret as the key and the raw request body as the message. The output should be a lowercase hexadecimal string.
4. **Compare with the x-hub-signature header**  The signature sent by Flovi is included in the `x-hub-signature` header. Compare it against your computed hash to confirm authenticity.

#### Example (in Node.js)

```
const crypto = require("crypto");

function computeSignature(secret, rawBody) {
  return crypto
    .createHmac("sha256", secret)
    .update(rawBody, "utf8")
    .digest("hex");
}
```

#### Example Headers

```
content-length: 16
x-hub-signature: sha256=981c0223305427406b22a4694022562be103419c89e31ee06de2dd9f96f92238
content-type: application/json
user-agent: GuzzleHttp/7
host: webhook.site
```
