{"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"}}},{"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"}}},{"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"}}},{"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"}}},{"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"}}},{"name":"customer-vehicle-add","description":"Adds a new vehicle to the authenticated customer's account. 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","required":true,"schema":{"type":"string","enum":["diesel","gasoline","electric","hybrid","lpg"],"description":"Vehicle energy type"}},{"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"}}},{"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","required":true,"schema":{"type":"string","enum":["diesel","gasoline","electric","hybrid","lpg"],"description":"Vehicle energy type"}},{"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"}}},{"name":"customer-reservations-list","description":"Returns a list of reservations for the authenticated customer. Admins can specify a customerId to list reservations for any customer.","params":[{"name":"customerId","description":"Customer ID (admin only - to list reservations for a specific customer)","required":false,"schema":{"description":"Customer ID (admin only - to list reservations for a specific customer)","type":"string"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"customer-reservation-get","description":"Returns a specific reservation for the authenticated customer. Admins can specify a customerId to access any customer's reservation.","params":[{"name":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"customerId","description":"Customer ID (admin only - to access a specific customer's reservation)","required":false,"schema":{"description":"Customer ID (admin only - to access a specific customer's reservation)","type":"string"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"customer-reservation-cancel","description":"Cancels a reservation for the authenticated customer. Only PENDING or CONFIRMED reservations in the future can be cancelled.","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"}}},{"name":"customer-reservation-create","description":"Creates a reservation for the authenticated customer. Requires a customer vehicle and a garage offering with an available time slot. 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","required":true,"schema":{"type":"string","minLength":1,"description":"Garage offering ID"}},{"name":"date","description":"Reservation date (YYYY-MM-DD)","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation date (YYYY-MM-DD)"}},{"name":"startTime","description":"Start time in minutes from midnight","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start time in minutes from midnight"}},{"name":"endTime","description":"End time in minutes from midnight","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"End time in minutes from midnight"}},{"name":"dropOffTime","description":"Drop-off time in minutes from midnight (optional)","required":false,"schema":{"description":"Drop-off time in minutes from midnight (optional)","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"}}},{"name":"customer-reservation-reschedule","description":"Reschedules a reservation for the authenticated customer to a new date and time. Only PENDING or CONFIRMED reservations 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"}}],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"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"}}},{"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"}}},{"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"}}},{"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","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"}}},{"name":"garage-reservation-create","description":"Creates a new reservation for a customer in the garage. Accepts mechanicId or externalId (scoped to the garageId) to identify the mechanic. 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":"customerId","description":"Customer ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer ID"}},{"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)"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"garage-reservation-update","description":"Updates an existing reservation in 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":"reservationId","description":"Reservation ID","required":true,"schema":{"type":"string","minLength":1,"description":"Reservation ID"}},{"name":"customerId","description":"Customer ID","required":true,"schema":{"type":"string","minLength":1,"description":"Customer ID"}},{"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)"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"garage-reservation-notify-vehicle-ready","description":"Marks the vehicle as ready and sends a vehicle ready notification to the customer by email and SMS for standard reservations. Pickup reservations are recorded without notifying the customer, since the customer collects the vehicle. 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"}}},{"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"}}},{"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"}}},{"name":"garage-update","description":"Updates basic garage information (name, description, phone, email, logo, timezone, active status, acceptsNewCustomers). 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-z]{2,}$"}},{"name":"logo","description":"New logo URL","required":false,"schema":{"description":"New logo URL","type":"string","maxLength":500}},{"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","required":false,"schema":{"description":"New active status","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"}}},{"name":"garage-address-update","description":"Updates the address of a garage. 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 (e.g., FR, BE, CH)","required":false,"schema":{"description":"Country code (e.g., FR, BE, CH)","type":"string"}},{"name":"lat","description":"Latitude","required":false,"schema":{"description":"Latitude","type":"number"}},{"name":"lon","description":"Longitude","required":false,"schema":{"description":"Longitude","type":"number"}}],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"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 OWNER or MANAGER role, or admin access. 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"}}},{"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. 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"}}},{"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. 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"}}},{"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. 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":"New active status","required":false,"schema":{"description":"New active status","type":"boolean"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"garage-mechanic-remove","description":"Removes a mechanic from a garage (soft delete - sets isActive to false). The mechanic can be reactivated later using garage-mechanic-add. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. 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"}}},{"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. 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"}}},{"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. Accepts mechanicId or (garageId + externalId). Requires OWNER or MANAGER role, or admin access. 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.","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."}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"mechanic-hours-list","description":"Lists the working hours for a specific mechanic. Returns a resource link to fetch the mechanic hours data. 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"}}},{"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.","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"}}},{"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. 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"}}},{"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. Accepts mechanicId or (garageId + externalId). 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}},{"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"}}},{"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.","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"}}},{"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.","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"}}},{"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"}}},{"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. 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"}}},{"name":"garage-deactivate","description":"Deactivates a garage, hiding it from search results and preventing new bookings. Existing reservations are not affected. The garage can be reactivated later using garage-activate. 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"}}},{"name":"garage-offerings-list","description":"Returns a resource link to list all offerings for 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"}}},{"name":"garage-offering-add","description":"Adds one or more catalog offerings to a garage with duration. The offerings must exist in the catalog. 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},"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"}}},{"name":"garage-offering-update","description":"Updates a garage offering (duration, active status). 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"}}],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"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"}}},{"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"}}},{"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"}}},{"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) 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"}}},{"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"}}},{"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"}}},{"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"}}},{"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 (0-1439). Defaults are 0 and 720 (noon). 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-1439). Default is 0.","required":true,"schema":{"type":"integer","minimum":0,"maximum":1439,"description":"Drop-off window start time in minutes since midnight (0-1439). Default is 0."}},{"name":"endTime","description":"Drop-off window end time in minutes since midnight (1-1440). Default is 720 (noon).","required":true,"schema":{"type":"integer","minimum":1,"maximum":1440,"description":"Drop-off window end time in minutes since midnight (1-1440). Default is 720 (noon)."}}],"result":{"name":"result","schema":{"type":"object"}}},{"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)","required":true,"schema":{"type":"string","enum":["GARAGE_NEW_RESERVATION","GARAGE_RESERVATION_CANCELLED","GARAGE_RESERVATION_RESCHEDULED"],"description":"Notification type (GARAGE_NEW_RESERVATION, GARAGE_RESERVATION_CANCELLED, GARAGE_RESERVATION_RESCHEDULED)"}},{"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"}}},{"name":"garage-closing-periods-list","description":"Returns a resource link to list all closing periods for 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"}}},{"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"}}},{"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"}}},{"name":"customer-vehicle-delete","description":"Soft deletes a vehicle from the authenticated customer's account. 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"}}},{"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"}}},{"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.","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"}}},{"name":"api-key-list","description":"Lists M2M API keys. Admins can list any user's keys. Garage owners see only their own keys.","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"}}},{"name":"api-key-revoke","description":"Revokes an M2M API key. Admins can revoke any key. Garage owners can only revoke their own keys.","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"}}},{"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"}}},{"name":"customer-notification-preferences-update","description":"Toggles an email notification preference for the authenticated customer","params":[{"name":"notificationType","description":"The notification type to update","required":true,"schema":{"type":"string","enum":["CUSTOMER_RESERVATION_CONFIRMATION","CUSTOMER_RESERVATION_CANCELLED","CUSTOMER_RESERVATION_RESCHEDULED","CUSTOMER_RESERVATION_REMINDER","CUSTOMER_VEHICLE_READY"],"description":"The notification type to update"}},{"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"}}},{"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"}}},{"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":"uri","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_ready"]}}}],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"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"}}},{"name":"fleet-create","description":"Creates a fleet and registers the authenticated user as one of its managers. Available to any authenticated user.","params":[{"name":"name","description":"Name of the fleet to create","required":true,"schema":{"type":"string","minLength":1,"description":"Name of the fleet to create"}},{"name":"restrictToNetwork","description":"Restrict the fleet to its garage networks (default: false)","required":false,"schema":{"description":"Restrict the fleet to its garage networks (default: false)","type":"boolean"}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"fleet-update","description":"Updates a fleet name or network restriction. Requires managing the fleet, or admin access.","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"}}],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"name":"fleet-list","description":"Returns a resource link to the fleets managed by the authenticated user. Requires a fleet manager account, or admin access.","params":[],"result":{"name":"result","schema":{"type":"object"}}},{"name":"fleet-vehicle-add","description":"Adds vehicles to a fleet by license plate. Already-present plates are skipped and previously removed ones are reactivated. 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"}}},{"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"}}},{"name":"fleet-vehicles-list","description":"Returns a resource link to 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"}}},{"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"}}},{"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"}}},{"name":"network-list","description":"Returns a resource link to the garage networks owned by the fleets you manage. Requires a fleet manager account, or admin access.","params":[],"result":{"name":"result","schema":{"type":"object"}}},{"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"}}},{"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"}}},{"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"}}},{"name":"fleet-offering-authorization-create","description":"Authorizes a fleet vehicle for an offering at specific garages or networks. 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}}}],"result":{"name":"result","schema":{"type":"object"}}},{"name":"fleet-offering-authorization-list","description":"Returns a resource link to the offering authorizations (open and consumed) 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"}}},{"name":"fleet-offering-authorization-cancel","description":"Cancels an offering authorization. Fails if it is linked to an active reservation. 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"}}}]}