{"openrpc":"1.2.6","info":{"title":"Mekago MCP API","version":"1.0.0","description":"JSON-RPC 2.0 API for the Mekago platform. Usable via an MCP client (Claude Desktop, Claude Web) or M2M with OAuth 2.0 client_credentials."},"servers":[{"name":"Mekago MCP","url":"https://www.mekago.fr/mcp"}],"methods":[{"name":"customers-search","description":"Search for customers with optional filters. Available to admins (all customers) and mechanics (customers from their garages). Supports filters: garageId, lastname, firstname, email, phone.","params":[{"name":"garageId","description":"Garage ID to filter customers (optional, mechanics search in all their garages by default)","required":false,"schema":{"description":"Garage ID to filter customers (optional, mechanics search in all their garages by default)","type":"string"}},{"name":"lastname","description":"Filter by lastname (case-insensitive contains)","required":false,"schema":{"description":"Filter by lastname (case-insensitive contains)","type":"string","maxLength":30}},{"name":"firstname","description":"Filter by firstname (case-insensitive contains)","required":false,"schema":{"description":"Filter by firstname (case-insensitive contains)","type":"string","maxLength":30}},{"name":"email","description":"Filter by email (case-insensitive contains)","required":false,"schema":{"description":"Filter by email (case-insensitive contains)","type":"string","maxLength":254}},{"name":"phone","description":"Filter by phone (substring)","required":false,"schema":{"description":"Filter by phone (substring)","type":"string","maxLength":20}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Customer identifier."},"firstName":{"description":"First name of the customer.","type":"string"},"lastName":{"description":"Last name of the customer.","type":"string"}},"required":["id"],"additionalProperties":{}},"description":"The customers matching the search criteria."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-profile-get","description":"Returns the profile (name, email, phone) of the authenticated customer. Falls back to the user identity when no customer profile exists.","params":[],"result":{"name":"result","schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"customerId":{"description":"Customer identifier, absent when the user has no customer profile yet.","type":"string"},"firstName":{"description":"First name of the customer.","type":"string"},"lastName":{"description":"Last name of the customer.","type":"string"},"email":{"description":"Email address of the customer.","type":"object","properties":{"value":{"type":"string","description":"Email address."}},"required":["value"],"additionalProperties":{}},"phone":{"description":"Phone number of the customer, in E.164 format.","type":"string"}},"additionalProperties":false,"description":"The profile of the authenticated customer, falling back to the user identity."}},"required":["profile"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-profile-update","description":"Updates the profile (firstName, lastName, phone) of the authenticated customer.","params":[{"name":"firstName","description":"Customer first name","required":false,"schema":{"description":"Customer first name","type":"string","minLength":1,"maxLength":30}},{"name":"lastName","description":"Customer last name","required":false,"schema":{"description":"Customer last name","type":"string","minLength":1,"maxLength":30}},{"name":"phone","description":"Customer phone number in E.164 format (e.g. +33612345678)","required":false,"schema":{"description":"Customer phone number in E.164 format (e.g. +33612345678)","type":"string","minLength":6,"pattern":"^\\+\\d{6,15}$"}}],"result":{"name":"result","schema":{"type":"object","properties":{"updated":{"type":"boolean","description":"Always true when the profile was updated."},"profile":{"type":"object","properties":{"customerId":{"type":"string","description":"Customer identifier."},"firstName":{"description":"First name of the customer.","type":"string"},"lastName":{"description":"Last name of the customer.","type":"string"},"email":{"description":"Email address of the customer.","type":"object","properties":{"value":{"type":"string","description":"Email address."}},"required":["value"],"additionalProperties":{}},"phone":{"description":"Phone number of the customer, in E.164 format.","type":"string"}},"required":["customerId"],"additionalProperties":false}},"required":["updated","profile"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-vehicles-list","description":"Returns a list of vehicles for the authenticated customer. Admins can specify a customerId to list vehicles for any customer.","params":[{"name":"customerId","description":"Customer ID (admin only - to list vehicles for a specific customer)","required":false,"schema":{"description":"Customer ID (admin only - to list vehicles for a specific customer)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Customer vehicle identifier."},"customerId":{"description":"Identifier of the person holding the vehicle; absent when a company holds it.","type":"string"},"companyId":{"description":"Identifier of the company holding the vehicle; absent when a person holds it.","type":"string"},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"energy":{"type":"string","description":"Energy type of the vehicle."},"type":{"type":"string","description":"Category of the vehicle."},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mileage":{"description":"Odometer reading in kilometers last reported by the customer when booking; absent when never provided.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","makeId","modelId","energy","type"],"additionalProperties":{}},"description":"The vehicles owned by the customer."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-vehicle-get","description":"Returns a specific vehicle owned by the authenticated customer. Admins can specify a customerId to access any customer's vehicle.","params":[{"name":"vehicleId","description":"Customer vehicle ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer vehicle ID"}},{"name":"customerId","description":"Customer ID (admin only - to access a specific customer's vehicle)","required":false,"schema":{"description":"Customer ID (admin only - to access a specific customer's vehicle)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Customer vehicle identifier."},"customerId":{"description":"Identifier of the person holding the vehicle; absent when a company holds it.","type":"string"},"companyId":{"description":"Identifier of the company holding the vehicle; absent when a person holds it.","type":"string"},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"energy":{"type":"string","description":"Energy type of the vehicle."},"type":{"type":"string","description":"Category of the vehicle."},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mileage":{"description":"Odometer reading in kilometers last reported by the customer when booking; absent when never provided.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","makeId","modelId","energy","type"],"additionalProperties":{},"description":"The requested customer vehicle."}},"required":["vehicle"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-vehicle-add","description":"Adds a new vehicle to the authenticated customer's account. When the customer belongs to a company holding a vehicle with this license plate, links them as a driver of that vehicle instead of creating a record (created: false); the given make, model, energy, type and VIN are then ignored, and the company vehicle cannot yet be read or booked through the customer tools (#2189). Admins can specify a customerId to add a vehicle to any customer's account.","params":[{"name":"makeId","description":"Vehicle make ID","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle make ID"}},{"name":"modelId","description":"Vehicle model ID","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle model ID"}},{"name":"energy","description":"Vehicle energy type: diesel, gasoline, electric, hybrid=gasoline hybrid, diesel_electric=diesel hybrid, lpg","required":true,"schema":{"type":"string","enum":["diesel","gasoline","electric","hybrid","diesel_electric","lpg"],"description":"Vehicle energy type: diesel, gasoline, electric, hybrid=gasoline hybrid, diesel_electric=diesel hybrid, lpg"}},{"name":"type","description":"Vehicle type: v=voiture, m=moto, c=camion","required":true,"schema":{"type":"string","enum":["v","m","c"],"description":"Vehicle type: v=voiture, m=moto, c=camion"}},{"name":"licensePlate","description":"Vehicle license plate (e.g. AB-123-CD)","required":false,"schema":{"description":"Vehicle license plate (e.g. AB-123-CD)","type":"string","maxLength":12}},{"name":"vin","description":"Vehicle VIN number","required":false,"schema":{"description":"Vehicle VIN number","type":"string","maxLength":17}},{"name":"customerId","description":"Customer ID (admin only - to add a vehicle to a specific customer's account)","required":false,"schema":{"description":"Customer ID (admin only - to add a vehicle to a specific customer's account)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Customer vehicle identifier."},"customerId":{"description":"Identifier of the person holding the vehicle; absent when a company holds it.","type":"string"},"companyId":{"description":"Identifier of the company holding the vehicle; absent when a person holds it.","type":"string"},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"energy":{"type":"string","description":"Energy type of the vehicle."},"type":{"type":"string","description":"Category of the vehicle."},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mileage":{"description":"Odometer reading in kilometers last reported by the customer when booking; absent when never provided.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","makeId","modelId","energy","type"],"additionalProperties":{},"description":"The vehicle that was added, or the company vehicle the customer now drives."},"created":{"type":"boolean","description":"True when a vehicle record was saved in the name of the customer; false when the customer was linked as a driver to the existing vehicle of a company they belong to; the given make, model, energy, type and VIN are then ignored, and the company vehicle cannot yet be read or booked through the customer tools (#2189)."}},"required":["vehicle","created"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-vehicle-update","description":"Updates an existing vehicle owned by the authenticated customer. Admins can specify a customerId to update any customer's vehicle.","params":[{"name":"vehicleId","description":"Customer vehicle ID to update","required":true,"schema":{"type":"string","minLength":1,"description":"Customer vehicle ID to update"}},{"name":"makeId","description":"Vehicle make ID","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle make ID"}},{"name":"modelId","description":"Vehicle model ID","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle model ID"}},{"name":"energy","description":"Vehicle energy type: diesel, gasoline, electric, hybrid=gasoline hybrid, diesel_electric=diesel hybrid, lpg","required":true,"schema":{"type":"string","enum":["diesel","gasoline","electric","hybrid","diesel_electric","lpg"],"description":"Vehicle energy type: diesel, gasoline, electric, hybrid=gasoline hybrid, diesel_electric=diesel hybrid, lpg"}},{"name":"type","description":"Vehicle type: v=voiture, m=moto, c=camion","required":true,"schema":{"type":"string","enum":["v","m","c"],"description":"Vehicle type: v=voiture, m=moto, c=camion"}},{"name":"licensePlate","description":"Vehicle license plate (e.g. AB-123-CD)","required":false,"schema":{"description":"Vehicle license plate (e.g. AB-123-CD)","type":"string","maxLength":12}},{"name":"vin","description":"Vehicle VIN number","required":false,"schema":{"description":"Vehicle VIN number","type":"string","maxLength":17}},{"name":"customerId","description":"Customer ID (admin only - to update a specific customer's vehicle)","required":false,"schema":{"description":"Customer ID (admin only - to update a specific customer's vehicle)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Customer vehicle identifier."},"customerId":{"description":"Identifier of the person holding the vehicle; absent when a company holds it.","type":"string"},"companyId":{"description":"Identifier of the company holding the vehicle; absent when a person holds it.","type":"string"},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"energy":{"type":"string","description":"Energy type of the vehicle."},"type":{"type":"string","description":"Category of the vehicle."},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mileage":{"description":"Odometer reading in kilometers last reported by the customer when booking; absent when never provided.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","makeId","modelId","energy","type"],"additionalProperties":{},"description":"The vehicle after the update."},"updated":{"type":"boolean","description":"Always true when the vehicle was updated."}},"required":["vehicle","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-reservations-list","description":"Returns the reservations the authenticated customer drives. Admins can specify a customerId to list the reservations that customer drives.","params":[{"name":"customerId","description":"Customer ID of the driver (admin only; omit to list the reservations the authenticated customer drives)","required":false,"schema":{"description":"Customer ID of the driver (admin only; omit to list the reservations the authenticated customer drives)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"reservationId":{"type":"string","description":"Reservation identifier."},"customerId":{"type":"string","description":"Identifier of the driver of the reservation, the person whose name and contact details are returned."},"garageId":{"type":"string","description":"Identifier of the garage handling the intervention."},"status":{"type":"string","description":"Current reservation status."},"startDate":{"type":"string","description":"ISO-8601 start of the intervention."},"endDate":{"type":"string","description":"ISO-8601 end of the intervention."},"dropOffDate":{"type":"string","description":"ISO-8601 moment the vehicle is dropped off."},"customerVehicle":{"type":"object","properties":{"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"makeLabel":{"type":"string","description":"Display label of the vehicle make."},"modelLabel":{"type":"string","description":"Display label of the vehicle model."},"licensePlate":{"description":"License plate of the vehicle, absent when the customer did not provide it.","type":"string"},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["makeId","modelId","makeLabel","modelLabel"],"additionalProperties":{},"description":"The vehicle being serviced."}},"required":["reservationId","customerId","garageId","status","startDate","endDate","dropOffDate","customerVehicle"],"additionalProperties":{}},"description":"The reservations of the customer."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-reservation-get","description":"Returns a specific reservation the authenticated customer drives. Admins can specify the customerId of its driver.","params":[{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"customerId","description":"Customer ID of the driver (admin only; omit to use the reservation's driver)","required":false,"schema":{"description":"Customer ID of the driver (admin only; omit to use the reservation's driver)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservation":{"type":"object","properties":{"reservationId":{"type":"string","description":"Reservation identifier."},"customerId":{"type":"string","description":"Identifier of the driver of the reservation, the person whose name and contact details are returned."},"garageId":{"type":"string","description":"Identifier of the garage handling the intervention."},"status":{"type":"string","description":"Current reservation status."},"startDate":{"type":"string","description":"ISO-8601 start of the intervention."},"endDate":{"type":"string","description":"ISO-8601 end of the intervention."},"dropOffDate":{"type":"string","description":"ISO-8601 moment the vehicle is dropped off."},"customerVehicle":{"type":"object","properties":{"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"makeLabel":{"type":"string","description":"Display label of the vehicle make."},"modelLabel":{"type":"string","description":"Display label of the vehicle model."},"licensePlate":{"description":"License plate of the vehicle, absent when the customer did not provide it.","type":"string"},"year":{"description":"Vehicle year reported by the license plate or VIN lookup when the vehicle was saved; absent when unknown.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["makeId","modelId","makeLabel","modelLabel"],"additionalProperties":{},"description":"The vehicle being serviced."}},"required":["reservationId","customerId","garageId","status","startDate","endDate","dropOffDate","customerVehicle"],"additionalProperties":{},"description":"The requested reservation."}},"required":["reservation"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-reservation-cancel","description":"Cancels a reservation for the authenticated customer. Only the driver of the reservation can cancel it. Only PENDING or CONFIRMED reservations more than 24 hours before the drop-off can be cancelled. A quote request scheduled on this reservation goes back to ACCEPTED (or CLOSED/CANCELLED when it can no longer be booked).","params":[{"name":"reservationId","description":"Reservation ID to cancel","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID to cancel"}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the cancelled reservation."},"cancelled":{"type":"boolean","description":"Always true once the reservation is cancelled."},"previousStatus":{"type":"string","description":"Status the reservation held before the cancellation."}},"required":["reservationId","cancelled","previousStatus"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-reservation-create","description":"Creates a reservation for the authenticated customer. Requires a customer vehicle, a garage offering from customer-garage-offerings-list and a slot from customer-garage-availability-get. Admins can specify a customerId to create a reservation for any customer.","params":[{"name":"customerVehicleId","description":"Customer vehicle ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer vehicle ID"}},{"name":"garageOfferingId","description":"Garage offering ID, as returned by customer-garage-offerings-list","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID, as returned by customer-garage-offerings-list"}},{"name":"date","description":"Reservation date (YYYY-MM-DD), as returned by customer-garage-availability-get","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Reservation date (YYYY-MM-DD), as returned by customer-garage-availability-get"}},{"name":"startTime","description":"Start time in minutes from midnight, as returned by customer-garage-availability-get","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start time in minutes from midnight, as returned by customer-garage-availability-get"}},{"name":"endTime","description":"End time in minutes from midnight, as returned by customer-garage-availability-get","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End time in minutes from midnight, as returned by customer-garage-availability-get"}},{"name":"dropOffTime","description":"Drop-off time in minutes from midnight, as returned by customer-garage-availability-get. When omitted, the garage schedule picks the drop-off time for the slot","required":false,"schema":{"description":"Drop-off time in minutes from midnight, as returned by customer-garage-availability-get. When omitted, the garage schedule picks the drop-off time for the slot","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"name":"customerId","description":"Customer ID (admin only - to create a reservation for a specific customer)","required":false,"schema":{"description":"Customer ID (admin only - to create a reservation for a specific customer)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the reservation that was created."}},"required":["reservationId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-reservation-reschedule","description":"Reschedules a reservation for the authenticated customer to a new date and time. Only the driver of the reservation can reschedule it. Only PENDING or CONFIRMED reservations more than 24 hours before the drop-off can be rescheduled. Validates availability before rescheduling.","params":[{"name":"reservationId","description":"Reservation ID to reschedule","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID to reschedule"}},{"name":"date","description":"New reservation date (YYYY-MM-DD)","required":true,"schema":{"type":"string","minLength":1,"description":"New reservation date (YYYY-MM-DD)"}},{"name":"startTime","description":"New start time in minutes from midnight","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"New start time in minutes from midnight"}},{"name":"endTime","description":"New end time in minutes from midnight","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"New end time in minutes from midnight"}},{"name":"dropOffTime","description":"Drop-off time of the chosen slot in minutes from midnight, as returned by customer-garage-availability-get. When omitted, the garage schedule picks the drop-off time for the slot.","required":false,"schema":{"description":"Drop-off time of the chosen slot in minutes from midnight, as returned by customer-garage-availability-get. When omitted, the garage schedule picks the drop-off time for the slot.","type":"integer","minimum":0,"maximum":1440}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the rescheduled reservation."},"date":{"type":"string","description":"New date of the intervention, as YYYY-MM-DD."},"startTime":{"type":"number","description":"New start time, in minutes since midnight."},"endTime":{"type":"number","description":"New end time, in minutes since midnight."}},"required":["reservationId","date","startTime","endTime"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-garage-offerings-list","description":"Returns the offerings a customer can book at a garage, with their duration and hourly rate. Pass customerVehicleId to keep only the offerings that vehicle can book. Use the returned id as garageOfferingId in customer-garage-availability-get and customer-reservation-create. Admins can specify a customerId to list them for any customer's vehicle.","params":[{"name":"garageId","description":"Garage ID, as returned by garage-search","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID, as returned by garage-search"}},{"name":"customerVehicleId","description":"Customer vehicle to book for. Narrows the list to the offerings this vehicle can book, including the fleet offerings authorized for its plate.","required":false,"schema":{"description":"Customer vehicle to book for. Narrows the list to the offerings this vehicle can book, including the fleet offerings authorized for its plate.","type":"string","minLength":1}},{"name":"customerId","description":"Customer ID (admin only - to list the offerings bookable for a specific customer's vehicle)","required":false,"schema":{"description":"Customer ID (admin only - to list the offerings bookable for a specific customer's vehicle)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier, to pass as garageOfferingId when booking."},"name":{"type":"string","description":"Name of the offering."},"description":{"type":"string","description":"Description of the offering."},"categoryId":{"type":"string","description":"Identifier of the offering category."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"hourlyRateWithVat":{"description":"Hourly labor rate including VAT, in centimes. Absent when the garage has not set one, or when the offering is covered by the manufacturer.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer covers the intervention, as for a manufacturer recall. No hourly rate is given; any additional work is quoted by the garage."}},"required":["id","name","description","categoryId","estimatedDuration","isManufacturerCovered"],"additionalProperties":{}},"description":"The offerings the customer can book at the garage."},"blockedByNetwork":{"type":"boolean","description":"True when the vehicle fleet restricts it to a garage network that excludes this garage and no fleet authorization covers this garage. No offering can be booked then. Always false without customerVehicleId."},"unsupportedVehicle":{"type":"boolean","description":"True when the garage does not service the energy or type of the vehicle. No offering can be booked then. Always false without customerVehicleId."}},"required":["count","items","blockedByNetwork","unsupportedVehicle"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-garage-availability-get","description":"Returns the slots a customer can book for a garage offering, day by day, within the next 30 days. Pass customerVehicleId to check the offering is bookable for that vehicle, and reservationId when looking for a new slot for an existing reservation. Pass the date of the day and the chosen slot dropOffTime, startTime and endTime unchanged to customer-reservation-create. With reservationId, pass the date and the chosen slot dropOffTime, startTime and endTime unchanged to customer-reservation-reschedule instead.","params":[{"name":"garageOfferingId","description":"Garage offering ID, as returned by customer-garage-offerings-list","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID, as returned by customer-garage-offerings-list"}},{"name":"customerVehicleId","description":"Customer vehicle to book for. Defaults to the vehicle of reservationId. Without any vehicle, fleet-only offerings are refused and make restrictions are not checked.","required":false,"schema":{"description":"Customer vehicle to book for. Defaults to the vehicle of reservationId. Without any vehicle, fleet-only offerings are refused and make restrictions are not checked.","type":"string","minLength":1}},{"name":"reservationId","description":"Reservation of the customer being rescheduled. Its own slot is then counted as free.","required":false,"schema":{"description":"Reservation of the customer being rescheduled. Its own slot is then counted as free.","type":"string","minLength":1}},{"name":"customerId","description":"Customer ID (admin only - to check the slots for a specific customer's vehicle)","required":false,"schema":{"description":"Customer ID (admin only - to check the slots for a specific customer's vehicle)","type":"string"}},{"name":"date","description":"Only return the slots of this day (YYYY-MM-DD). Cannot be combined with fromDate or numDates","required":false,"schema":{"description":"Only return the slots of this day (YYYY-MM-DD). Cannot be combined with fromDate or numDates","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"fromDate","description":"First day to search from (YYYY-MM-DD). Defaults to today. Days before today or more than 30 days ahead are never bookable","required":false,"schema":{"description":"First day to search from (YYYY-MM-DD). Defaults to today. Days before today or more than 30 days ahead are never bookable","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"numDates","description":"Number of days to search (1-30, default 30)","required":false,"schema":{"description":"Number of days to search (1-30, default 30)","type":"integer","minimum":1,"maximum":30}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Day of the availabilities, as YYYY-MM-DD."},"hours":{"type":"array","items":{"type":"object","properties":{"dropOffTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Time the customer drops the vehicle off, in minutes since midnight. Not used for the offerings where the garage picks the vehicle up, where the pickup happens at startTime (still pass it unchanged)."},"startTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the intervention, in minutes since midnight."},"endTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End of the intervention, in minutes since midnight."}},"required":["dropOffTime","startTime","endTime"],"additionalProperties":{}},"description":"Bookable slots on that day. Pass dropOffTime, startTime and endTime unchanged when booking."}},"required":["date","hours"],"additionalProperties":{}},"description":"The days holding at least one bookable slot."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservations-list","description":"Returns a list of reservations for the garage. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"fromDate","description":"Start date filter (ISO 8601)","required":false,"schema":{"description":"Start date filter (ISO 8601)","type":"string"}},{"name":"toDate","description":"End date filter (ISO 8601)","required":false,"schema":{"description":"End date filter (ISO 8601)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reservation identifier."},"customerVehicleId":{"type":"string","description":"Identifier of the vehicle being serviced."},"driverId":{"type":"string","description":"Identifier of the person who brings the vehicle and is notified about the reservation."},"driver":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the driver."},"firstName":{"description":"First name of the driver.","type":"string"},"lastName":{"description":"Last name of the driver.","type":"string"},"email":{"description":"Email of the driver, absent when unknown.","type":"string"},"phone":{"description":"Phone of the driver, absent when unknown.","type":"string"},"secondaryPhone":{"description":"Secondary phone the garage recorded for the driver; never verified, never texted. Absent when none.","type":"string"}},"required":["id"],"additionalProperties":{},"description":"The person who brings the vehicle and is notified about the reservation."},"startDate":{"type":"string","description":"ISO-8601 start of the intervention."},"endDate":{"type":"string","description":"ISO-8601 end of the intervention."},"status":{"type":"string","description":"Current reservation status."}},"required":["id","customerVehicleId","driverId","driver","startDate","endDate","status"],"additionalProperties":{}},"description":"The reservations of the garage."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-calendar-events-list","description":"Returns a list of calendar events for the garage. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"fromDate","description":"Start date filter (ISO 8601)","required":false,"schema":{"description":"Start date filter (ISO 8601)","type":"string"}},{"name":"toDate","description":"End date filter (ISO 8601)","required":false,"schema":{"description":"End date filter (ISO 8601)","type":"string"}},{"name":"mechanicIds","description":"Comma-separated mechanic IDs to filter by","required":false,"schema":{"description":"Comma-separated mechanic IDs to filter by","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier."}},"required":["id"],"additionalProperties":{}},"description":"The calendar events of the garage over the requested period."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-garages-list","description":"Lists all garages where the authenticated user is an active mechanic. Admins see all garages.","params":[],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"address":{"type":"object","properties":{"id":{"type":"string","description":"Address identifier."},"name":{"type":"string","description":"Name the address is registered under."},"streetNumber":{"type":"string","description":"Street number."},"line1":{"type":"string","description":"First address line."},"line2":{"type":"string","description":"Second address line."},"postalCode":{"type":"string","description":"Postal code."},"city":{"type":"string","description":"City."},"lat":{"type":"number","description":"Latitude in decimal degrees."},"lon":{"type":"number","description":"Longitude in decimal degrees."}},"required":["id","name","streetNumber","line1","line2","postalCode","city","lat","lon"],"additionalProperties":{},"description":"Postal address of the garage."}},"required":["id","name","address"],"additionalProperties":{}},"description":"The garages the mechanic works for."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-info-get","description":"Returns garage information. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage, with its address, business hours and closing periods."}},"required":["garage"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-update-status","description":"Updates the status of a reservation. Accessible by mechanics of the garage or admins. Valid statuses: PENDING, CONFIRMED, IN_PROGRESS, COMPLETED, NO_SHOW. Allowed transitions: a PENDING, CONFIRMED or IN_PROGRESS reservation can move to any of these statuses; a COMPLETED reservation cannot change status; a NO_SHOW one can only move to COMPLETED; a CANCELLED reservation cannot change status. NO_SHOW records a missed drop-off and releases the service slot of the mechanic: it is refused on a pickup, once the vehicle was received or is ready, and before the drop-off time. Setting a reservation to its current status leaves it unchanged. This tool cannot cancel a reservation.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"status","description":"New reservation status","required":true,"schema":{"type":"string","enum":["PENDING","CONFIRMED","IN_PROGRESS","COMPLETED","NO_SHOW"],"description":"New reservation status"}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the updated reservation."},"newStatus":{"type":"string","description":"Status the reservation now holds."},"updated":{"type":"boolean","description":"Always true when the status was updated."}},"required":["reservationId","newStatus","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-create","description":"Creates a new reservation in the garage for a vehicle of its customer file; the customer of the reservation is the holder of the vehicle (a person or a company), and its driver defaults to the holding person or the company manager. Accepts mechanicId or externalId (scoped to the garageId) to identify the mechanic. Accessible by mechanics of the garage or admins. A vehicle held by a company with no active contact is refused (VEHICLE_HOLDER_CONTACT_MISSING). On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. An optional clientContactId names the manager who is the client contact of a company reservation, refused when not a live contact of the holding company (CLIENT_CONTACT_NOT_ALLOWED).","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"customerId","description":"Deprecated: the customer is the holder of the vehicle. When given, it must be the person holding the vehicle, otherwise the call is refused with VEHICLE_HOLDER_MISMATCH.","required":false,"schema":{"description":"Deprecated: the customer is the holder of the vehicle. When given, it must be the person holding the vehicle, otherwise the call is refused with VEHICLE_HOLDER_MISMATCH.","type":"string","minLength":1}},{"name":"customerVehicleId","description":"Customer vehicle ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer vehicle ID"}},{"name":"garageOfferingId","description":"Garage offering ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID"}},{"name":"mechanicId","description":"Mechanic ID. Provide this OR externalId to identify the mechanic.","required":false,"schema":{"description":"Mechanic ID. Provide this OR externalId to identify the mechanic.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable mechanic identifier, scoped to the provided garageId.","required":false,"schema":{"description":"DMS-provided stable mechanic identifier, scoped to the provided garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"scheduledDate","description":"Scheduled date (YYYY-MM-DD)","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Scheduled date (YYYY-MM-DD)"}},{"name":"startTime","description":"Start time (HH:mm)","required":true,"schema":{"type":"string","pattern":"^([01]?\\d|2[0-3]):[0-5]\\d$","description":"Start time (HH:mm)"}},{"name":"endTime","description":"End time (HH:mm)","required":true,"schema":{"type":"string","pattern":"^([01]?\\d|2[0-3]):[0-5]\\d$","description":"End time (HH:mm)"}},{"name":"clientContactId","description":"Customer ID of the manager who is the client contact of the reservation on a vehicle a company holds: they receive the invitation as the client and are its customer in the calendar and the webhooks, while driverId sets the driver apart. They must be a live contact of the holding company, otherwise the call is refused (CLIENT_CONTACT_NOT_ALLOWED), as it is on a vehicle a person holds. Omit it to let the server choose: the driver when they are a live contact of the holding company, else its oldest live contact; the same choice applies once the stored contact is no longer a live contact.","required":false,"schema":{"description":"Customer ID of the manager who is the client contact of the reservation on a vehicle a company holds: they receive the invitation as the client and are its customer in the calendar and the webhooks, while driverId sets the driver apart. They must be a live contact of the holding company, otherwise the call is refused (CLIENT_CONTACT_NOT_ALLOWED), as it is on a vehicle a person holds. Omit it to let the server choose: the driver when they are a live contact of the holding company, else its oldest live contact; the same choice applies once the stored contact is no longer a live contact.","type":"string","minLength":1}},{"name":"driverId","description":"Customer ID of the person who brings the vehicle and is notified. Omit or send null for the default: the person holding the vehicle, or the manager of the company holding it. An explicit driver must be in the garage customer file or already attached to the vehicle (driver of it, member of the holding company, or driver of another live vehicle of the holding person), otherwise the call is refused (DRIVER_NOT_ALLOWED). On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. Any other driver is then linked to the vehicle and, on a company vehicle, added as a driver of the company when not already a member. A deleted or banned customer is refused, and a vehicle removed by its holder only accepts its default driver (DRIVER_NOT_ALLOWED). When outside the garage customer file, the driver (explicit or default) is added to it.","required":false,"schema":{"description":"Customer ID of the person who brings the vehicle and is notified. Omit or send null for the default: the person holding the vehicle, or the manager of the company holding it. An explicit driver must be in the garage customer file or already attached to the vehicle (driver of it, member of the holding company, or driver of another live vehicle of the holding person), otherwise the call is refused (DRIVER_NOT_ALLOWED). On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. Any other driver is then linked to the vehicle and, on a company vehicle, added as a driver of the company when not already a member. A deleted or banned customer is refused, and a vehicle removed by its holder only accepts its default driver (DRIVER_NOT_ALLOWED). When outside the garage customer file, the driver (explicit or default) is added to it.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the reservation that was created."},"created":{"type":"boolean","description":"Always true when the reservation was created."}},"required":["reservationId","created"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-update","description":"Updates an existing reservation in the garage; the customer of the reservation is the holder of the vehicle. Moving the reservation to another vehicle requires that vehicle to be in the garage customer file; otherwise the call is refused. Accessible by mechanics of the garage or admins. Only PENDING, CONFIRMED or IN_PROGRESS reservations can be edited; COMPLETED, NO_SHOW and CANCELLED reservations are rejected. Omitted garageComment and partsStatus keep their values; an omitted driverId keeps the driver unless the vehicle changes, then the new vehicle's default driver. When dropOffTime is omitted, the current drop-off and receptionist are kept if the date, start time and offering are unchanged, otherwise both are recomputed. When dropOffTime is given, an omitted receptionistId keeps the current receptionist (rejected if unavailable at that time), or stays unassigned if there is none. A vehicle held by a company with no active contact is refused (VEHICLE_HOLDER_CONTACT_MISSING), even when an update keeps the same vehicle. On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. An optional clientContactId names the manager who is the client contact of a company reservation, refused when not a live contact of the holding company (CLIENT_CONTACT_NOT_ALLOWED). Moving the reservation to another vehicle or another driver unschedules the quote request it was booked from.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"customerId","description":"Deprecated: the customer is the holder of the vehicle. When given, it must be the person holding the vehicle, otherwise the call is refused with VEHICLE_HOLDER_MISMATCH.","required":false,"schema":{"description":"Deprecated: the customer is the holder of the vehicle. When given, it must be the person holding the vehicle, otherwise the call is refused with VEHICLE_HOLDER_MISMATCH.","type":"string","minLength":1}},{"name":"customerVehicleId","description":"Customer vehicle ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer vehicle ID"}},{"name":"garageOfferingId","description":"Garage offering ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID"}},{"name":"mechanicId","description":"Mechanic ID","required":true,"schema":{"type":"string","minLength":1,"description":"Mechanic ID"}},{"name":"scheduledDate","description":"Scheduled date (YYYY-MM-DD)","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Scheduled date (YYYY-MM-DD)"}},{"name":"startTime","description":"Start time (HH:mm)","required":true,"schema":{"type":"string","pattern":"^([01]?\\d|2[0-3]):[0-5]\\d$","description":"Start time (HH:mm)"}},{"name":"endTime","description":"End time (HH:mm)","required":true,"schema":{"type":"string","pattern":"^([01]?\\d|2[0-3]):[0-5]\\d$","description":"End time (HH:mm)"}},{"name":"garageComment","description":"Internal garage comment. Omit to keep the current comment; send an empty string or null to clear it.","required":false,"schema":{"description":"Internal garage comment. Omit to keep the current comment; send an empty string or null to clear it.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},{"name":"dropOffTime","description":"Drop-off time (HH:mm). Omit to keep the current drop-off when the date, start time and offering are unchanged (recomputed otherwise); send null to recompute it. Ignored for pickup offerings, whose drop-off is the start time and which have no receptionist.","required":false,"schema":{"description":"Drop-off time (HH:mm). Omit to keep the current drop-off when the date, start time and offering are unchanged (recomputed otherwise); send null to recompute it. Ignored for pickup offerings, whose drop-off is the start time and which have no receptionist.","anyOf":[{"type":"string","pattern":"^([01]?\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},{"name":"receptionistId","description":"Receptionist mechanic ID; requires a dropOffTime string. With it: omit to keep the current receptionist (rejected if unavailable at that time), null to leave it unassigned. Without it, the receptionist follows the drop-off (kept or recomputed).","required":false,"schema":{"description":"Receptionist mechanic ID; requires a dropOffTime string. With it: omit to keep the current receptionist (rejected if unavailable at that time), null to leave it unassigned. Without it, the receptionist follows the drop-off (kept or recomputed).","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},{"name":"partsStatus","description":"Parts order status. Omit to keep the current status.","required":false,"schema":{"description":"Parts order status. Omit to keep the current status.","type":"string","enum":["TO_CHECK","NONE_NEEDED","TO_ORDER","ORDERED","AVAILABLE"]}},{"name":"clientContactId","description":"Customer ID of the manager who is the client contact of the reservation on a vehicle a company holds: they receive the invitation as the client and are its customer in the calendar and the webhooks, while driverId sets the driver apart. They must be a live contact of the holding company, otherwise the call is refused (CLIENT_CONTACT_NOT_ALLOWED), as it is on a vehicle a person holds. Omit it to keep the stored client contact, dropped when the vehicle changes; without one, the server chooses the driver when they are a live contact of the holding company, else its oldest live contact.","required":false,"schema":{"description":"Customer ID of the manager who is the client contact of the reservation on a vehicle a company holds: they receive the invitation as the client and are its customer in the calendar and the webhooks, while driverId sets the driver apart. They must be a live contact of the holding company, otherwise the call is refused (CLIENT_CONTACT_NOT_ALLOWED), as it is on a vehicle a person holds. Omit it to keep the stored client contact, dropped when the vehicle changes; without one, the server chooses the driver when they are a live contact of the holding company, else its oldest live contact.","type":"string","minLength":1}},{"name":"driverId","description":"Customer ID of the person who brings the vehicle and is notified. Omit to keep the current driver, unless the vehicle changes, then the new vehicle's default driver; send null to go back to the default: the person holding the vehicle, or the manager of the company holding it. A new driver must be in the garage customer file or already attached to the vehicle (driver of it, member of the holding company, or driver of another live vehicle of the holding person), otherwise the call is refused (DRIVER_NOT_ALLOWED). On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. Any other new driver is then linked to the vehicle and, on a company vehicle, added as a driver of the company when not already a member. When a new driver is set, a deleted or banned customer is refused, and a vehicle removed by its holder only accepts its default driver (DRIVER_NOT_ALLOWED); keeping the current driver (driverId omitted or unchanged on the same vehicle) runs no driver check. When a driver is set (explicit, or default after null or a vehicle change) and is outside the garage customer file, they are added to it; a kept driver is not.","required":false,"schema":{"description":"Customer ID of the person who brings the vehicle and is notified. Omit to keep the current driver, unless the vehicle changes, then the new vehicle's default driver; send null to go back to the default: the person holding the vehicle, or the manager of the company holding it. A new driver must be in the garage customer file or already attached to the vehicle (driver of it, member of the holding company, or driver of another live vehicle of the holding person), otherwise the call is refused (DRIVER_NOT_ALLOWED). On a company vehicle without clientContactId, a driverId naming a live contact of the holding company makes that contact the client contact of the reservation: they are not linked to the vehicle and are the only one invited. Any other new driver is then linked to the vehicle and, on a company vehicle, added as a driver of the company when not already a member. When a new driver is set, a deleted or banned customer is refused, and a vehicle removed by its holder only accepts its default driver (DRIVER_NOT_ALLOWED); keeping the current driver (driverId omitted or unchanged on the same vehicle) runs no driver check. When a driver is set (explicit, or default after null or a vehicle change) and is outside the garage customer file, they are added to it; a kept driver is not.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the updated reservation."},"updated":{"type":"boolean","description":"Always true when the reservation was updated."}},"required":["reservationId","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-notify-vehicle-ready","description":"Marks the vehicle as ready and sends a vehicle ready notification to the driver of the reservation by email and/or SMS for standard reservations, skipping contact details known to be unreachable. Pickup reservations are recorded without notifying the driver, since the driver collects the vehicle. Outside pickups, it also records the reception of the vehicle when it was not confirmed yet. Only an active reservation (PENDING, CONFIRMED or IN_PROGRESS) can be marked ready. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}}],"result":{"name":"result","schema":{"type":"object","properties":{"result":{"type":"string","description":"Outcome of the notification attempt."}},"required":["result"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-confirm-reception","description":"Records that the vehicle of a reservation was dropped off at the garage. Only an active reservation (PENDING, CONFIRMED or IN_PROGRESS) that is not a pickup can be received, and only once. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}}],"result":{"name":"result","schema":{"type":"object","properties":{"result":{"type":"string","enum":["received","already-received","not-found","invalid-status"],"description":"Outcome of the reception: received, already-received, not-found or invalid-status."}},"required":["result"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-update-comment","description":"Updates the internal garage comment on a reservation. Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"comment","description":"Internal garage comment (max 500 chars)","required":true,"schema":{"type":"string","maxLength":500,"description":"Internal garage comment (max 500 chars)"}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the updated reservation."},"garageComment":{"description":"The garage comment now attached to the reservation.","type":"string"},"updated":{"type":"boolean","description":"Always true when the comment was updated."}},"required":["reservationId","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-reservation-assign-mechanic","description":"Assigns a mechanic to a reservation. Accepts mechanicId or externalId (scoped to the provided garageId). Accessible by mechanics of the garage or admins.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"mechanicId","description":"Mechanic ID to assign. Provide this OR externalId.","required":false,"schema":{"description":"Mechanic ID to assign. Provide this OR externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable mechanic identifier, scoped to the provided garageId.","required":false,"schema":{"description":"DMS-provided stable mechanic identifier, scoped to the provided garageId.","type":"string","minLength":1,"maxLength":128}}],"result":{"name":"result","schema":{"type":"object","properties":{"reservationId":{"type":"string","description":"Identifier of the updated reservation."},"mechanicId":{"description":"Identifier of the mechanic now assigned, absent when unassigned.","type":"string"},"updated":{"type":"boolean","description":"Always true when the assignment was updated."}},"required":["reservationId","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-update","description":"Updates basic garage information (name, description, phone, email, timezone, active status, acceptsNewCustomers). Deactivating the garage closes its open quote requests, and reactivating it does not reopen them. A garage suspended for a payment issue cannot be reactivated here; it is lifted by an admin once paid. Requires OWNER or MANAGER role, or admin access. Changing the plan (NORMAL, FLEET or SOLO) is admin-only.","params":[{"name":"garageId","description":"Garage ID to update","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to update"}},{"name":"name","description":"New garage name","required":false,"schema":{"description":"New garage name","type":"string","minLength":1,"maxLength":200}},{"name":"description","description":"New garage description","required":false,"schema":{"description":"New garage description","type":"string","maxLength":1200}},{"name":"phone","description":"New phone number in E.164 format (e.g., +33612345678)","required":false,"schema":{"description":"New phone number in E.164 format (e.g., +33612345678)","type":"string","maxLength":20}},{"name":"email","description":"New email address","required":false,"schema":{"description":"New email address","type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},{"name":"timezone","description":"New timezone (e.g., Europe/Paris)","required":false,"schema":{"description":"New timezone (e.g., Europe/Paris)","type":"string","maxLength":50}},{"name":"isActive","description":"New active status. Setting it to false closes the open quote requests of the garage.","required":false,"schema":{"description":"New active status. Setting it to false closes the open quote requests of the garage.","type":"boolean"}},{"name":"acceptsNewCustomers","description":"Whether the garage accepts new customers in search results","required":false,"schema":{"description":"Whether the garage accepts new customers in search results","type":"boolean"}},{"name":"plan","description":"New garage plan (NORMAL, FLEET or SOLO). Admin-only.","required":false,"schema":{"description":"New garage plan (NORMAL, FLEET or SOLO). Admin-only.","type":"string","enum":["NORMAL","FLEET","SOLO"]}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage after the update."},"updated":{"type":"boolean","description":"Always true when the garage was updated."}},"required":["garage","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-address-update","description":"Updates the address of a garage. The map position is geocoded again when the street number, street, postal code, city or country changes. The call fails if the address cannot be located. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to update","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to update"}},{"name":"addressName","description":"Address name/label","required":false,"schema":{"description":"Address name/label","type":"string","maxLength":100}},{"name":"streetNumber","description":"Street number","required":false,"schema":{"description":"Street number","type":"string","maxLength":50}},{"name":"line1","description":"Address line 1 (street name)","required":false,"schema":{"description":"Address line 1 (street name)","type":"string","maxLength":200}},{"name":"line2","description":"Address line 2","required":false,"schema":{"description":"Address line 2","type":"string","maxLength":200}},{"name":"postalCode","description":"Postal code","required":false,"schema":{"description":"Postal code","type":"string","maxLength":20}},{"name":"city","description":"City","required":false,"schema":{"description":"City","type":"string","maxLength":100}},{"name":"country","description":"Country code. Only FR is accepted: the address must be geocodable.","required":false,"schema":{"description":"Country code. Only FR is accepted: the address must be geocodable.","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage after the address update."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"Street line of the address."},"city":{"type":"string","description":"City of the address."},"postalCode":{"type":"string","description":"Postal code of the address."}},"required":["line1","city","postalCode"],"additionalProperties":{},"description":"The new address of the garage."},"updated":{"type":"boolean","description":"Always true when the address was updated."}},"required":["garage","address","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanics-list","description":"Returns a list of mechanics for a specific garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to list mechanics for","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to list mechanics for"}},{"name":"active","description":"Filter by active status (true/false). If not specified, returns all mechanics.","required":false,"schema":{"description":"Filter by active status (true/false). If not specified, returns all mechanics.","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{}},"description":"The mechanics of the garage."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-owner-set","description":"Assigns a user as the owner of a garage. If the user is already a mechanic at this garage, their role will be updated to OWNER. Requires the OWNER role or admin access: a MANAGER cannot grant OWNER. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"userId","description":"User ID to set as owner","required":true,"schema":{"type":"string","minLength":1,"description":"User ID to set as owner"}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic record now holding the OWNER role."},"garageId":{"type":"string","description":"Garage identifier."},"garageName":{"type":"string","description":"Commercial name of the garage."},"userId":{"type":"string","description":"Identifier of the user promoted to owner."},"role":{"type":"string","description":"Role granted to the user."}},"required":["mechanic","garageId","garageName","userId","role"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanic-add","description":"Adds a user as a mechanic to a garage with the specified role. If the user was previously removed, they will be reactivated with the new role. Requires OWNER or MANAGER role, or admin access. A MANAGER cannot grant OWNER or MANAGER, nor modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"userId","description":"User ID to add as mechanic","required":true,"schema":{"type":"string","minLength":1,"description":"User ID to add as mechanic"}},{"name":"role","description":"Role in the garage","required":true,"schema":{"type":"string","enum":["OWNER","MANAGER","LEAD_MECHANIC","MECHANIC","APPRENTICE"],"description":"Role in the garage"}},{"name":"externalId","description":"DMS-provided stable identifier, unique per garage. Optional.","required":false,"schema":{"description":"DMS-provided stable identifier, unique per garage. Optional.","type":"string","minLength":1,"maxLength":128}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic record that was created."},"garageId":{"type":"string","description":"Garage identifier."},"garageName":{"type":"string","description":"Commercial name of the garage."},"userId":{"type":"string","description":"Identifier of the user linked to the mechanic."},"role":{"type":"string","description":"Role granted to the mechanic."}},"required":["mechanic","garageId","garageName","userId","role"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanics-sync","description":"Synchronises the full list of mechanics for a garage. In full mode, mechanics absent from the payload are deactivated; in incremental mode, only creations and updates happen. Matching is done by externalId. The operation is atomic. In both modes, specializationOfferingIds replaces the specializations of each mechanic (omitted = cleared). A MANAGER cannot grant OWNER or MANAGER, nor include (even unchanged) or deactivate the row of the OWNER or another MANAGER. No non-admin caller can deactivate their own membership: in full mode, include your own externalId if your row has one. A MANAGER therefore cannot run a full sync while the OWNER or another MANAGER has an active row with an externalId. Any such change rejects the whole sync. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"garageId","required":true,"schema":{"type":"string","minLength":1}},{"name":"syncMode","required":true,"schema":{"type":"string","enum":["full","incremental"]}},{"name":"mechanics","required":true,"schema":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":128},"firstName":{"type":"string","minLength":1,"maxLength":128},"lastName":{"type":"string","minLength":1,"maxLength":128},"role":{"type":"string","enum":["OWNER","MANAGER","LEAD_MECHANIC","MECHANIC","APPRENTICE"]},"hours":{"default":[],"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"startTime":{"type":"integer","minimum":0,"maximum":1439},"endTime":{"type":"integer","minimum":0,"maximum":1439}},"required":["dayOfWeek","startTime","endTime"],"additionalProperties":false}},"specializationOfferingIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["externalId","firstName","role","hours","specializationOfferingIds"],"additionalProperties":false}}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"garageName":{"type":"string","description":"Commercial name of the garage."},"syncMode":{"type":"string","description":"Synchronisation mode that was applied."},"counts":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of mechanics created."},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of mechanics updated."},"disabled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of mechanics disabled."}},"required":["created","updated","disabled"],"additionalProperties":false}},"required":["garageId","garageName","syncMode","counts"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-customers-import","description":"Imports a batch of customers into a garage's customer file. Creates customers without a user account and sends no email or SMS. Idempotent: a customer already known by email is linked to the garage instead of being duplicated, and a customer of the garage known by phone is left unchanged. Invalid rows are skipped and reported; they never fail the batch. Vehicles and company columns are not imported: a company name sent with a row is ignored. Each customer may carry a secondary phone, never used to reach them.","params":[{"name":"garageId","description":"Garage identifier.","required":true,"schema":{"type":"string","minLength":1,"description":"Garage identifier."}},{"name":"customers","description":"Customers to import, at most 500 per call. Each needs a first name, a last name, and an email or a phone.","required":true,"schema":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"externalId":{"description":"Garage's own reference for this customer, echoed back in the result.","type":"string","maxLength":128},"firstName":{"description":"First name, required, at most 30 characters. Rows without it are skipped.","type":"string","maxLength":128},"lastName":{"description":"Last name, required, at most 30 characters. Rows without it are skipped.","type":"string","maxLength":128},"email":{"description":"Email address. Invalid values skip the row instead of failing the batch.","type":"string","maxLength":254},"phone":{"description":"Phone number, national French format or E.164. Invalid values skip the row.","type":"string","maxLength":32},"secondaryPhone":{"description":"Second phone number (home, work, relative), same formats as phone. Shown to garages only, never used to reach the customer. Ignored when equal to phone; an invalid value is dropped with a warning, the row is still imported. Only stored on created customers.","type":"string","maxLength":256}},"additionalProperties":false},"description":"Customers to import, at most 500 per call. Each needs a first name, a last name, and an email or a phone."}}],"result":{"name":"result","schema":{"type":"object","properties":{"counts":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Customers created and linked to the garage."},"linked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Existing customers of other garages (same email) linked to this garage, with their vehicles."},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Customers already linked to the garage (same email, or same phone within the garage)."},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rows not imported; see the reason of each result."}},"required":["created","linked","unchanged","skipped"],"additionalProperties":false},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the row in the input array."},"externalId":{"description":"externalId of the input row, if any.","type":"string"},"status":{"type":"string","enum":["created","linked","unchanged","skipped"],"description":"Outcome of the row."},"customerId":{"description":"Customer identifier, unless skipped.","type":"string"},"reason":{"description":"Why the row was skipped.","type":"string","enum":["MISSING_NAME","NAME_TOO_LONG","MISSING_CONTACT","INVALID_EMAIL","INVALID_PHONE","DUPLICATE_IN_BATCH","REJECTED"]},"warning":{"description":"Value of the row that was dropped while the row was imported. Set on created rows only.","type":"string","enum":["INVALID_SECONDARY_PHONE"]}},"required":["index","status"],"additionalProperties":false},"description":"One result per input row, in input order."}},"required":["counts","results"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanic-update","description":"Updates a mechanic's role and/or active status. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot grant OWNER or MANAGER, nor modify the OWNER or another MANAGER. A non-admin caller cannot deactivate their own membership. The output carries a NO_HOURS warning when the member has no working hours. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"mechanicId","description":"Mechanic ID to update. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID to update. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"role","description":"New role in the garage","required":false,"schema":{"description":"New role in the garage","type":"string","enum":["OWNER","MANAGER","LEAD_MECHANIC","MECHANIC","APPRENTICE"]}},{"name":"isActive","description":"Set to false to deactivate. Inactive mechanics cannot be targeted by this tool.","required":false,"schema":{"description":"Set to false to deactivate. Inactive mechanics cannot be targeted by this tool.","type":"boolean"}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the update."},"updates":{"type":"object","properties":{"role":{"description":"Role sent in the call, present only when provided.","type":"string"},"isActive":{"description":"Active status sent in the call, present only when provided.","type":"boolean"}},"additionalProperties":{},"description":"The fields that were applied to the mechanic."},"warnings":{"type":"array","items":{"type":"string","enum":["NO_HOURS"]},"description":"Non-blocking warnings about the member after the update. NO_HOURS: the member has no working hours and will not be available on any slot. Empty when none."}},"required":["mechanic","updates","warnings"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanic-remove","description":"Removes a mechanic from a garage (soft delete - sets isActive to false). A mechanic linked to a user account can be reactivated later with garage-mechanic-add; a DMS mechanic is reactivated by including its externalId in garage-mechanics-sync. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot remove the OWNER or another MANAGER. A non-admin caller cannot remove (deactivate) their own membership. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the deactivation."},"removed":{"type":"boolean","description":"Always true when the mechanic was removed."}},"required":["mechanic","removed"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-specialization-add","description":"Adds one or more catalog offerings as specializations to a mechanic. Specializations indicate which services the mechanic can perform. Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"offeringIds","description":"Array of offering IDs from the catalog to add as specializations","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"Array of offering IDs from the catalog to add as specializations"}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the operation."},"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of specializations added."},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of specializations already assigned."},"addedSpecializations":{"description":"Names of the offerings that were added.","type":"array","items":{"type":"string"}}},"required":["mechanic","added","skipped"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-mechanic-specializations-update","description":"Replaces all specializations of a mechanic with the provided list (set semantics). Offerings not in the list are removed, new ones are added. Pass an empty array to clear all specializations: refused for an active member with the mechanic job, who must keep at least one. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only).","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"offeringIds","description":"Complete list of offering IDs the mechanic can perform. Replaces all existing specializations. Empty array removes all specializations, which is refused for an active member with the mechanic job.","required":true,"schema":{"type":"array","items":{"type":"string","minLength":1},"description":"Complete list of offering IDs the mechanic can perform. Replaces all existing specializations. Empty array removes all specializations, which is refused for an active member with the mechanic job."}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the specializations update."},"totalSpecializations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of specializations the mechanic now holds."}},"required":["mechanic","totalSpecializations"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-hours-list","description":"Lists the working hours for a specific mechanic. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week the slot applies to (0=Sunday, 1=Monday, ..., 6=Saturday)."},"startTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the slot, in minutes since midnight."},"endTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End of the slot, in minutes since midnight."}},"required":["dayOfWeek","startTime","endTime"],"additionalProperties":{}},"description":"The working time slots of the mechanic."},"mechanicId":{"type":"string","description":"Identifier of the mechanic the hours belong to."}},"required":["count","items","mechanicId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-hours-set","description":"Sets the weekly working hours for a mechanic. This is a FULL REPLACEMENT - all existing hours are replaced with the provided hours. Use dayOfWeek (0=Sunday..6=Saturday) and startTime/endTime in minutes from midnight (0-1439). For split hours (e.g., morning and afternoon), add multiple entries for the same day. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only), except when the OWNER modifies their own record.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"hours","description":"Array of working hours entries. Each entry specifies day of week and start/end times. Multiple entries per day allowed for split hours (e.g., morning and afternoon shifts).","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week (0=Sunday, 1=Monday, ..., 6=Saturday)"},"startTime":{"type":"integer","minimum":0,"maximum":1439,"description":"Start time in minutes from midnight (0-1439)"},"endTime":{"type":"integer","minimum":0,"maximum":1439,"description":"End time in minutes from midnight (0-1439)"}},"required":["dayOfWeek","startTime","endTime"],"additionalProperties":false},"description":"Array of working hours entries. Each entry specifies day of week and start/end times. Multiple entries per day allowed for split hours (e.g., morning and afternoon shifts)."}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the working hours update."},"hoursCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of working time slots now configured."},"updated":{"type":"boolean","description":"Always true when the hours were updated."}},"required":["mechanic","hoursCount","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-hours-clear","description":"Clears all working hours for a specific mechanic. Use this to reset hours before setting new ones or when a mechanic should no longer have any scheduled availability. The output carries the NO_HOURS warning: until new hours are set, the member is not available on any slot. Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only), except when the OWNER modifies their own record.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the working hours were cleared."},"previousHoursCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of working time slots that were removed."},"cleared":{"type":"boolean","description":"Always true when the hours were cleared."},"warnings":{"type":"array","items":{"type":"string","enum":["NO_HOURS"]},"description":"Non-blocking warnings about the member after the update. NO_HOURS: the member has no working hours and will not be available on any slot. Empty when none."}},"required":["mechanic","previousHoursCount","cleared","warnings"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-reception-toggle","description":"Enables or disables the reception role for a mechanic. When enabled, the mechanic can handle customer reception in addition to their current duties. When disabled, the reception role is removed. The mechanic job is left untouched. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only), except when the OWNER modifies their own record.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"reception","description":"Whether the mechanic should handle reception duties","required":true,"schema":{"type":"boolean","description":"Whether the mechanic should handle reception duties"}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the reception role update."},"reception":{"type":"boolean","description":"Whether the mechanic now handles reception."},"updated":{"type":"boolean","description":"Always true when the role was updated."}},"required":["mechanic","reception","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-time-off-add","description":"Adds a time-off period (vacation, sick leave, etc.) for a mechanic. The mechanic will be unavailable for bookings during this period. End date must be after start date. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only), except when the OWNER modifies their own record.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"startDate","description":"Start date of time off (ISO 8601 format, e.g. 2025-01-15)","required":true,"schema":{"type":"string","description":"Start date of time off (ISO 8601 format, e.g. 2025-01-15)"}},{"name":"endDate","description":"End date of time off (ISO 8601 format, e.g. 2025-01-20). Must be after startDate.","required":true,"schema":{"type":"string","description":"End date of time off (ISO 8601 format, e.g. 2025-01-20). Must be after startDate."}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the time off was added."},"timeoffCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of time-off periods the mechanic now holds."},"added":{"type":"boolean","description":"Always true when the time off was added."}},"required":["mechanic","timeoffCount","added"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"mechanic-time-off-remove","description":"Removes a specific time-off period from a mechanic. The mechanic will become available again for bookings during the removed period. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. A MANAGER cannot modify the OWNER or another MANAGER. Not available for FLEET or SOLO plan garages (admin-only), except when the OWNER modifies their own record.","params":[{"name":"mechanicId","description":"Mechanic ID. Provide this OR (garageId + externalId).","required":false,"schema":{"description":"Mechanic ID. Provide this OR (garageId + externalId).","type":"string","minLength":1}},{"name":"garageId","description":"Garage ID. Required when using externalId.","required":false,"schema":{"description":"Garage ID. Required when using externalId.","type":"string","minLength":1}},{"name":"externalId","description":"DMS-provided stable identifier. Requires garageId.","required":false,"schema":{"description":"DMS-provided stable identifier. Requires garageId.","type":"string","minLength":1,"maxLength":128}},{"name":"timeoffId","description":"ID of the time-off period to remove","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the time-off period to remove"}}],"result":{"name":"result","schema":{"type":"object","properties":{"mechanic":{"type":"object","properties":{"id":{"type":"string","description":"Mechanic identifier."},"garageId":{"type":"string","description":"Identifier of the garage employing the mechanic."}},"required":["id","garageId"],"additionalProperties":{},"description":"The mechanic after the time off was removed."},"timeoffCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of time-off periods the mechanic now holds."},"removed":{"type":"boolean","description":"Always true when the time off was removed."}},"required":["mechanic","timeoffCount","removed"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-hours-update","description":"Updates garage business hours. Replaces all existing hours with the provided hours. Use dayOfWeek (0=Sunday..6=Saturday) and startTime/endTime in minutes from midnight (0-1439). For split hours (e.g., closed for lunch), add multiple entries for the same day. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to update","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to update"}},{"name":"hours","description":"Array of business hours entries. Each entry specifies day of week and opening/closing times. Multiple entries per day allowed for split hours.","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6,"description":"Day of week (0=Sunday, 1=Monday, ..., 6=Saturday)"},"startTime":{"type":"integer","minimum":0,"maximum":1439,"description":"Start time in minutes from midnight (0-1439)"},"endTime":{"type":"integer","minimum":0,"maximum":1439,"description":"End time in minutes from midnight (0-1439)"}},"required":["dayOfWeek","startTime","endTime"],"additionalProperties":false},"description":"Array of business hours entries. Each entry specifies day of week and opening/closing times. Multiple entries per day allowed for split hours."}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage after the business hours update."},"hoursCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of business hour slots now configured."},"updated":{"type":"boolean","description":"Always true when the hours were updated."}},"required":["garage","hoursCount","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-activate","description":"Activates a garage, making it visible and available for bookings. The garage will appear in search results and customers can make reservations. A garage suspended for a payment issue cannot be reactivated here; it is lifted by an admin once paid. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to activate","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to activate"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage after the activation attempt."},"activated":{"description":"Present and true when the garage was just activated.","type":"boolean"},"alreadyActive":{"description":"Present and true when the garage was already active.","type":"boolean"}},"required":["garage"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-deactivate","description":"Deactivates a garage, hiding it from search results and preventing new bookings. Existing reservations are not affected; open quote requests are closed. The garage can be reactivated later using garage-activate, which does not reopen them. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to deactivate","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to deactivate"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garage":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{},"description":"The garage after the deactivation attempt."},"deactivated":{"description":"Present and true when the garage was just deactivated.","type":"boolean"},"alreadyInactive":{"description":"Present and true when the garage was already inactive.","type":"boolean"}},"required":["garage"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-offerings-list","description":"Returns all offerings proposed by a specific garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to list offerings for","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to list offerings for"}},{"name":"active","description":"Filter by active status (default: true, set to false to see inactive)","required":false,"schema":{"description":"Filter by active status (default: true, set to false to see inactive)","type":"boolean"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{}},"description":"The offerings proposed by the garage."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-offering-add","description":"Adds one or more catalog offerings to a garage with duration and an optional custom cooling time. Without customCoolingTime, an offering with no existing garage row starts without cooling time (0); a previously inactive one is reactivated and keeps its stored custom cooling time (none stored = catalog cooling time). For an offering that must apply the catalog cooling time, call garage-offering-update with customCoolingTime null afterwards (garage-cooling-time-mode-set rewrites every offering of the garage). The offerings must exist in the catalog and not be retired from it. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to add offering to","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to add offering to"}},{"name":"offerings","description":"Array of offerings to add to the garage","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"offeringId":{"type":"string","minLength":1,"description":"Offering ID from the catalog to add"},"estimatedDuration":{"description":"Estimated duration in minutes (minimum 5). If not provided, uses the catalog default.","type":"integer","minimum":5,"maximum":9007199254740991},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes (0 allowed). If not provided, a new garage offering starts without cooling time (0) and a reactivated one keeps its stored custom cooling time, like its labor rate tier and custom hourly rate. Ignored when the offering is already active: use garage-offering-update instead.","type":"integer","minimum":0,"maximum":9007199254740991},"color":{"description":"Color in HEX format (e.g., #FF5733). Default: #3B82F6","type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["offeringId"],"additionalProperties":false},"description":"Array of offerings to add to the garage"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageOfferings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{}},"description":"The garage offerings after the operation."},"summary":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of offerings created."},"reactivated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of offerings reactivated."},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of offerings already active."}},"required":["created","reactivated","skipped"],"additionalProperties":false},"details":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the catalog offering."},"status":{"type":"string","description":"What happened to this offering: created, reactivated or skipped."}},"required":["name","status"],"additionalProperties":false}}},"required":["garageOfferings","summary","details"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-offering-update","description":"Updates a garage offering (duration, active status, custom cooling time). Use garage-offering-remove to deactivate. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageOfferingId","description":"Garage offering ID to update","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID to update"}},{"name":"estimatedDuration","description":"New estimated duration in minutes (minimum 5)","required":false,"schema":{"description":"New estimated duration in minutes (minimum 5)","type":"integer","minimum":5,"maximum":9007199254740991}},{"name":"isActive","description":"New active status","required":false,"schema":{"description":"New active status","type":"boolean"}},{"name":"customCoolingTime","description":"Cooling time set by the garage, in minutes (0 allowed). null returns to the catalog cooling time. Omit to leave it unchanged.","required":false,"schema":{"description":"Cooling time set by the garage, in minutes (0 allowed). null returns to the catalog cooling time. Omit to leave it unchanged.","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageOffering":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{},"description":"The garage offering after the update."},"updated":{"type":"boolean","description":"Always true when the offering was updated."}},"required":["garageOffering","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-cooling-time-mode-set","description":"Switches the cooling time of every offering of a garage, active or not, in a single call: none removes the cooling time, catalog applies the catalog cooling time. Beware: it overwrites the cooling times set offering by offering with garage-offering-update or garage-offering-add — warn the garage before calling it. Two consecutive calls with the same mode have the same effect as one; any per-offering cooling time set in between is overwritten. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID whose offerings get the cooling time mode","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID whose offerings get the cooling time mode"}},{"name":"mode","description":"none: every offering of the garage starts right after the reception, without cooling time (customCoolingTime = 0). catalog: every offering of the garage applies the catalog cooling time (customCoolingTime cleared).","required":true,"schema":{"type":"string","enum":["none","catalog"],"description":"none: every offering of the garage starts right after the reception, without cooling time (customCoolingTime = 0). catalog: every offering of the garage applies the catalog cooling time (customCoolingTime cleared)."}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{}},"description":"Every offering of the garage, active or not, with its resolved coolingTime after the operation."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-offering-remove","description":"Removes an offering from a garage (soft delete - sets isActive to false). The offering can be reactivated using garage-offering-add. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageOfferingId","description":"Garage offering ID to remove","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID to remove"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageOffering":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{},"description":"The garage offering after the removal attempt."},"removed":{"description":"Present and true when the offering was just removed.","type":"boolean"},"alreadyInactive":{"description":"Present and true when the offering was already inactive.","type":"boolean"}},"required":["garageOffering"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-make-add","description":"Adds a supported vehicle make to a garage. Optionally mark as certified. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to add vehicle make to","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to add vehicle make to"}},{"name":"makeId","description":"Vehicle make ID to add","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle make ID to add"}},{"name":"certified","description":"Whether the garage is certified for this make (default: false)","required":false,"schema":{"description":"Whether the garage is certified for this make (default: false)","type":"boolean"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageMake":{"type":"object","properties":{"garageId":{"type":"string","description":"Identifier of the garage."},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"certified":{"type":"boolean","description":"Whether the garage is certified for this make."}},"required":["garageId","makeId","certified"],"additionalProperties":{},"description":"The garage/make link after the operation."},"created":{"description":"Present and true when the link was created.","type":"boolean"},"alreadyLinked":{"description":"Present and true when the make was already linked.","type":"boolean"},"certificationUpdated":{"description":"Present and true when only the certification changed.","type":"boolean"}},"required":["garageMake"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-make-remove","description":"Removes a supported vehicle make from a garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to remove vehicle make from","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to remove vehicle make from"}},{"name":"makeId","description":"Vehicle make ID to remove","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle make ID to remove"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"makeId":{"description":"Identifier of the vehicle make that was unlinked.","type":"string"},"removed":{"description":"Present and true when the make was unlinked.","type":"boolean"},"notLinked":{"description":"Present and true when the make was not linked to the garage.","type":"boolean"}},"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-makes-set","description":"Sets the vehicle makes a garage supports in a single call. In full mode, makes absent from the payload are unlinked, along with the per-offering make restrictions that referenced them — an offering left with no restriction at all then accepts every make the garage supports, and a garage left with no make at all is treated as serving every make. In incremental mode, only additions and certification updates happen. The operation is atomic: an unknown or duplicated make ID leaves the garage untouched. Prefer this over repeated garage-make-add / garage-make-remove calls. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID whose supported makes are being set","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID whose supported makes are being set"}},{"name":"syncMode","description":"full: makes absent from the payload are unlinked from the garage. incremental: only additions and certification updates happen.","required":true,"schema":{"type":"string","enum":["full","incremental"],"description":"full: makes absent from the payload are unlinked from the garage. incremental: only additions and certification updates happen."}},{"name":"makes","description":"The makes the garage supports. Each make ID must appear at most once. Beware: an empty array in full mode unlinks every make, and a garage with no linked make is treated as serving every make — it does not mean \"the garage supports nothing\".","required":true,"schema":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"makeId":{"type":"string","minLength":1,"description":"Vehicle make ID, as returned by makes-list"},"certified":{"description":"Whether the garage is certified for this make. Omitted leaves the current value untouched, and defaults to false on a make being added.","type":"boolean"}},"required":["makeId"],"additionalProperties":false},"description":"The makes the garage supports. Each make ID must appear at most once. Beware: an empty array in full mode unlinks every make, and a garage with no linked make is treated as serving every make — it does not mean \"the garage supports nothing\"."}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Identifier of the garage."},"garageName":{"type":"string","description":"Commercial name of the garage."},"syncMode":{"type":"string","description":"Synchronisation mode that was applied."},"counts":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of makes newly linked to the garage by this call."},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of makes unlinked from the garage by this call."},"certificationUpdated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of makes whose certification changed."},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of payload makes left as they were, either because the requested certification already matched or because certified was omitted."},"offeringRestrictionsRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of per-offering make restrictions dropped because their make was unlinked."}},"required":["added","removed","certificationUpdated","unchanged","offeringRestrictionsRemoved"],"additionalProperties":false,"description":"What the operation changed."},"offeringsLeftUnrestricted":{"type":"array","items":{"type":"string"},"description":"Garage offerings whose last make restriction was dropped by this call. They now accept every make the garage supports, which widens them — restore them with garage-offering-make-restrictions-set."}},"required":["garageId","garageName","syncMode","counts","offeringsLeftUnrestricted"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-make-set-certified","description":"Set or unset garage certification for a vehicle make. The make must already be linked to the garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"makeId","description":"Vehicle make ID","required":true,"schema":{"type":"string","minLength":1,"description":"Vehicle make ID"}},{"name":"certified","description":"Whether the garage is certified for this make","required":true,"schema":{"type":"boolean","description":"Whether the garage is certified for this make"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageMake":{"type":"object","properties":{"garageId":{"type":"string","description":"Identifier of the garage."},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"certified":{"type":"boolean","description":"Whether the garage is certified for this make."}},"required":["garageId","makeId","certified"],"additionalProperties":{},"description":"The garage/make link after the certification update."}},"required":["garageMake"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-offering-make-restrictions-set","description":"Set which vehicle makes are accepted for a specific garage offering. Pass an empty makeIds array to remove all restrictions (accept all garage makes). Only makes already linked to the garage (via garage-make-add or garage-makes-set) can be used.","params":[{"name":"garageOfferingId","description":"ID of the garage offering to configure","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage offering to configure"}},{"name":"makeIds","description":"Array of make IDs to restrict to. Empty array = accept all garage makes","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"Array of make IDs to restrict to. Empty array = accept all garage makes"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageOffering":{"type":"object","properties":{"id":{"type":"string","description":"Garage offering identifier."},"garageId":{"type":"string","description":"Identifier of the garage providing the offering."},"offeringId":{"type":"string","description":"Identifier of the catalog offering."},"isActive":{"type":"boolean","description":"Whether the garage currently proposes the offering."},"estimatedDuration":{"type":"number","description":"Estimated duration of the intervention, in minutes."},"coolingTime":{"type":"number","description":"Cooling time applied before the intervention, in minutes: customCoolingTime when set, otherwise the catalog value."},"customCoolingTime":{"description":"Cooling time set by the garage, in minutes. Absent when the garage inherits the catalog value.","type":"number"},"color":{"type":"string","description":"Calendar color chosen by the garage for the offering, as a hex code."},"laborRateTier":{"type":"string","enum":["T1","T2","T3","M1","M2","M3","CUSTOM"],"description":"Labor rate tier applied to the offering: a garage hourly rate tier, or CUSTOM to use customHourlyRate. Ignored when isManufacturerCovered is true."},"customHourlyRate":{"description":"Hourly rate set by the garage for the offering, in centimes excluding VAT. Present only when laborRateTier is CUSTOM.","type":"number"},"isManufacturerCovered":{"type":"boolean","description":"Whether the manufacturer pays for the intervention, as for a manufacturer recall: laborRateTier and customHourlyRate are then ignored and no rate is shown to the driver."}},"required":["id","garageId","offeringId","isActive","estimatedDuration","coolingTime","color","laborRateTier","isManufacturerCovered"],"additionalProperties":{},"description":"The garage offering after the restrictions update."}},"required":["garageOffering"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-supported-energy-toggle","description":"Enables or disables a vehicle energy type for a garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"energy","description":"Vehicle energy type (diesel, gasoline, electric, hybrid, diesel_electric, lpg)","required":true,"schema":{"type":"string","enum":["diesel","gasoline","electric","hybrid","diesel_electric","lpg"],"description":"Vehicle energy type (diesel, gasoline, electric, hybrid, diesel_electric, lpg)"}},{"name":"supported","description":"Whether the garage supports this energy type","required":true,"schema":{"type":"boolean","description":"Whether the garage supports this energy type"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"energy":{"type":"string","description":"Energy type that was toggled."},"supported":{"type":"boolean","description":"Whether the garage now supports this energy type."}},"required":["garageId","energy","supported"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-supported-type-toggle","description":"Enables or disables a vehicle type for a garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"type","description":"Vehicle type (v = car, m = motorcycle, c = commercial vehicle)","required":true,"schema":{"type":"string","enum":["v","m","c"],"description":"Vehicle type (v = car, m = motorcycle, c = commercial vehicle)"}},{"name":"supported","description":"Whether the garage supports this vehicle type","required":true,"schema":{"type":"boolean","description":"Whether the garage supports this vehicle type"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"type":{"type":"string","description":"Vehicle type that was toggled."},"supported":{"type":"boolean","description":"Whether the garage now supports this vehicle type."}},"required":["garageId","type","supported"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-booking-preferences-update","description":"Updates booking preferences for a garage (appointment type, minimum booking delay, reception duration). Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"appointmentType","description":"Appointment type (IMMEDIATE or MORNING_DROP)","required":true,"schema":{"type":"string","enum":["IMMEDIATE","MORNING_DROP"],"description":"Appointment type (IMMEDIATE or MORNING_DROP)"}},{"name":"minBookingDelay","description":"Minimum booking delay in minutes. 1440 (1 day), 4320 (3 days), 10080 (7 days)","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minimum booking delay in minutes. 1440 (1 day), 4320 (3 days), 10080 (7 days)"}},{"name":"receptionDuration","description":"Reception duration in minutes (0, 5, or 10)","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Reception duration in minutes (0, 5, or 10)"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"appointmentType":{"type":"string","description":"Appointment type now applied to the garage."},"minBookingDelay":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minimum booking delay, in minutes."},"receptionDuration":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Reception duration, in minutes."},"updated":{"type":"boolean","description":"Always true when the preferences were updated."}},"required":["garageId","appointmentType","minBookingDelay","receptionDuration","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-drop-off-hours-update","description":"Updates the drop-off time window for MORNING_DROP garages. Pass startTime and endTime in minutes from midnight. Defaults are 0 and 720 (noon), which is also the latest end accepted. The window is clamped to the garage business hours per day. Has no immediate effect on IMMEDIATE garages, but values are persisted and will apply if the garage later switches to MORNING_DROP. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"startTime","description":"Drop-off window start time in minutes since midnight (0-719). Default is 0.","required":true,"schema":{"type":"integer","minimum":0,"maximum":719,"description":"Drop-off window start time in minutes since midnight (0-719). Default is 0."}},{"name":"endTime","description":"Drop-off window end time in minutes since midnight (1-720). Default and maximum is 720 (noon).","required":true,"schema":{"type":"integer","minimum":1,"maximum":720,"description":"Drop-off window end time in minutes since midnight (1-720). Default and maximum is 720 (noon)."}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"dropOffStartTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the drop-off window, in minutes since midnight."},"dropOffEndTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End of the drop-off window, in minutes since midnight."},"updated":{"type":"boolean","description":"Always true when the window was updated."}},"required":["garageId","dropOffStartTime","dropOffEndTime","updated"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-notification-preferences-update","description":"Enables or disables email notifications for a specific event type on a garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID"}},{"name":"notificationType","description":"Notification type (GARAGE_NEW_RESERVATION, GARAGE_RESERVATION_CANCELLED, GARAGE_RESERVATION_RESCHEDULED, GARAGE_NEW_MESSAGE)","required":true,"schema":{"type":"string","enum":["GARAGE_NEW_RESERVATION","GARAGE_RESERVATION_CANCELLED","GARAGE_RESERVATION_RESCHEDULED","GARAGE_NEW_MESSAGE"],"description":"Notification type (GARAGE_NEW_RESERVATION, GARAGE_RESERVATION_CANCELLED, GARAGE_RESERVATION_RESCHEDULED, GARAGE_NEW_MESSAGE)"}},{"name":"emailEnabled","description":"Whether email notifications are enabled for this type","required":true,"schema":{"type":"boolean","description":"Whether email notifications are enabled for this type"}}],"result":{"name":"result","schema":{"type":"object","properties":{"garageId":{"type":"string","description":"Garage identifier."},"notificationType":{"type":"string","description":"Notification type whose preference was updated."},"emailEnabled":{"type":"boolean","description":"New state of the email preference."}},"required":["garageId","notificationType","emailEnabled"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-closing-periods-list","description":"Returns all closing periods of a specific garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to list closing periods for","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to list closing periods for"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Closing period identifier."},"startDate":{"type":"string","description":"ISO-8601 first day of the closing period."},"endDate":{"type":"string","description":"ISO-8601 last day of the closing period."}},"required":["id","startDate","endDate"],"additionalProperties":false},"description":"The closing periods of the garage."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-closing-period-add","description":"Adds a closing period to a garage. The garage will not accept bookings during this period. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to add closing period to","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to add closing period to"}},{"name":"startDate","description":"Start date of closing period (ISO 8601 format)","required":true,"schema":{"type":"string","description":"Start date of closing period (ISO 8601 format)"}},{"name":"endDate","description":"End date of closing period (ISO 8601 format)","required":true,"schema":{"type":"string","description":"End date of closing period (ISO 8601 format)"}}],"result":{"name":"result","schema":{"type":"object","properties":{"closingPeriod":{"type":"object","properties":{"id":{"type":"string","description":"Closing period identifier."}},"required":["id"],"additionalProperties":{},"description":"The closing period that was added."}},"required":["closingPeriod"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-closing-period-remove","description":"Removes a closing period from a garage. Requires OWNER or MANAGER role, or admin access.","params":[{"name":"garageId","description":"Garage ID to remove closing period from","required":true,"schema":{"type":"string","minLength":1,"description":"Garage ID to remove closing period from"}},{"name":"closingPeriodId","description":"Closing period ID to remove","required":true,"schema":{"type":"string","minLength":1,"description":"Closing period ID to remove"}}],"result":{"name":"result","schema":{"type":"object","properties":{"removed":{"type":"boolean","description":"Always true when the closing period was removed."},"closingPeriod":{"type":"object","properties":{"id":{"type":"string","description":"Closing period identifier."}},"required":["id"],"additionalProperties":{},"description":"The closing period that was removed."}},"required":["removed","closingPeriod"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-vehicle-delete","description":"Soft deletes a vehicle from the authenticated customer's account and closes its open quote requests. Admins can specify a customerId to delete any customer's vehicle.","params":[{"name":"vehicleId","description":"ID of the vehicle to delete","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the vehicle to delete"}},{"name":"customerId","description":"Customer ID (admin only - to delete a specific customer's vehicle)","required":false,"schema":{"description":"Customer ID (admin only - to delete a specific customer's vehicle)","type":"string"}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicleId":{"type":"string","description":"Identifier of the vehicle targeted by the deletion."},"deleted":{"type":"boolean","description":"False when the vehicle was already deleted."},"alreadyDeleted":{"description":"Present and true when the vehicle had already been deleted.","type":"boolean"}},"required":["vehicleId","deleted"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"vehicle-lookup-by-plate","description":"Looks up vehicle information from a license plate via the SIV gateway","params":[{"name":"licensePlate","description":"Vehicle license plate (e.g. AB-123-CD)","required":true,"schema":{"type":"string","minLength":1,"maxLength":12,"description":"Vehicle license plate (e.g. AB-123-CD)"}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicle":{"type":"object","properties":{"id":{"type":"string","description":"Vehicle identifier."},"makeId":{"type":"string","description":"Identifier of the vehicle make."},"modelId":{"type":"string","description":"Identifier of the vehicle model."},"licensePlate":{"type":"string","description":"License plate of the vehicle."},"energy":{"type":"string","description":"Energy type of the vehicle."},"type":{"type":"string","description":"Category of the vehicle."},"year":{"description":"Year the vehicle was first registered.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","makeId","modelId","licensePlate","energy","type"],"additionalProperties":{},"description":"The vehicle matching the license plate."}},"required":["vehicle"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"api-key-create","description":"Creates an M2M API key for programmatic access. Admins must specify userId. Garage owners create keys for their own account. The secret is shown only once. Only available from a verified application; M2M tokens are refused.","params":[{"name":"userId","description":"ID of the user to create the key for (required for admins, ignored for non-admins)","required":false,"schema":{"description":"ID of the user to create the key for (required for admins, ignored for non-admins)","type":"string","minLength":1}},{"name":"clientName","description":"Descriptive name for the API key (e.g. \"DMS Orisha G8\")","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Descriptive name for the API key (e.g. \"DMS Orisha G8\")"}}],"result":{"name":"result","schema":{"type":"object","properties":{"clientId":{"type":"string","description":"Client identifier of the new API key."},"clientSecret":{"type":"string","description":"Client secret, shown only once."},"clientName":{"type":"string","description":"Human-readable name of the API key."}},"required":["clientId","clientSecret","clientName"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"api-key-list","description":"Lists M2M API keys. Admins can list any user's keys. Garage owners see only their own keys. Only available from a verified application; M2M tokens are refused.","params":[{"name":"userId","description":"ID of the user whose keys to list (admin only, ignored for non-admins)","required":false,"schema":{"description":"ID of the user whose keys to list (admin only, ignored for non-admins)","type":"string","minLength":1}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"clientId":{"type":"string","description":"Client identifier of the API key."},"clientName":{"type":"string","description":"Human-readable name of the API key."},"createdAt":{"type":"string","description":"ISO-8601 moment the key was created."},"revokedAt":{"description":"ISO-8601 moment the key was revoked, absent while it is active.","type":"string"}},"required":["clientId","clientName","createdAt"],"additionalProperties":{}},"description":"The API keys of the authenticated user, without their secret."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"api-key-revoke","description":"Revokes an M2M API key. Admins can revoke any key. Garage owners can only revoke their own keys. Only available from a verified application; M2M tokens are refused.","params":[{"name":"clientId","description":"ID of the API key to revoke","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the API key to revoke"}}],"result":{"name":"result","schema":{"type":"object","properties":{"clientId":{"type":"string","description":"Client identifier of the revoked API key."},"clientName":{"type":"string","description":"Human-readable name of the revoked API key."},"revoked":{"type":"boolean","description":"Always true when the key was revoked."}},"required":["clientId","clientName","revoked"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-notification-preferences-get","description":"Returns the email notification preferences for the authenticated customer. Falls back to the user email when no customer profile exists.","params":[],"result":{"name":"result","schema":{"type":"object","properties":{"CUSTOMER_RESERVATION_CONFIRMATION":{"type":"boolean","description":"Whether CUSTOMER_RESERVATION_CONFIRMATION emails are enabled."},"CUSTOMER_RESERVATION_CANCELLED":{"type":"boolean","description":"Whether CUSTOMER_RESERVATION_CANCELLED emails are enabled."},"CUSTOMER_RESERVATION_RESCHEDULED":{"type":"boolean","description":"Whether CUSTOMER_RESERVATION_RESCHEDULED emails are enabled."},"CUSTOMER_RESERVATION_REMINDER":{"type":"boolean","description":"Whether CUSTOMER_RESERVATION_REMINDER emails are enabled."},"CUSTOMER_VEHICLE_READY":{"type":"boolean","description":"Whether CUSTOMER_VEHICLE_READY emails are enabled."},"CUSTOMER_REVIEW_REQUEST":{"type":"boolean","description":"Whether CUSTOMER_REVIEW_REQUEST emails are enabled."},"CUSTOMER_RESERVATION_COPY":{"type":"boolean","description":"Whether CUSTOMER_RESERVATION_COPY emails are enabled."},"CUSTOMER_NEW_MESSAGE":{"type":"boolean","description":"Whether CUSTOMER_NEW_MESSAGE emails are enabled."},"CUSTOMER_QUOTE_REQUEST_REMINDER":{"type":"boolean","description":"Whether CUSTOMER_QUOTE_REQUEST_REMINDER emails are enabled."}},"required":["CUSTOMER_RESERVATION_CONFIRMATION","CUSTOMER_RESERVATION_CANCELLED","CUSTOMER_RESERVATION_RESCHEDULED","CUSTOMER_RESERVATION_REMINDER","CUSTOMER_VEHICLE_READY","CUSTOMER_REVIEW_REQUEST","CUSTOMER_RESERVATION_COPY","CUSTOMER_NEW_MESSAGE","CUSTOMER_QUOTE_REQUEST_REMINDER"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"customer-notification-preferences-update","description":"Toggles an email notification preference for the authenticated customer. Garage notifications (reservation cancelled, reservation rescheduled, vehicle ready) are mandatory and cannot be disabled. CUSTOMER_RESERVATION_COPY controls the copies of reservation emails (cancellations and reschedules included) sent for vehicles you hold or manage but do not drive.","params":[{"name":"notificationType","description":"The notification type to update. CUSTOMER_RESERVATION_COPY controls the copies of reservation emails (cancellations and reschedules included) sent for vehicles you hold or manage but do not drive.","required":true,"schema":{"type":"string","enum":["CUSTOMER_RESERVATION_CONFIRMATION","CUSTOMER_RESERVATION_CANCELLED","CUSTOMER_RESERVATION_RESCHEDULED","CUSTOMER_RESERVATION_REMINDER","CUSTOMER_VEHICLE_READY","CUSTOMER_REVIEW_REQUEST","CUSTOMER_RESERVATION_COPY","CUSTOMER_NEW_MESSAGE","CUSTOMER_QUOTE_REQUEST_REMINDER"],"description":"The notification type to update. CUSTOMER_RESERVATION_COPY controls the copies of reservation emails (cancellations and reschedules included) sent for vehicles you hold or manage but do not drive."}},{"name":"emailEnabled","description":"Whether email notifications are enabled for this type","required":true,"schema":{"type":"boolean","description":"Whether email notifications are enabled for this type"}}],"result":{"name":"result","schema":{"type":"object","properties":{"notificationType":{"type":"string","description":"Notification type whose preference was updated."},"emailEnabled":{"type":"boolean","description":"New state of the email preference."}},"required":["notificationType","emailEnabled"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"garage-availability-get","description":"Returns available time slots for a garage offering. Accessible by mechanics of the garage or admins.","params":[{"name":"garageOfferingId","description":"Garage offering ID","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID"}},{"name":"date","description":"Specific date (ISO 8601, e.g. 2025-01-15)","required":false,"schema":{"description":"Specific date (ISO 8601, e.g. 2025-01-15)","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"fromDate","description":"Start date (ISO 8601, e.g. 2025-01-15)","required":false,"schema":{"description":"Start date (ISO 8601, e.g. 2025-01-15)","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"numDates","description":"Number of dates to return (1-180)","required":false,"schema":{"description":"Number of dates to return (1-180)","type":"integer","minimum":1,"maximum":180}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Day of the availabilities, as YYYY-MM-DD."},"hours":{"type":"array","items":{"type":"object","properties":{"dropOffTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Drop-off time of the slot, in minutes since midnight."},"startTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the intervention, in minutes since midnight."},"endTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End of the intervention, in minutes since midnight."}},"required":["dropOffTime","startTime","endTime"],"additionalProperties":{}},"description":"Bookable slots on that day."},"dropOffTimes":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Drop-off times offered that day, in minutes since midnight: in each slot interval, the first time a receptionist is free outside the closing periods. A morning-drop garage accepts only these times."},"dropOffRanges":{"type":"array","items":{"type":"object","properties":{"firstDropOffTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"First drop-off time of an opening range, in minutes since midnight."},"lastDropOffTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Last drop-off time of that opening range leaving room for the reception, in minutes since midnight."}},"required":["firstDropOffTime","lastDropOffTime"],"additionalProperties":{}},"description":"Ranges of that day within which an immediate-reception garage accepts a drop-off, each ending early enough to finish the reception before closing. Ignored for morning-drop garages, which accept only dropOffTimes."},"dropOffWindow":{"description":"Drop-off window the garage configured for that day, before any reception capacity filter. Absent unless the garage receives by morning drop.","type":"object","properties":{"startTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the drop-off window, in minutes since midnight."},"endTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End of the drop-off window, in minutes since midnight."}},"required":["startTime","endTime"],"additionalProperties":{}}},"required":["date","hours","dropOffTimes","dropOffRanges"],"additionalProperties":{}},"description":"The days holding at least one bookable slot."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"integration-webhook-register","description":"Registers a new outbound webhook for a garage. Returns the signing secret exactly once; store it securely, it cannot be retrieved later.","params":[{"name":"garageId","required":true,"schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},{"name":"url","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"}},{"name":"events","required":true,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["reservation.created","reservation.updated","reservation.cancelled","reservation.status_changed","reservation.vehicle_received","reservation.vehicle_ready"]}}}],"result":{"name":"result","schema":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the registered webhook."},"url":{"type":"string","description":"URL the webhook posts to."},"events":{"type":"array","items":{"type":"string"},"description":"Events the webhook subscribes to."},"secret":{"type":"string","description":"Signing secret, shown only once."}},"required":["id","url","events","secret"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"integration-webhook-list","description":"Lists all outbound webhooks registered for a garage. Signing secrets are never returned; they are only shown once at registration.","params":[{"name":"garageId","required":true,"schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Webhook identifier."},"url":{"type":"string","description":"URL the webhook posts to."},"events":{"type":"array","items":{"type":"string"},"description":"Events the webhook subscribes to."},"active":{"type":"boolean","description":"Whether the webhook currently receives deliveries."},"createdAt":{"type":"string","description":"ISO-8601 moment the webhook was registered."}},"required":["id","url","events","active","createdAt"],"additionalProperties":{}},"description":"The webhooks registered for the garage, without their signing secret."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"integration-webhook-delete","description":"Deletes an outbound webhook. Fails if the webhook does not belong to the specified garage.","params":[{"name":"garageId","required":true,"schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}},{"name":"webhookId","required":true,"schema":{"type":"string","format":"cuid2","pattern":"^[0-9a-z]+$"}}],"result":{"name":"result","schema":{"type":"object","properties":{"webhookId":{"type":"string","description":"Identifier of the deleted webhook."}},"required":["webhookId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-update","description":"Updates a fleet name or network restriction. Requires managing the fleet, or admin access. Changing the holder company (holderCompanyId) or the company managing the fleet (managerCompanyId) requires admin access; the vehicles of the fleet are then relinked to the vehicles these companies hold, or unlinked when neither holds the plate or when their vehicle is still attached to another fleet, even a deleted one. The managing company follows the holder when it was the holder; pass managerCompanyId to keep or set another.","params":[{"name":"fleetId","description":"ID of the fleet to update","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet to update"}},{"name":"name","description":"New name for the fleet","required":false,"schema":{"description":"New name for the fleet","type":"string","minLength":1}},{"name":"restrictToNetwork","description":"Restrict the fleet to its garage networks","required":false,"schema":{"description":"Restrict the fleet to its garage networks","type":"boolean"}},{"name":"holderCompanyId","description":"ID of the company the vehicles belong to. Admin only.","required":false,"schema":{"description":"ID of the company the vehicles belong to. Admin only.","type":"string","minLength":1}},{"name":"managerCompanyId","description":"ID of the company that manages the fleet: the holder itself, a lessor or an outsourced manager. Admin only.","required":false,"schema":{"description":"ID of the company that manages the fleet: the holder itself, a lessor or an outsourced manager. Admin only.","type":"string","minLength":1}}],"result":{"name":"result","schema":{"type":"object","properties":{"fleet":{"type":"object","properties":{"id":{"type":"string","description":"Fleet identifier."},"name":{"type":"string","description":"Name of the fleet."},"holderCompany":{"description":"Company the vehicles of the fleet belong to.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}},"managerCompany":{"description":"Company managing the fleet: the holder itself, a lessor or an outsourced manager.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}}},"required":["id","name"],"additionalProperties":{},"description":"The fleet after the update."}},"required":["fleet"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-get","description":"Returns a fleet by ID. Requires managing the fleet, or admin access.","params":[{"name":"fleetId","description":"ID of the fleet to retrieve","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet to retrieve"}}],"result":{"name":"result","schema":{"type":"object","properties":{"fleet":{"type":"object","properties":{"id":{"type":"string","description":"Fleet identifier."},"name":{"type":"string","description":"Name of the fleet."},"holderCompany":{"description":"Company the vehicles of the fleet belong to.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}},"managerCompany":{"description":"Company managing the fleet: the holder itself, a lessor or an outsourced manager.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}}},"required":["id","name"],"additionalProperties":{},"description":"The requested fleet."}},"required":["fleet"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-list","description":"Returns the fleets managed by the authenticated user. Requires a fleet manager account, or admin access.","params":[],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Fleet identifier."},"name":{"type":"string","description":"Name of the fleet."},"holderCompany":{"description":"Company the vehicles of the fleet belong to.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}},"managerCompany":{"description":"Company managing the fleet: the holder itself, a lessor or an outsourced manager.","type":"object","properties":{"id":{"type":"string","description":"Company identifier."},"tradeName":{"type":"string","description":"Trade name of the company."}},"required":["id","tradeName"],"additionalProperties":{}}},"required":["id","name"],"additionalProperties":{}},"description":"The fleets managed by the authenticated user."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-vehicle-add","description":"Adds vehicles to a fleet by license plate. Already-present plates are skipped and previously removed ones are reactivated. If any plate is already attached to another active fleet, the whole call is refused without naming the plate: contact Mekago support. Each plate is linked to the Mekago vehicle held by the holder or the managing company of the fleet, when there is one, and left unlinked when that vehicle is still attached to another fleet, even a deleted one. Requires managing the fleet, or admin access.","params":[{"name":"fleetId","description":"ID of the fleet to add vehicles to","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet to add vehicles to"}},{"name":"licensePlates","description":"License plates to add to the fleet (e.g. AB-123-CD). Existing active plates are skipped, removed ones are reactivated.","required":true,"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":12},"description":"License plates to add to the fleet (e.g. AB-123-CD). Existing active plates are skipped, removed ones are reactivated."}}],"result":{"name":"result","schema":{"type":"object","properties":{"vehicles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Fleet vehicle identifier."},"fleetId":{"type":"string","description":"Identifier of the owning fleet."},"licensePlate":{"type":"string","description":"License plate of the vehicle."},"customerVehicleId":{"description":"Identifier of the Mekago vehicle carrying this plate, held by the holder or the managing company of the fleet; absent when no such vehicle exists or when it is still attached to another fleet, even a deleted one. Computed when the plate is added or reactivated, when the fleet companies change, and before an authorization is granted; not refreshed otherwise.","type":"string"}},"required":["id","fleetId","licensePlate"],"additionalProperties":{}},"description":"The vehicles now attached to the fleet."},"reactivated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of vehicles that were reactivated instead of created."},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of vehicles that were already present in the fleet."}},"required":["vehicles","reactivated","skipped"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-vehicle-remove","description":"Removes a vehicle from its fleet. Requires managing the fleet, or admin access.","params":[{"name":"fleetVehicleId","description":"ID of the fleet vehicle to remove","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet vehicle to remove"}}],"result":{"name":"result","schema":{"type":"object","properties":{"fleetVehicleId":{"type":"string","description":"Identifier of the vehicle removed from the fleet."}},"required":["fleetVehicleId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-vehicles-list","description":"Returns the active vehicles of a fleet. Requires managing the fleet, or admin access.","params":[{"name":"fleetId","description":"ID of the fleet whose vehicles to list","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet whose vehicles to list"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Fleet vehicle identifier."},"fleetId":{"type":"string","description":"Identifier of the owning fleet."},"licensePlate":{"type":"string","description":"License plate of the vehicle."},"customerVehicleId":{"description":"Identifier of the Mekago vehicle carrying this plate, held by the holder or the managing company of the fleet; absent when no such vehicle exists or when it is still attached to another fleet, even a deleted one. Computed when the plate is added or reactivated, when the fleet companies change, and before an authorization is granted; not refreshed otherwise.","type":"string"}},"required":["id","fleetId","licensePlate"],"additionalProperties":{}},"description":"The vehicles belonging to the fleet."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-create","description":"Creates a private garage network owned by one of your fleets. Requires managing the fleet, or admin access. Public networks are managed by Mekago administrators.","params":[{"name":"fleetId","description":"ID of the fleet that owns the private network","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet that owns the private network"}},{"name":"name","description":"Name of the garage network to create","required":true,"schema":{"type":"string","minLength":1,"description":"Name of the garage network to create"}}],"result":{"name":"result","schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","description":"Garage network identifier."},"name":{"type":"string","description":"Name of the garage network."}},"required":["id","name"],"additionalProperties":{},"description":"The garage network that was created."}},"required":["network"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-update","description":"Renames a garage network owned by one of your fleets. Requires managing the owning fleet, or admin access.","params":[{"name":"networkId","description":"ID of the garage network to rename","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage network to rename"}},{"name":"name","description":"New name for the garage network","required":true,"schema":{"type":"string","minLength":1,"description":"New name for the garage network"}}],"result":{"name":"result","schema":{"type":"object","properties":{"network":{"type":"object","properties":{"id":{"type":"string","description":"Garage network identifier."},"name":{"type":"string","description":"Name of the garage network."}},"required":["id","name"],"additionalProperties":{},"description":"The garage network after the rename."}},"required":["network"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-list","description":"Returns the garage networks owned by the fleets you manage. Requires a fleet manager account, or admin access.","params":[],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage network identifier."},"name":{"type":"string","description":"Name of the garage network."}},"required":["id","name"],"additionalProperties":{}},"description":"The garage networks managed by the authenticated user."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-garage-add","description":"Adds a garage to one of your private networks. Skips silently if already a member. Requires managing the owning fleet, or admin access.","params":[{"name":"networkId","description":"ID of the garage network","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage network"}},{"name":"garageId","description":"ID of the garage to add to the network","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage to add to the network"}}],"result":{"name":"result","schema":{"type":"object","properties":{"networkId":{"type":"string","description":"Identifier of the garage network."},"garageId":{"type":"string","description":"Identifier of the garage added to the network."}},"required":["networkId","garageId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-garage-remove","description":"Removes a garage from one of your private networks. No-op if not a member. Requires managing the owning fleet, or admin access.","params":[{"name":"networkId","description":"ID of the garage network","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage network"}},{"name":"garageId","description":"ID of the garage to remove from the network","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage to remove from the network"}}],"result":{"name":"result","schema":{"type":"object","properties":{"networkId":{"type":"string","description":"Identifier of the garage network."},"garageId":{"type":"string","description":"Identifier of the garage removed from the network."}},"required":["networkId","garageId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"network-garages-list","description":"Returns the garages that belong to one of your private networks. Requires managing the owning fleet, or admin access.","params":[{"name":"networkId","description":"ID of the garage network whose garages to list","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the garage network whose garages to list"}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Garage identifier."},"name":{"type":"string","description":"Commercial name of the garage."},"slug":{"type":"string","description":"URL slug of the garage public page."},"isActive":{"type":"boolean","description":"Whether the garage accepts bookings."}},"required":["id","name","slug","isActive"],"additionalProperties":{}},"description":"The garages belonging to the network."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-offering-authorization-create","description":"Authorizes a fleet vehicle for an offering at specific garages or networks, with optional terms: issuer and payer companies, reference, validity, maximum amount in centimes and targeted driver. When an open authorization already exists for the same vehicle and offering, it is updated instead of duplicated: the garages and networks given replace the previous scope, omitted terms are kept and a term given as null is cleared. Validity, maximum amount and targeted driver are recorded but not enforced yet. Requires managing the fleet, or admin access.","params":[{"name":"fleetId","description":"ID of the fleet owning the vehicle","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the fleet owning the vehicle"}},{"name":"licensePlate","description":"License plate of the fleet vehicle to authorize (e.g. AB-123-CD)","required":true,"schema":{"type":"string","minLength":1,"maxLength":12,"description":"License plate of the fleet vehicle to authorize (e.g. AB-123-CD)"}},{"name":"offeringId","description":"ID of the offering the vehicle is authorized for","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the offering the vehicle is authorized for"}},{"name":"garageIds","description":"IDs of garages allowed to perform the offering","required":false,"schema":{"description":"IDs of garages allowed to perform the offering","type":"array","items":{"type":"string","minLength":1}}},{"name":"networkIds","description":"IDs of garage networks allowed to perform the offering","required":false,"schema":{"description":"IDs of garage networks allowed to perform the offering","type":"array","items":{"type":"string","minLength":1}}},{"name":"issuedByCompanyId","description":"ID of the company issuing the authorization: the holder or the managing company of the fleet. null clears it.","required":false,"schema":{"description":"ID of the company issuing the authorization: the holder or the managing company of the fleet. null clears it.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},{"name":"payerCompanyId","description":"ID of the company paying for the work: the holder or the managing company of the fleet (default on creation: the holder company). null clears it.","required":false,"schema":{"description":"ID of the company paying for the work: the holder or the managing company of the fleet (default on creation: the holder company). null clears it.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},{"name":"reference","description":"Authorization or purchase order number to report on the invoice. null clears it.","required":false,"schema":{"description":"Authorization or purchase order number to report on the invoice. null clears it.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},{"name":"validUntil","description":"ISO-8601 timestamp until which the authorization is valid. Recorded, not enforced yet. null clears it.","required":false,"schema":{"description":"ISO-8601 timestamp until which the authorization is valid. Recorded, not enforced yet. null clears it.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},{"name":"maxAmount","description":"Maximum amount covered, in centimes. Recorded, not enforced yet. null clears it.","required":false,"schema":{"description":"Maximum amount covered, in centimes. Recorded, not enforced yet. null clears it.","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},{"name":"driverId","description":"ID of the only driver allowed to use the authorization (default: every driver of the vehicle). Requires the plate to be linked to a Mekago vehicle; the driver must be a live driver of that vehicle or a member of its company. Recorded, not enforced yet. null clears it.","required":false,"schema":{"description":"ID of the only driver allowed to use the authorization (default: every driver of the vehicle). Requires the plate to be linked to a Mekago vehicle; the driver must be a live driver of that vehicle or a member of its company. Recorded, not enforced yet. null clears it.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}],"result":{"name":"result","schema":{"type":"object","properties":{"authorization":{"type":"object","properties":{"id":{"type":"string","description":"Offering authorization identifier."},"fleetVehicleId":{"type":"string","description":"Identifier of the authorized fleet vehicle."},"offeringId":{"type":"string","description":"Identifier of the authorized offering."},"status":{"type":"string","enum":["OPEN","CONSUMED","CANCELLED","EXPIRED"],"description":"OPEN: usable. CONSUMED: used by the reservation in reservationId; back to OPEN when that reservation is cancelled, deleted or moved to another vehicle or offering, or CANCELLED if another authorization is already open for the same vehicle and offering. CANCELLED: cancelled by a fleet manager or an admin, or released while another authorization was already open. EXPIRED: reserved for authorizations past validUntil, not set yet."},"issuedByCompanyId":{"description":"Company that issued the authorization.","type":"string"},"issuedByUserId":{"description":"User who recorded the authorization.","type":"string"},"payerCompanyId":{"description":"Company that pays for the work.","type":"string"},"reference":{"description":"Authorization or purchase order number to report on the invoice.","type":"string"},"validUntil":{"description":"ISO-8601 timestamp until which the authorization is valid. Recorded, not enforced yet.","type":"string"},"maxAmount":{"description":"Maximum amount covered, in centimes. Recorded, not enforced yet.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"driverId":{"description":"Driver the authorization is restricted to; absent means every driver of the vehicle. Recorded, not enforced yet.","type":"string"}},"required":["id","fleetVehicleId","offeringId","status"],"additionalProperties":{},"description":"The offering authorization that was created or reused."}},"required":["authorization"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-offering-authorization-list","description":"Returns the offering authorizations of every status (OPEN, CONSUMED, CANCELLED, EXPIRED) with their terms, for a fleet or for a license plate across managed fleets. Requires managing the fleet, or admin access.","params":[{"name":"fleetId","description":"ID of the fleet whose authorizations to list","required":false,"schema":{"description":"ID of the fleet whose authorizations to list","type":"string","minLength":1}},{"name":"licensePlate","description":"License plate to list authorizations for, across all managed fleets","required":false,"schema":{"description":"License plate to list authorizations for, across all managed fleets","type":"string","minLength":1,"maxLength":12}}],"result":{"name":"result","schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of items returned."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Offering authorization identifier."},"fleetVehicleId":{"type":"string","description":"Identifier of the authorized fleet vehicle."},"offeringId":{"type":"string","description":"Identifier of the authorized offering."},"status":{"type":"string","enum":["OPEN","CONSUMED","CANCELLED","EXPIRED"],"description":"OPEN: usable. CONSUMED: used by the reservation in reservationId; back to OPEN when that reservation is cancelled, deleted or moved to another vehicle or offering, or CANCELLED if another authorization is already open for the same vehicle and offering. CANCELLED: cancelled by a fleet manager or an admin, or released while another authorization was already open. EXPIRED: reserved for authorizations past validUntil, not set yet."},"issuedByCompanyId":{"description":"Company that issued the authorization.","type":"string"},"issuedByUserId":{"description":"User who recorded the authorization.","type":"string"},"payerCompanyId":{"description":"Company that pays for the work.","type":"string"},"reference":{"description":"Authorization or purchase order number to report on the invoice.","type":"string"},"validUntil":{"description":"ISO-8601 timestamp until which the authorization is valid. Recorded, not enforced yet.","type":"string"},"maxAmount":{"description":"Maximum amount covered, in centimes. Recorded, not enforced yet.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"driverId":{"description":"Driver the authorization is restricted to; absent means every driver of the vehicle. Recorded, not enforced yet.","type":"string"}},"required":["id","fleetVehicleId","offeringId","status"],"additionalProperties":{}},"description":"The offering authorizations matching the requested fleet or license plate."}},"required":["count","items"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}},{"name":"fleet-offering-authorization-cancel","description":"Cancels an open offering authorization: its status becomes CANCELLED and it is kept for history. Fails if it is linked to a reservation or no longer open. Requires managing the owning fleet, or admin access.","params":[{"name":"offeringAuthorizationId","description":"ID of the offering authorization to cancel","required":true,"schema":{"type":"string","minLength":1,"description":"ID of the offering authorization to cancel"}}],"result":{"name":"result","schema":{"type":"object","properties":{"offeringAuthorizationId":{"type":"string","description":"Identifier of the cancelled offering authorization."}},"required":["offeringAuthorizationId"],"$schema":"https://json-schema.org/draft/2020-12/schema"}}}]}