openapi: 3.2.0 info: version: v1 title: Spotio 2.0 Trips API description: " The controller is responsible for handling operations on trip objects.\n Trips are created from routes and record places that user visited during the trip.\n Some apis are exposed through Trips and some through TripsV2 both can be used interchangeably." contact: name: Contact us url: https://spotio.com/contact/ email: support@spotio.com servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test security: - Bearer: [] tags: - name: Trips description: " The controller is responsible for handling operations on trip objects.\n Trips are created from routes and record places that user visited during the trip.\n Some apis are exposed through Trips and some through TripsV2 both can be used interchangeably." paths: /api/Trips: get: tags: - Trips summary: Get List of Trips description: Retrieves a list of trips based on the provided parameters, filtered by the query string 'q', and paginated using 'scrollId' parameter. Allows filtering by 'routeId', 'from', 'to', 'endFrom', 'endTo' and 'ownerIds' parameters. parameters: - name: q in: query schema: type: string - name: scrollId in: query schema: type: integer format: int32 - name: routeId in: query schema: type: integer format: int32 - name: from in: query schema: type: string format: date-time - name: to in: query schema: type: string format: date-time - name: endFrom in: query schema: type: string format: date-time - name: endTo in: query schema: type: string format: date-time - name: ownerIds in: query schema: type: string responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripListResponse' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripListResponse' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripListResponse' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/summary: get: tags: - Trips summary: Get trip summary data description: Returns a summary of trip data based on specified filters. For filterId refert o FiltersController parameters: - name: filterId in: query schema: type: string - name: routeId in: query schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Dashboard.TripsSummaryResponse' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Dashboard.TripsSummaryResponse' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Dashboard.TripsSummaryResponse' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/active: get: tags: - Trips summary: Get active trip for the current user description: Retrieves the active trip details for the current user, if one exists. responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Active.ActiveTrip' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Active.ActiveTrip' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Active.ActiveTrip' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/{id}/arriving-time: get: tags: - Trips summary: Get the estimated time of arrival for a trip description: Returns the estimated time of arrival for the specified trip, based on the current location of the user. parameters: - name: lat in: query schema: type: number format: double - name: lng in: query schema: type: number format: double - name: id in: path required: true schema: type: integer format: int32 responses: '200': description: Success content: text/plain: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.ArrivingTime' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.ArrivingTime' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.ArrivingTime' '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/{id}/export/pdf: get: tags: - Trips summary: Export trip details to PDF parameters: - name: x-app-version in: header schema: type: string - name: filterId in: query schema: type: string - name: locale in: query schema: type: string - name: id in: path required: true schema: type: integer format: int32 responses: '200': description: Success '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/{id}/export/csv: get: tags: - Trips summary: Export trip details to CSV parameters: - name: id in: path required: true schema: type: integer format: int32 responses: '200': description: Success '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized '404': description: Not Found security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test /api/Trips/export/{type}: post: tags: - Trips summary: Export multiple trip details to selected file type parameters: - name: type in: path required: true schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Common.ExportFileType' requestBody: content: application/merge-patch+json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest' application/json-patch+json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest' application/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest' text/json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest' application/*+json: schema: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest' responses: '200': description: Success '400': description: Bad Request content: text/plain: schema: $ref: '#/components/schemas/ResultType.Results.Error' application/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' text/json: schema: $ref: '#/components/schemas/ResultType.Results.Error' '401': description: Unauthorized '404': description: Not Found security: - Bearer: [] servers: - url: https://api.spotio2.com description: Production - url: https://app-test.spotio2.com description: Test components: schemas: Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.ArrivingTime: type: object additionalProperties: false properties: stopId: type: integer description: The unique identifier of the stop format: int32 timeToStopInSeconds: type: integer description: The time in seconds until the arrival at the stop format: int64 Spotio.Frontend.ViewModel.Common.ExportFileType: type: string enum: - Csv - Zip Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripForList: type: object additionalProperties: false properties: id: type: - string - 'null' description: Unique identifier of the trip ownerId: type: - string - 'null' description: Unique identifier of the trip owner numberOfStops: type: integer description: Number of stops in the trip format: int32 totalDistance: type: integer description: Total distance covered in the trip, in meters format: int64 totalTimeInSeconds: type: integer description: Total duration of the trip, in seconds format: int64 startDate: type: string description: Start date of the trip format: date-time endDate: type: - string - 'null' description: End date of the trip (if completed) format: date-time status: $ref: '#/components/schemas/Spotio.UserTracking.Client.DTO.Routing.TripStatusDto' routeName: type: - string - 'null' description: Name of the route name: type: - string - 'null' description: Name of the trip Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Dashboard.TripsSummaryResponse: type: object additionalProperties: false properties: tripsCount: type: integer description: The number of trips. format: int32 totalDistanceTraveled: type: integer description: The total distance traveled in meters. format: int64 totalTimeTraveledInSeconds: type: integer description: The total time traveled in seconds. format: int64 Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Active.ActiveTrip: type: object additionalProperties: false properties: id: type: - string - 'null' description: Unique identifier of the active trip routeId: type: - string - 'null' description: Route identifier of the active trip Spotio.UserTracking.Client.DTO.Routing.TripStatusDto: type: string enum: - Active - Finished Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripListResponse: type: object additionalProperties: false properties: scrollId: type: - string - 'null' description: Scroll ID for the next page of results items: type: - array - 'null' description: List of trips items: $ref: '#/components/schemas/Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.GetList.TripForList' totalItems: type: integer description: Total number of items in the result set format: int32 ResultType.Results.IError: type: object additionalProperties: false properties: message: type: - string - 'null' readOnly: true memberName: type: - string - 'null' readOnly: true filePath: type: - string - 'null' readOnly: true line: type: integer format: int32 readOnly: true ResultType.Results.Error: type: object additionalProperties: false properties: message: type: - string - 'null' readOnly: true memberName: type: - string - 'null' filePath: type: - string - 'null' line: type: integer format: int32 aggregateError: $ref: '#/components/schemas/ResultType.Results.IError' Spotio.Frontend.ViewModel.RoutesAndTrips.Trips.Exports.ExportMultipleTripsRequest: type: object additionalProperties: false properties: ids: type: - array - 'null' items: type: integer format: int32 securitySchemes: Bearer: type: apiKey description: 'Enter the Bearer Authorization string as following: `Bearer Generated-JWT-Token`' name: Authorization in: header