{"openapi":"3.1.0","info":{"title":"OffRide API","version":"2026-08-03.v13","description":"Capability-scoped transportation orchestration APIs. Account type, organization membership, resource affiliation, and API access are independent concepts."},"servers":[{"description":"OffRide platform","url":"https://offride.co"}],"tags":[{"description":"Ride requests and fulfillment visibility.","name":"Demand"},{"description":"Partners, fleets, drivers, vehicles, availability, and fulfillment supply.","name":"Supply"},{"description":"Account types, access bundles, capabilities, and tenant authorization.","name":"Access"},{"description":"Webhook and live subscription discovery for operational events.","name":"Events"},{"description":"Version and namespace discovery.","name":"Platform"},{"description":"Deprecated compatibility aliases.","name":"Compatibility"}],"paths":{"/api/v1/demand/capabilities":{"get":{"description":"Lists the Demand API operations currently implemented.","operationId":"getDemandCapabilities","responses":{"200":{"description":"Successful response"}},"summary":"Inspect Demand API capabilities","tags":["Demand"],"x-offride-authority":"public","x-offride-mutation":false}},"/api/v1/demand/requests/preview":{"post":{"description":"Validates and normalizes a request without creating operational state.","operationId":"previewDemandRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestInput"}}},"required":true},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestPreviewResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Preview a demand ride request","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":false}},"/api/v1/demand/requests":{"post":{"description":"Creates an idempotent persistent ride request inside the authenticated Demand tenant.","operationId":"createDemandRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestCreateResponse"}}},"description":"Idempotent replay of the existing ride request and distribution"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestCreateResponse"}}},"description":"Ride request created and distributed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Idempotency key was reused with different ride details"}},"security":[{"bearerAuth":[]}],"summary":"Create a ride request","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true},"get":{"description":"Lists ride requests created by the authenticated Demand tenant.","operationId":"listDemandRideRequests","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List ride requests","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/requests/{requestId}":{"get":{"description":"Returns one ride request, fulfillment state, assignment, offers, and lifecycle for the authenticated Demand tenant.","operationId":"getDemandRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a ride request","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"patch":{"description":"Updates an unassigned Demand ride request in the authenticated tenant. Pending supply offers are withdrawn so the updated trip can be dispatched safely.","operationId":"updateDemandRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update a ride request","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true},"delete":{"description":"Cancels an unassigned Demand ride request in the authenticated tenant. The ride remains available in history with its lifecycle evidence intact.","operationId":"cancelDemandRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Cancel a ride request","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/stream":{"get":{"description":"Streams tenant-scoped ride state, authorized assigned-driver location, and durable operational notifications.","operationId":"streamDemandOperations","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Stream demand operations","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.fulfillment.read","x-offride-mutation":false}},"/api/v1/demand/notifications":{"get":{"description":"Lists durable ride notifications for the authenticated Demand tenant.","operationId":"listDemandNotifications","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List demand notifications","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.fulfillment.read","x-offride-mutation":false}},"/api/v1/demand/notifications/{notificationId}":{"patch":{"description":"Marks one tenant-scoped operational notification as read.","operationId":"readDemandNotification","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Mark a demand notification read","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.fulfillment.read","x-offride-mutation":true}},"/api/v1/supply/capabilities":{"get":{"description":"Lists the Supply API operations currently implemented.","operationId":"getSupplyCapabilities","responses":{"200":{"description":"Successful response"}},"summary":"Inspect Supply API capabilities","tags":["Supply"],"x-offride-authority":"public","x-offride-mutation":false}},"/api/v1/supply/offers":{"get":{"description":"Lists fleet-addressed offers and direct offers for drivers affiliated with the authenticated fleet.","operationId":"listFleetDriverOffers","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List incoming fleet offers","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.read","x-offride-mutation":false}},"/api/v1/supply/driver/me/location":{"post":{"description":"Idempotently records a versioned location sample for the signed-in driver while they are online.","operationId":"updateDriverSelfLocation","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update the signed-in driver's location","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"trip.location.write","x-offride-mutation":true}},"/api/v1/events/capabilities":{"get":{"description":"Lists event topics and the webhook or WebSocket transports planned for each topic. This discovery operation does not create a subscription.","operationId":"getEventCapabilities","responses":{"200":{"description":"Successful response"}},"summary":"Inspect event delivery contracts","tags":["Events"],"x-offride-authority":"public","x-offride-mutation":false}},"/api/v1/supply/organization":{"get":{"description":"Returns the supply organization scoped by the authenticated tenant.","operationId":"getSupplyOrganization","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the authenticated supply organization","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.read","x-offride-mutation":false}},"/api/v1/supply/fee-policy":{"get":{"description":"Reads the fees on rides this fleet supplies: its fleet override over the platform default. Rates in basis points, add-on rules, and the policy versions they come from.","operationId":"getSupplyFeePolicy","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the fleet's fees","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.read","x-offride-mutation":false}},"/api/v1/supply/drivers":{"get":{"description":"Lists active driver relationships in the authenticated fleet, including employee or contractor relationship, exclusivity, compensation basis, and primary fleet vehicle assignment.","operationId":"listSupplyDrivers","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List fleet drivers","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.read","x-offride-mutation":false},"post":{"description":"Adds an existing or new OffRide driver to the authenticated fleet with an explicit employee or contractor relationship, exclusivity policy, compensation basis, and optional primary vehicle, without taking ownership of the person's account.","operationId":"createSupplyDriver","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Add a fleet driver","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/drivers/{driverId}":{"patch":{"description":"Updates fleet-managed driver contact, employee or contractor relationship, exclusivity, hourly or per-ride compensation, and primary vehicle assignment.","operationId":"updateSupplyDriver","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update a fleet driver","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true},"delete":{"description":"Ends a driver's relationship with the authenticated fleet while preserving their OffRide identity and other affiliations.","operationId":"removeSupplyDriver","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Remove a driver from the fleet","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/drivers/{driverId}/availability":{"get":{"description":"Returns a fleet driver's effective availability, deterministic precedence, active schedule rules, and persisted audit history.","operationId":"getSupplyDriverAvailability","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read driver availability","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.read","x-offride-mutation":false},"patch":{"description":"Sets a fleet driver's immediate baseline supply scope and IANA time zone with an auditable reason.","operationId":"setSupplyDriverAvailability","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set immediate driver availability","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/drivers/{driverId}/availability/rules":{"post":{"description":"Creates a one-time or weekly fleet-scoped availability rule with an effective window and audit reason.","operationId":"createSupplyDriverAvailabilityRule","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Schedule driver availability","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/drivers/{driverId}/availability/rules/{ruleId}":{"patch":{"description":"Replaces one active schedule rule while retaining the superseded rule and its audit history.","operationId":"updateSupplyDriverAvailabilityRule","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update driver availability rule","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true},"delete":{"description":"Soft-deletes one active driver availability rule while retaining its persisted audit history.","operationId":"deleteSupplyDriverAvailabilityRule","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Remove a driver availability rule","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/vehicles":{"get":{"description":"Lists the authenticated fleet's active, maintenance, and retired vehicles and capacity details.","operationId":"listSupplyVehicles","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List fleet vehicles","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.vehicles.read","x-offride-mutation":false},"post":{"description":"Registers a vehicle and its service class, capacity, accessibility, and operating state in the authenticated fleet.","operationId":"createSupplyVehicle","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Add a fleet vehicle","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.vehicles.write","x-offride-mutation":true}},"/api/v1/supply/vehicles/{vehicleId}":{"patch":{"description":"Updates one vehicle owned by the authenticated fleet.","operationId":"updateSupplyVehicle","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update a fleet vehicle","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.vehicles.write","x-offride-mutation":true},"delete":{"description":"Retires a vehicle and clears its active fleet assignments while preserving ride history.","operationId":"retireSupplyVehicle","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Retire a fleet vehicle","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.vehicles.write","x-offride-mutation":true}},"/api/v1/supply/tracking/drivers":{"get":{"description":"Returns current location and freshness for drivers whose location was shared inside the authenticated fleet workspace. Driver roster access is also required.","operationId":"getFleetDriverTracking","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Track authorized fleet drivers","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"trip.tracking.read","x-offride-mutation":false}},"/api/v1/supply/offers/{offerId}/response":{"post":{"description":"Accepts or rejects an unexpired marketplace offer already bound to one eligible driver and vehicle. The responding actor cannot replace that supply unit.","operationId":"respondToDriverOffer","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseInput"}}},"required":true},"responses":{"200":{"description":"Operation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseEnvelope"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Offer is not addressed to this actor or tenant"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Offer is closed, expired, ineligible, or another recipient already won"}},"security":[{"bearerAuth":[]}],"summary":"Respond to an incoming supply offer","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"trip.lifecycle.write","x-offride-mutation":true}},"/api/v1/supply/rides/{rideId}/assignment":{"post":{"description":"Assigns an eligible driver and vehicle to an internal-fleet ride owned by the active organization. Marketplace rides cannot use this operation.","operationId":"assignInternalFleetRide","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalFleetAssignmentInput"}}},"required":true},"responses":{"200":{"description":"Operation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideAssignmentEnvelope"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Internal ride is not owned by this supply tenant"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Ride is already assigned or the selected unit is no longer eligible"}},"security":[{"bearerAuth":[]}],"summary":"Dispatch an internal fleet ride","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.write","x-offride-mutation":true}},"/api/v1/demand/requests/{requestId}/cancellation":{"get":{"description":"Lists the reasons a demand partner may give for cancelling a ride.","operationId":"listDemandCancellationReasons","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List cancellation reasons","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":false},"post":{"description":"Cancels a ride with a stated reason, including one already assigned. The driver is told and released, and the reason decides compensation.","operationId":"cancelRideWithReason","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Cancel a ride with a reason","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/fleet/capabilities":{"get":{"deprecated":true,"description":"Compatibility namespace retained while consumers migrate to Demand and Supply.","operationId":"getFleetCapabilities","responses":{"200":{"description":"Successful response"}},"summary":"Inspect deprecated Fleet aliases","tags":["Compatibility"],"x-offride-authority":"public","x-offride-mutation":false}},"/api/v1/fleet/requests/preview":{"post":{"deprecated":true,"description":"Deprecated alias for the Demand ride request preview operation.","operationId":"previewFleetRideRequest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestInput"}}},"required":true},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RideRequestPreviewResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Preview a ride request through the Fleet alias","tags":["Compatibility"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":false}},"/api/v1/events/webhooks":{"get":{"description":"Lists the authenticated partner's webhook endpoints. Signing secrets are never listed.","operationId":"listWebhookEndpoints","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List webhook endpoints","tags":["Events"],"x-offride-authority":"capability","x-offride-capability":"events.webhooks.read","x-offride-mutation":false},"post":{"description":"Registers a webhook endpoint for ride and offer topics and returns its signing secret once. Deliveries are signed with the Standard Webhooks scheme. ride.cancelled carries data.cancellation (RideCancellation): who cancelled (demand, operator, rider, driver or system) and the reason code and label.","operationId":"createWebhookEndpoint","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Register a webhook endpoint","tags":["Events"],"x-offride-authority":"capability","x-offride-capability":"events.webhooks.write","x-offride-mutation":true}},"/api/v1/events/webhooks/{webhookId}":{"delete":{"description":"Disables a webhook endpoint and stops its undelivered events.","operationId":"disableWebhookEndpoint","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Disable a webhook endpoint","tags":["Events"],"x-offride-authority":"capability","x-offride-capability":"events.webhooks.write","x-offride-mutation":true}},"/api/v1/events/webhooks/{webhookId}/deliveries":{"get":{"description":"Lists recent deliveries for one webhook endpoint with status, attempts, and the last response.","operationId":"listWebhookDeliveries","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the webhook delivery log","tags":["Events"],"x-offride-authority":"capability","x-offride-capability":"events.webhooks.read","x-offride-mutation":false}},"/api/v1/events/webhooks/{webhookId}/deliveries/{deliveryId}/replay":{"post":{"description":"Queues one delivery to be sent again with a fresh retry budget.","operationId":"replayWebhookDelivery","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Replay a webhook delivery","tags":["Events"],"x-offride-authority":"capability","x-offride-capability":"events.webhooks.write","x-offride-mutation":true}},"/api/v1/demand/bookings":{"post":{"description":"Creates an idempotent multi-leg booking. Each leg becomes one ride carrying its stops, flight, service type, extras, and meet-and-greet; missing coordinates are geocoded server-side when a geocoder is configured. A shared_seat leg whose seat hold lapsed or was released is refused with 410 seats_expired (hold again); other problems are 422 booking_unplaceable with details. An optional partner block records who booked and their cut (see docs/partner-integration.md, Demand partners): a partner booking for its client, or a system mirroring a partner's booking with partner.ref and its own economics. An optional statedPrice (BookingStatedPrice; needs the statedPrice entitlement, 403 not_entitled otherwise) states the price the partner charged: each leg's ride is offered and settled on its stated amount, and the booking's price.source is partner_stated. A booking is priced by a quote or a stated price, not both.","operationId":"createDemandBooking","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":120}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Create a booking","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/bookings/{bookingId}":{"get":{"description":"Reads a booking and the current state of each leg. price (BookingPrice) is null unless the booking was bought from a quote (source quote) or the partner stated its price (source partner_stated, with each leg's amount and the breakdown).","operationId":"getDemandBooking","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a booking","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"patch":{"description":"Changes the details of a booking's existing legs (times, addresses, party, stops, flight, extras). Reports per leg whether it was updated, unchanged, or refused because a driver already holds it. A partner block changes the payer or carries the sending system's commissionStatus and economics. A statedPrice (statedPrice entitlement) restates the price: legs not yet taken are offered again at the new pay, legs a driver holds keep the driver and settle on the new amount, finished legs keep their settlement. Left out, the stated price stays. A booking bought from a quote can't be restated (422).","operationId":"updateDemandBooking","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Update a booking","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/bookings/{bookingId}/payment-state":{"put":{"description":"Records what the customer has paid (paid, deposit, cash_at_pickup, call_to_confirm, refunded) so dispatch knows what to collect.","operationId":"setDemandBookingPaymentState","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStateInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a booking's payment state","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/bookings/{bookingId}/cancellation":{"post":{"description":"Cancels a whole booking, or chosen legs, with one reason. Finished legs are reported rather than failed, so the call is safe to repeat.","operationId":"cancelDemandBooking","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCancellationInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Cancel a booking","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/rate-card":{"get":{"description":"Reads the partner's rate card in force: products, pricing components, rules, coupons, fees.","operationId":"getDemandRateCard","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the rate card","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"put":{"description":"Publishes a new version of the partner's rate card. Earlier quotes keep the version they were priced from. With ?dryRun=true (or \"dryRun\": true in the body) nothing is saved: 200 with the parsed card, diff.changes against the card in force ([{ path, change: added|removed|changed, before, after }]), nextVersion, publishable and blockedBy (the entitlement it still needs). An invalid card is 400 invalid_rate_card either way.","operationId":"publishDemandRateCard","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}},{"description":"Validate and diff against the card in force without saving.","in":"query","name":"dryRun","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateCard"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Publish a rate card","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/fee-policy":{"get":{"description":"Reads the fees this partner pays now: on marketplace rides it books, and on rides its own fleet drives. Rates in basis points, add-on rules, and the policy versions they come from.","operationId":"getDemandFeePolicy","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the partner's fees","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/entitlements":{"get":{"description":"Reads what this partner is enabled to do with prices (own rates, coupons, price adjustments, markup and its pay mode, stated prices) and the markup it has set.","operationId":"getDemandEntitlements","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read your pricing entitlements","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/markup":{"put":{"description":"Sets this partner's margin on the platform's price, { markupBps }. Needs the markup entitlement (403 not_entitled otherwise) and stays within the operator's cap. pass_through rides pay the driver on the marked-up price; partner_only rides on the base price.","operationId":"updateDemandMarkup","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set your markup","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/quotes":{"post":{"description":"Prices a trip (1-10 legs) for every product on the partner's rate card, with line items, rules, coupon, fees and tax, and holds the price until the quote expires. Legs may name their ferry crossings and tolls; the card prices them as required add-ons (line items with kind ferry or toll, parts, required: true; addOnTotal), which no rule or coupon reduces. confirmation is set when a ferry trip should be confirmed by phone. An unknown toll segment is a 409 unknown_toll_segment.","operationId":"createDemandQuote","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Quote a trip","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":true}},"/api/v1/demand/quotes/{quoteId}":{"get":{"description":"Reads a quote and whether its price still holds.","operationId":"getDemandQuote","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a quote","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":false}},"/api/v1/demand/policies/{kind}":{"get":{"description":"Reads one of the partner's operating policies (sales: lead time, window, hours, own-fleet caps, overflow; accountability: confirmation calls, leave-now texts, late alerts, dispatch phones), with defaults filled in.","operationId":"getDemandPolicy","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a partner policy","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"put":{"description":"Sets one of the partner's operating policies; unset fields keep their defaults.","operationId":"setDemandPolicy","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPolicy"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a partner policy","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/supply/service-lines":{"get":{"description":"Lists the partner's scheduled shared-service lines.","operationId":"listServiceLines","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List service lines","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.read","x-offride-mutation":false},"put":{"description":"Creates or replaces a scheduled shared-service line (endpoint rules, per-seat pricing, weekly schedule, capacity, visibility), keyed by slug.","operationId":"putServiceLine","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLine"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a service line","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.write","x-offride-mutation":true}},"/api/v1/supply/service-lines/{lineId}/departures":{"get":{"description":"Lists a line's departures between two instants (from, to; up to 92 days) with status, capacity, and seats sold, held and left.","operationId":"listServiceDepartures","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List departures","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.read","x-offride-mutation":false},"post":{"description":"Adds departures. With { departureAt } (optional seatCapacity, bagCapacity) it creates that one departure by hand: 201 created, 200 if it already existed. With { from, to } it creates what the weekly schedule implies between two dates. Both are idempotent. Lines with a scheduleHorizonDays above 0 (default 60) are also kept scheduled that far ahead automatically; 0 turns that off.","operationId":"scheduleServiceDepartures","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Add departures","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.write","x-offride-mutation":true}},"/api/v1/supply/departures/{departureId}/manifest":{"get":{"description":"Lists the confirmed parties on a departure, grouped by flight.","operationId":"getDepartureManifest","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a departure manifest","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.read","x-offride-mutation":false}},"/api/v1/supply/departures/{departureId}/dispatch":{"post":{"description":"Puts a vehicle and driver on a departure; both must belong to the operator, the vehicle must seat everyone confirmed, and neither may be busy in that window.","operationId":"dispatchDeparture","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Dispatch a departure","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.write","x-offride-mutation":true}},"/api/v1/supply/departures/{departureId}/status":{"put":{"description":"Opens or closes sales, marks a departure departed (it must be dispatched) or completed, or cancels it with its seats. Seat rides follow: departed picks them up, completed completes them, cancelled cancels them. Partners with seats get departure.* events.","operationId":"setDepartureStatus","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a departure's status","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.write","x-offride-mutation":true}},"/api/v1/supply/service-lines/{lineId}/dispatch-policy":{"put":{"description":"Sets how a line's runs find a driver: policy marketplace (default; every eligible driver, first to accept takes it), fleet_first (the operator's own drivers for fleetFirstWindowMinutes, then the marketplace), fleet_only (own drivers only) or direct (no offers); driverPayCents (runs are offered only once set) and offerLeadMinutes (how long before departure a run goes out on its own).","operationId":"setServiceLineDispatchPolicy","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a line's dispatch policy","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.organization.write","x-offride-mutation":true}},"/api/v1/supply/departures/{departureId}/offers":{"get":{"description":"Lists everything offered for a run: its policy and round, who was offered it, and what they did.","operationId":"listDepartureOffers","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List a run's offers","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.read","x-offride-mutation":false},"post":{"description":"Offers a run now under its line's dispatch policy, optionally with { payCents } for this run. Idempotent while its offers are out. Sends departure.offered.","operationId":"offerDeparture","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Offer a run","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.write","x-offride-mutation":true}},"/api/v1/supply/departure-offers":{"get":{"description":"Lists run offers this fleet answers for its drivers.","operationId":"listFleetDepartureOffers","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List run offers to my fleet","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.assignments.read","x-offride-mutation":false}},"/api/v1/supply/departure-offers/{offerId}/response":{"post":{"description":"Accepts or passes a run offer ({ response: accept | reject }). The first acceptance is dispatched with the same capacity and clash checks as a direct dispatch and sends departure.dispatched; a later one gets 409.","operationId":"respondToDepartureOffer","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Answer a run offer","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"trip.lifecycle.write","x-offride-mutation":true}},"/api/v1/demand/seats/search":{"post":{"description":"Finds departures a party can still hold, between two times, on the partner's own lines and marketplace lines, with seatsLeft, bagsLeft and price. Departures past their boarding cut-off are left out.","operationId":"searchSeats","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatSearchInput"}}},"required":true},"responses":{"200":{"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Search shared seats","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":false}},"/api/v1/demand/seats/holds":{"post":{"description":"Holds seats on a departure while the customer pays: holdMinutes, 1 to 35 (default 15). Capacity counts confirmed seats and live holds under a lock. Send an Idempotency-Key header: a retry returns the same hold (200, replayed), and the same key for a different hold is refused (409).","operationId":"holdSeats","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":120}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatHoldInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Hold seats","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/seats/holds/{holdId}/extension":{"post":{"description":"Extends a live hold while a checkout runs longer: it lasts holdMinutes (1 to 35, default 15) from now, never less than before, never past boarding, and at most two hours from when it was made. A lapsed or released hold can't be extended (410); a hold confirmed meanwhile is returned as confirmed.","operationId":"extendSeatHold","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Extend a seat hold","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/seats/holds/{holdId}/confirmation":{"post":{"description":"Confirms held seats with the rider's details.","operationId":"confirmSeatHold","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatConfirmationInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Confirm held seats","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/seats/holds/{holdId}":{"delete":{"description":"Releases a hold. Confirmed seats are refused (409 seats_conflict): cancel the shared_seat ride they were booked as, or, for seats confirmed without a booking, send ?cancelConfirmed=true. Releasing a released or lapsed hold is a no-op.","operationId":"releaseSeats","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Release seats","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/availability":{"post":{"description":"Answers, per service class and leg, whether a trip can be sold and who would fulfil it (own fleet or marketplace overflow), from the sales policy and live supply.","operationId":"checkDemandAvailability","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityInput"}}},"required":true},"responses":{"200":{"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Check availability","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.preview","x-offride-mutation":false}},"/api/v1/supply/roster":{"get":{"description":"Reads the supply partner's drivers and vehicles with the partner's own references.","operationId":"getSupplyRoster","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the supply roster","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.read","x-offride-mutation":false},"put":{"description":"Reconciles the partner's drivers and vehicles, keyed by its own references. Also requires supply.vehicles.write. dryRun reports what would change, which is the roster parity report; mode full retires what the partner no longer lists.","operationId":"syncSupplyRoster","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterInput"}}},"required":true},"responses":{"200":{"description":"Operation completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Request body rejected"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Sync the supply roster","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/driver-invitations":{"get":{"description":"Lists the fleet's driver invitations and their status.","operationId":"listDriverInvitations","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List driver invitations","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.read","x-offride-mutation":false},"post":{"description":"Invites a driver by mobile number with starting ride access and the fleet vehicles they may drive. The driver joins with their own account and accepts their own rides.","operationId":"createDriverInvitation","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Invite a driver by text","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/driver-invitations/{invitationId}":{"delete":{"description":"Withdraws an invitation that has not been accepted.","operationId":"revokeDriverInvitation","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Withdraw a driver invitation","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/supply/drivers/{driverId}/ride-access":{"put":{"description":"Sets which rides a fleet driver can take (fleet, marketplace, both, or paused) and which fleet vehicles they may drive. It never accepts a ride for the driver.","operationId":"setDriverRideAccess","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a driver's ride access and vehicles","tags":["Supply"],"x-offride-authority":"capability","x-offride-capability":"supply.drivers.write","x-offride-mutation":true}},"/api/v1/demand/pickup-spots":{"get":{"description":"Lists the organization's saved pickup spots.","operationId":"listPickupSpots","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List pickup spots","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"post":{"description":"Saves a pickup spot with directions for drivers. Owners and admins only.","operationId":"createPickupSpot","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Save a pickup spot","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/pickup-spots/{spotId}":{"delete":{"description":"Archives a saved pickup spot. Owners and admins only.","operationId":"archivePickupSpot","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Remove a pickup spot","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/partner/enrolment":{"get":{"description":"This partner's enrolment: status, effective terms (commission, who funds it, billing) and the current partner terms text to accept.","operationId":"getDemandPartnerEnrolment","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the partner's enrolment","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/partner/clients":{"get":{"description":"Lists the partner's saved clients (?search=, ?includeArchived=true).","operationId":"listDemandPartnerClients","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List saved clients","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"post":{"description":"Saves a client ({ name or firstName and lastName, email and/or phone, notes? }). The same email updates the client already saved.","operationId":"createDemandPartnerClient","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Save a client","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/partner/clients/{clientId}":{"get":{"description":"Reads one saved client.","operationId":"getDemandPartnerClient","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a saved client","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"patch":{"description":"Changes the fields sent.","operationId":"updateDemandPartnerClient","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Change a saved client","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true},"delete":{"description":"Archives the client. Bookings made for it keep pointing at it.","operationId":"archiveDemandPartnerClient","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Archive a saved client","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/partner/team":{"get":{"description":"Lists the partner's owners, admins and bookers (its organization memberships).","operationId":"listDemandPartnerTeam","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List the partner's team","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/partner/terms/acceptance":{"post":{"description":"Accepts the platform's current partner terms ({ version }). A signed-in person must be an owner or admin. Refused (409) if the version isn't the current one.","operationId":"acceptDemandPartnerTerms","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Accept partner terms","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}},"/api/v1/demand/partner/bookings":{"get":{"description":"Bookings this partner arranged: client, payer, economics snapshot and commission status.","operationId":"listDemandPartnerBookings","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"List the partner's bookings","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/partner/earnings":{"get":{"description":"The partner's commission and markup ledger: totals by status (pending, earned, paid, voided, reversed) and every accrual and reversal line.","operationId":"listDemandPartnerEarnings","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read the partner's earnings","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false}},"/api/v1/demand/bookings/{bookingId}/partner":{"get":{"description":"Who booked this booking and their cut, as the asking organization may see it (the partner, or the organization that sent the booking).","operationId":"getDemandBookingPartner","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Read a booking's partner details","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.read","x-offride-mutation":false},"put":{"description":"Sets the booking's partner block on its own: attaches it when the booking has none, otherwise changes the payer or (from the system that sent the booking) its commissionStatus and economics, which re-runs the parity check.","operationId":"setDemandBookingPartner","parameters":[{"in":"header","name":"X-OffRide-Tenant","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Operation completed"},"401":{"description":"Authentication required"},"403":{"description":"Authority, capability, or tenant scope rejected"}},"security":[{"bearerAuth":[]}],"summary":"Set a booking's partner details","tags":["Demand"],"x-offride-authority":"capability","x-offride-capability":"demand.requests.write","x-offride-mutation":true}}},"components":{"schemas":{"AvailabilityInput":{"properties":{"legs":{"items":{"properties":{"durationMinutes":{"type":"integer"},"pickupAt":{"format":"date-time","type":"string"}},"required":["pickupAt"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"serviceClasses":{"items":{"enum":["sedan","suv","black_car","van","shuttle","bus"],"type":"string"},"type":"array"}},"required":["legs"],"type":"object"},"BookingCancellationInput":{"properties":{"detail":{"type":"string"},"legIndexes":{"items":{"minimum":0,"type":"integer"},"type":"array"},"reasonCode":{"type":"string"}},"required":["reasonCode"],"type":"object"},"BookingInput":{"description":"Booking-level rider, source, party and dispatch apply to every leg that doesn't set its own. Send an Idempotency-Key header on create.","properties":{"externalReference":{"type":"string"},"extras":{"items":{"$ref":"#/components/schemas/Extra"},"type":"array"},"legs":{"items":{"$ref":"#/components/schemas/BookingLeg"},"maxItems":10,"minItems":1,"type":"array"},"mode":{"description":"shadow: recorded and announced, never dispatched or texted.","enum":["live","shadow"],"type":"string"},"test":{"default":false,"description":"A test booking: its rides are offered only to allowlisted test drivers, never to an open call; webhooks carry test: true and settlement is marked test. Shared-seat legs are not allowed.","type":"boolean"},"party":{"properties":{"bags":{"type":"integer"},"passengers":{"type":"integer"},"wheelchairSpaces":{"type":"integer"}},"type":"object"},"paymentState":{"enum":["paid","deposit","cash_at_pickup","call_to_confirm","refunded"],"type":"string"},"quote":{"properties":{"id":{"type":"string"},"productId":{"type":"string"}},"required":["id","productId"],"type":"object"},"rider":{"properties":{"name":{"type":"string"},"phone":{"type":"string"}},"required":["name","phone"],"type":"object"},"source":{"properties":{"channel":{"enum":["api","partner_portal","operator"],"type":"string"},"system":{"type":"string"}},"type":"object"},"statedPrice":{"$ref":"#/components/schemas/BookingStatedPrice"}},"required":["legs"],"type":"object"},"BookingPrice":{"description":"A booking's agreed price (null when it has none).","properties":{"breakdown":{"description":"partner_stated only: the partner's lines, as sent.","items":{"$ref":"#/components/schemas/BookingPriceLine"},"type":["array","null"]},"currency":{"type":"string"},"extrasCents":{"description":"Priced extras included in totalCents.","type":"integer"},"legs":{"description":"partner_stated only: each leg's amount.","items":{"properties":{"amountCents":{"type":"integer"},"legIndex":{"type":"integer"}},"type":"object"},"type":["array","null"]},"productId":{"type":["string","null"]},"quoteId":{"type":["string","null"]},"source":{"enum":["quote","partner_stated"],"type":"string"},"totalCents":{"type":"integer"}},"type":"object"},"BookingPriceLine":{"properties":{"amountCents":{"description":"May be negative (a discount).","type":"integer"},"code":{"type":"string"},"label":{"type":"string"},"legIndex":{"type":"integer"}},"required":["code","amountCents"],"type":"object"},"BookingStatedPrice":{"description":"The price the partner charged its own customer. Needs the statedPrice entitlement. totalCents must equal the legs' amounts plus the booking's priced extras. Each leg's ride is offered and settled on its amount (shared-seat legs keep the platform's price); the platform's own price is kept as the reference.","properties":{"breakdown":{"description":"Informational, up to 40 lines; not checked against the total.","items":{"$ref":"#/components/schemas/BookingPriceLine"},"maxItems":40,"type":"array"},"currency":{"description":"USD (rides settle in USD).","enum":["USD"],"type":"string"},"legs":{"description":"One per leg, in order; required when the booking has more than one leg. A one-leg booking may send only the total.","items":{"properties":{"amountCents":{"minimum":0,"type":"integer"},"legIndex":{"type":"integer"}},"required":["amountCents"],"type":"object"},"type":"array"},"totalCents":{"minimum":0,"type":"integer"}},"required":["totalCents","currency"],"type":"object"},"BookingLeg":{"properties":{"dropoff":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object","description":"Optional for hourly legs (ends where it started)."},"extras":{"items":{"$ref":"#/components/schemas/Extra"},"maxItems":20,"type":"array"},"externalReference":{"type":"string"},"flight":{"properties":{"carrier":{"type":"string"},"direction":{"enum":["arrival","departure"],"type":"string"},"number":{"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}},"required":["number","direction"],"type":"object"},"hours":{"maximum":24,"minimum":1,"type":"number"},"meetAndGreet":{"type":"boolean"},"notes":{"maxLength":500,"type":"string"},"pickup":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"productId":{"description":"A product on the partner's rate card; sets the vehicle class.","type":"string"},"seatHoldId":{"description":"Required for shared_seat legs.","type":"string"},"service":{"properties":{"class":{"enum":["sedan","suv","black_car","van","shuttle","bus"],"type":"string"},"requirements":{"items":{"type":"string"},"type":"array"}},"type":"object"},"serviceType":{"enum":["point_to_point","hourly","shared_seat"],"type":"string"},"stops":{"items":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"maxItems":8,"type":"array"},"timing":{"oneOf":[{"properties":{"mode":{"const":"reserve"},"scheduledFor":{"format":"date-time","type":"string"}},"required":["mode","scheduledFor"],"type":"object"},{"properties":{"arrivalSpeed":{"type":"string"},"mode":{"const":"now"}},"required":["mode","arrivalSpeed"],"type":"object"}]}},"required":["pickup"],"type":"object"},"Extra":{"properties":{"code":{"type":"string"},"label":{"type":"string"},"priceCents":{"description":"Optional price per unit, in cents. A priced extra adds to the booking's price (when bought from a quote) and to its ride's add-ons, which settle to the provider under the fee policy (subject to the platform fee and fleet share unless a rule exempts them). Without it the extra carries no money. An extra the quote already priced can't be priced again.","maximum":1000000,"minimum":0,"type":"integer"},"quantity":{"minimum":1,"type":"integer"}},"required":["code"],"type":"object"},"FeePolicyInput":{"description":"A new fee policy version. Rates are basis points (100 = 1%); the default sets all three, an override leaves any null to inherit. addOnRules are keyed '*', a kind (ferry, toll, extra) or kind:code (extra:child_seat); both flags default to true.","properties":{"addOnRules":{"additionalProperties":{"properties":{"commissionApplies":{"type":"boolean"},"feesApply":{"type":"boolean"}},"type":"object"},"type":"object"},"effectiveFrom":{"description":"When it takes effect; now when left out. Never in the past or before the version it follows.","format":"date-time","type":"string"},"fleetShareBps":{"maximum":10000,"minimum":0,"type":["integer","null"]},"internalFleetFeeBps":{"maximum":10000,"minimum":0,"type":["integer","null"]},"note":{"maxLength":500,"type":"string"},"platformFeeBps":{"maximum":10000,"minimum":0,"type":["integer","null"]},"retired":{"description":"Overrides only: stop overriding.","type":"boolean"}},"type":"object"},"PartnerPolicy":{"additionalProperties":true,"description":"The shape depends on {kind}: sales or accountability. Unset fields keep their defaults.","type":"object"},"PaymentStateInput":{"properties":{"paymentState":{"enum":["paid","deposit","cash_at_pickup","call_to_confirm","refunded"],"type":"string"}},"required":["paymentState"],"type":"object"},"QuoteInput":{"properties":{"bags":{"type":"integer"},"couponCode":{"type":"string"},"extras":{"items":{"type":"string"},"type":"array"},"legs":{"items":{"properties":{"deadheadMiles":{"type":"number"},"distanceMiles":{"type":"number"},"dropoff":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"durationMinutes":{"type":"number"},"ferries":{"description":"Ferry crossings on the route, in order: terminal ids from the rate card, or where the ferry step starts and ends; miles: miles on the boat.","items":{"properties":{"from":{"oneOf":[{"type":"string"},{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"}]},"miles":{"type":"number"},"to":{"oneOf":[{"type":"string"},{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"}]}},"required":["from","to"],"type":"object"},"maxItems":6,"type":"array"},"hours":{"type":"number"},"pickup":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"pickupAt":{"format":"date-time","type":"string"},"role":{"enum":["outbound","return"],"type":"string"},"stopWaitMinutes":{"items":{"type":"number"},"type":"array"},"tolls":{"description":"estimate: the router's toll estimate (USD) in the direction driven; segments: tolled segments from the rate card, with the direction crossed.","properties":{"estimate":{"type":"number"},"segments":{"items":{"properties":{"direction":{"type":"string"},"id":{"type":"string"}},"required":["id"],"type":"object"},"maxItems":20,"type":"array"}},"type":"object"}},"required":["pickupAt"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"passengers":{"type":"integer"},"pricingModel":{"enum":["flat","distance","hourly","event"],"type":"string"},"productIds":{"items":{"type":"string"},"type":"array"},"replay":{"description":"Price a past quote as of its own time; never stored.","properties":{"demand":{"type":"array"},"quotedAt":{"format":"date-time","type":"string"}},"type":"object"},"routeId":{"type":"string"}},"required":["legs","pricingModel"],"type":"object"},"RateCard":{"additionalProperties":true,"description":"Products (with an optional ferryVehicleClass), pricing models (with an optional minimumFare), routes, stops, deadhead, return multiplier, extras, ferries (terminals, crossings with fares by vehicle class and passenger fares each way, peak season, card fee, driver's time, boat miles), tolls (segments with fares by direction, driver's return, route/flat/off), adjustments, coupons, fees, rounding, price lock and time zone. See docs/partner-integration.md.","type":"object"},"RideCancellation":{"description":"data.cancellation on ride.cancelled webhooks.","properties":{"cancelledBy":{"enum":["demand","operator","rider","driver","system"],"type":"string"},"reasonCode":{"description":"A cancellation reason code (the demand side lists its own at GET /api/v1/demand/requests/{requestId}/cancellation), or no_show; null when none was given.","type":["string","null"]},"reasonLabel":{"type":["string","null"]}},"required":["cancelledBy","reasonCode","reasonLabel"],"type":"object"},"RosterInput":{"properties":{"drivers":{"items":{"properties":{"displayName":{"type":"string"},"externalRef":{"type":"string"},"phone":{"type":"string"},"vehicleExternalRef":{"type":"string"}},"required":["externalRef","displayName","phone"],"type":"object"},"type":"array"},"dryRun":{"type":"boolean"},"mode":{"enum":["upsert","full"],"type":"string"},"vehicles":{"items":{"properties":{"externalRef":{"type":"string"},"label":{"type":"string"},"licensePlate":{"type":"string"},"passengerCapacity":{"type":"integer"},"serviceClass":{"enum":["sedan","suv","black_car","van","shuttle","bus"],"type":"string"}},"required":["externalRef","label","passengerCapacity"],"type":"object"},"type":"array"}},"type":"object"},"SeatConfirmationInput":{"properties":{"externalReference":{"type":"string"},"rider":{"properties":{"name":{"type":"string"},"phone":{"type":"string"}},"required":["name","phone"],"type":"object"}},"required":["rider"],"type":"object"},"SeatHoldInput":{"properties":{"bags":{"type":"integer"},"departureId":{"type":"string"},"dropoff":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"flightNumber":{"type":"string"},"passengers":{"type":"integer"},"pickup":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"}},"required":["departureId","passengers","pickup","dropoff"],"type":"object"},"SeatSearchInput":{"properties":{"bags":{"type":"integer"},"dropoff":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"from":{"format":"date-time","type":"string"},"passengers":{"type":"integer"},"pickup":{"properties":{"address":{"type":"string"},"label":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["address","label"],"type":"object"},"to":{"format":"date-time","type":"string"}},"required":["pickup","dropoff","from","to"],"type":"object"},"ServiceLine":{"additionalProperties":true,"description":"slug, name, origin/destination rules, per-seat pricing, weekly schedule, timeZone, capacity, visibility.","type":"object"},"TenantProfile":{"properties":{"brandName":{"type":"string"},"colors":{"type":"object"},"driverAppDomain":{"type":"string"},"emailFrom":{"type":"string"},"logoUrl":{"type":"string"},"smsSender":{"type":"string"},"supportEmail":{"type":"string"},"supportPhone":{"type":"string"},"trackingDomain":{"type":"string"}},"required":["brandName"],"type":"object"},"WebhookEndpointInput":{"properties":{"description":{"type":"string"},"topics":{"items":{"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"},"ApiError":{"properties":{"apiVersion":{"const":"2026-08-03.v13","type":"string"},"error":{"properties":{"code":{"type":"string"},"details":{"items":{"additionalProperties":false,"properties":{"message":{"type":"string"},"path":{"type":"string"}},"required":["message","path"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"requestId":{"format":"uuid","type":"string"}},"required":["apiVersion","error","requestId"],"type":"object"},"DistributionPlan":{"additionalProperties":false,"properties":{"fulfillmentMode":{"enum":["marketplace","internal_fleet"],"type":"string"},"mode":{"enum":["sequential","concurrent","open_call"],"type":"string"},"offerCount":{"minimum":0,"type":"integer"},"recipientTypes":{"items":{"enum":["fleet","driver"],"type":"string"},"type":"array","uniqueItems":true}},"required":["fulfillmentMode","mode","offerCount","recipientTypes"],"type":"object"},"FleetLocation":{"additionalProperties":false,"properties":{"address":{"minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"latitude":{"maximum":90,"minimum":-90,"type":"number"},"longitude":{"maximum":180,"minimum":-180,"type":"number"}},"required":["address","label"],"type":"object"},"OfferResponseEnvelope":{"properties":{"apiVersion":{"const":"2026-08-03.v13","type":"string"},"data":{"properties":{"ride":{"$ref":"#/components/schemas/RideSummary"}},"required":["ride"],"type":"object"},"requestId":{"format":"uuid","type":"string"}},"required":["apiVersion","data","requestId"],"type":"object"},"OfferResponseInput":{"additionalProperties":false,"description":"Accept or pass the exact pre-qualified driver-vehicle unit carried by the offer.","properties":{"response":{"enum":["accept","reject"],"type":"string"}},"required":["response"],"type":"object"},"InternalFleetAssignmentInput":{"additionalProperties":false,"description":"An owning fleet dispatcher selects an eligible unit only for its own internal ride.","properties":{"driverAccountId":{"minLength":1,"type":"string"},"vehicleId":{"minLength":1,"type":"string"}},"required":["driverAccountId","vehicleId"],"type":"object"},"RideAssignmentEnvelope":{"properties":{"apiVersion":{"const":"2026-08-03.v13","type":"string"},"data":{"properties":{"ride":{"$ref":"#/components/schemas/RideSummary"}},"required":["ride"],"type":"object"},"requestId":{"format":"uuid","type":"string"}},"required":["apiVersion","data","requestId"],"type":"object"},"RideRequestCreateResponse":{"properties":{"apiVersion":{"const":"2026-08-03.v13","type":"string"},"data":{"properties":{"distribution":{"$ref":"#/components/schemas/DistributionPlan"},"replayed":{"type":"boolean"},"ride":{"$ref":"#/components/schemas/RideSummary"}},"required":["ride","distribution","replayed"],"type":"object"},"requestId":{"format":"uuid","type":"string"}},"required":["apiVersion","data","requestId"],"type":"object"},"RideRequestInput":{"additionalProperties":false,"properties":{"dispatch":{"additionalProperties":false,"properties":{"distributionMode":{"default":"concurrent","enum":["sequential","concurrent","open_call"],"type":"string"},"offerExpiresInMinutes":{"default":10,"maximum":1440,"minimum":1,"type":"integer"},"offerMode":{"deprecated":true,"enum":["best_match","broadcast"],"type":"string"},"strategy":{"enum":["preferred_then_marketplace","marketplace","exclusive"],"type":"string"}},"required":["strategy"],"type":"object"},"dropoff":{"$ref":"#/components/schemas/FleetLocation"},"externalReference":{"maxLength":200,"type":"string"},"fulfillment":{"additionalProperties":false,"properties":{"mode":{"default":"marketplace","enum":["marketplace","internal_fleet"],"type":"string"}},"required":["mode"],"type":"object"},"party":{"additionalProperties":false,"properties":{"bags":{"maximum":99,"minimum":0,"type":"integer"},"passengers":{"maximum":99,"minimum":1,"type":"integer"},"wheelchairSpaces":{"default":0,"maximum":99,"minimum":0,"type":"integer"}},"required":["bags","passengers"],"type":"object"},"pickup":{"$ref":"#/components/schemas/FleetLocation"},"requestedAt":{"format":"date-time","type":"string"},"rider":{"additionalProperties":false,"properties":{"name":{"minLength":1,"type":"string"},"phone":{"minLength":10,"type":"string"}},"required":["name","phone"],"type":"object"},"service":{"additionalProperties":false,"properties":{"class":{"enum":["sedan","suv","black_car","van","shuttle","bus"],"type":"string"},"requirements":{"items":{"type":"string"},"type":"array"}},"required":["class"],"type":"object"},"source":{"additionalProperties":false,"properties":{"channel":{"enum":["api","partner_portal","operator"],"type":"string"},"system":{"minLength":1,"type":"string"}},"required":["channel","system"],"type":"object"},"test":{"default":false,"description":"A test ride: offered only to allowlisted test drivers, never to an open call; webhooks carry test: true and settlement is marked test.","type":"boolean"}},"required":["dispatch","dropoff","party","pickup","requestedAt","rider","service","source"],"type":"object"},"RideRequestPreviewResponse":{"properties":{"apiVersion":{"const":"2026-08-03.v13","type":"string"},"data":{"properties":{"dispatchPlan":{"$ref":"#/components/schemas/RideRequestPreviewDispatchPlan"},"normalizedRequest":{"$ref":"#/components/schemas/RideRequestInput"},"scope":{"additionalProperties":false,"properties":{"namespace":{"const":"demand","type":"string"},"tenant":{"type":"string"}},"required":["namespace","tenant"],"type":"object"}},"required":["dispatchPlan","normalizedRequest","scope"],"type":"object"},"requestId":{"format":"uuid","type":"string"}},"required":["apiVersion","data","requestId"],"type":"object"},"RideRequestPreviewDispatchPlan":{"additionalProperties":false,"properties":{"distributionMode":{"enum":["sequential","concurrent","open_call"],"type":"string"},"providerStrategy":{"enum":["preferred_then_marketplace","marketplace","exclusive"],"type":"string"},"recipientScope":{"enum":["matched_supply_units","internal_fleet_dispatch"],"type":"string"},"responseWindowMinutes":{"maximum":1440,"minimum":1,"type":"integer"}},"required":["distributionMode","providerStrategy","recipientScope","responseWindowMinutes"],"type":"object"},"RideSummary":{"additionalProperties":false,"properties":{"assignment":{"anyOf":[{"additionalProperties":false,"properties":{"driverAccountId":{"type":"string"},"driverName":{"type":"string"},"supplyOrganizationId":{"type":"string"},"supplyOrganizationName":{"type":"string"},"vehicleId":{"type":"string"},"vehicleLabel":{"type":"string"},"vehicleLicensePlate":{"type":["string","null"]}},"required":["driverAccountId","driverName","supplyOrganizationId","supplyOrganizationName","vehicleId","vehicleLabel","vehicleLicensePlate"],"type":"object"},{"type":"null"}]},"bags":{"minimum":0,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"demandOrganization":{"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"dispatchStrategy":{"enum":["preferred_then_marketplace","marketplace","exclusive"],"type":"string"},"distributionMode":{"enum":["sequential","concurrent","open_call"],"type":"string"},"dropoff":{"$ref":"#/components/schemas/FleetLocation"},"estimatedDurationMinutes":{"minimum":1,"type":"integer"},"externalReference":{"type":["string","null"]},"fulfillmentMode":{"enum":["marketplace","internal_fleet"],"type":"string"},"id":{"type":"string"},"lifecycleVersion":{"minimum":1,"type":"integer"},"passengers":{"minimum":1,"type":"integer"},"pickup":{"$ref":"#/components/schemas/FleetLocation"},"requestedAt":{"format":"date-time","type":"string"},"test":{"description":"A test ride (see RideRequestInput.test).","type":"boolean"},"rider":{"anyOf":[{"additionalProperties":false,"properties":{"accountId":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":"string"}},"required":["accountId","name","phone"],"type":"object"},{"type":"null"}]},"serviceClass":{"enum":["sedan","suv","black_car","van","shuttle","bus"],"type":"string"},"serviceRequirements":{"items":{"type":"string"},"type":"array"},"status":{"enum":["requested","offering","assigned","en_route","arrived","picked_up","completed","cancelled","exception"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"wheelchairSpaces":{"minimum":0,"type":"integer"}},"required":["assignment","bags","createdAt","demandOrganization","dispatchStrategy","distributionMode","dropoff","estimatedDurationMinutes","externalReference","fulfillmentMode","id","lifecycleVersion","passengers","pickup","requestedAt","rider","serviceClass","serviceRequirements","status","updatedAt","wheelchairSpaces"],"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}}}}