swagger: '2.0' info: title: Automile ClientApi ResourceOwnerRoutePlanner API version: v1 tags: - name: ResourceOwnerRoutePlanner paths: /v1/resourceowner/routeplanner/routes: get: tags: - ResourceOwnerRoutePlanner summary: Get routes associated with the user description: "Only routes that is either shared with the user or owned by the calling user is returned.\r\n

\r\n Location Status enum values:
\r\n *NotStarted = 0*
\r\n *Done = 1*
\r\n *Cancelled = 3*

\r\n MissionStatus enum values:
\r\n *Not Started = 0 (All route locations NotStarted)*
\r\n *Ongoing = 1 (Any route location Done OR route mission started)*
\r\n *Done = 2 (All route locations Done)*
\r\n *Cancelled = 3 (Route mission Cancelled)*" operationId: ResourceOwnerRoutePlanner_GetRouteMissionsByDriverId produces: - text/plain - application/json - text/json responses: '200': description: The routes associated with the user is returned. schema: type: array items: $ref: '#/definitions/RoutePlannerMissionModel' security: - oauth2: [] /v1/resourceowner/routeplanner/route/shorturlid/{shortUrlId}: get: tags: - ResourceOwnerRoutePlanner operationId: ResourceOwnerRoutePlanner_GetMissionByShortUrlId produces: - text/plain - application/json - text/json parameters: - in: path name: shortUrlId required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/RoutePlannerMissionModel' security: - oauth2: [] /v1/resourceowner/routeplanner/route/{routeId}: get: tags: - ResourceOwnerRoutePlanner operationId: ResourceOwnerRoutePlanner_GetMissionByRouteAndDriverId produces: - text/plain - application/json - text/json parameters: - in: path name: routeId required: true type: integer format: int32 responses: '200': description: Success schema: $ref: '#/definitions/RoutePlannerMissionModel' security: - oauth2: [] put: tags: - ResourceOwnerRoutePlanner summary: Update a route state description: Only tasks that belongs to the user has access to will be returned. operationId: ResourceOwnerRoutePlanner_UpdateMission consumes: - application/json - text/json - application/*+json parameters: - in: path name: routeId description: The routeId to update required: true type: integer format: int32 - in: body name: body description: The stop location update model schema: type: array items: $ref: '#/definitions/UpdateStopModel' responses: '200': description: The stop was updated '500': description: Internal server error '403': description: Not authorized to task security: - oauth2: [] /v1/resourceowner/routeplanner/routes/routeandsave: post: tags: - ResourceOwnerRoutePlanner operationId: ResourceOwnerRoutePlanner_routeandsave consumes: - application/json - text/json - application/*+json produces: - text/plain - application/json - text/json parameters: - in: body name: body schema: $ref: '#/definitions/RouteRequest' responses: '200': description: Success schema: {} security: - oauth2: [] /v1/resourceowner/routeplanner/route/{routeId}/cancel: put: tags: - ResourceOwnerRoutePlanner summary: Set Route Status to Cancelled. description: If a cancelled trip later gets 'uncancelled' the cancelling notes will be cleared operationId: ResourceOwnerRoutePlanner_CancelMission parameters: - in: path name: routeId description: The routeId to update required: true type: integer format: int32 - in: query name: notes description: Reason for cancelling type: string responses: '200': description: Success '500': description: Internal server error '403': description: Not authorized to task security: - oauth2: [] /v1/resourceowner/routeplanner/route/{routeId}/start: put: tags: - ResourceOwnerRoutePlanner summary: Set Route Status to Started. operationId: ResourceOwnerRoutePlanner_StartMission parameters: - in: path name: routeId description: The routeId to update required: true type: integer format: int32 responses: '200': description: Success '500': description: Internal server error '403': description: Not authorized to task security: - oauth2: [] /v1/resourceowner/routeplanner: get: tags: - ResourceOwnerRoutePlanner summary: Get routes associated with the user description: '*OBSOLETE* Only routes that is either shared with the user or owned by the calling user is returned.' operationId: ResourceOwnerRoutePlanner_GetRouteMissions produces: - text/plain - application/json - text/json responses: '200': description: The routes associated with the user is returned. schema: type: array items: $ref: '#/definitions/RoutePlannerMissionModel' security: - oauth2: [] /v1/resourceowner/routeplanner/{routeId}: get: tags: - ResourceOwnerRoutePlanner summary: '' description: '*OBSOLETE*' operationId: ResourceOwnerRoutePlanner_GetRouteMission produces: - text/plain - application/json - text/json parameters: - in: path name: routeId description: '' required: true type: integer format: int32 responses: '200': description: Success schema: $ref: '#/definitions/RoutePlannerMissionModel' security: - oauth2: [] definitions: RouteRequest: type: object properties: RouteName: type: string TimeConstraint: format: int32 enum: - 0 - 1 type: integer When: format: date-time type: string UtcOffset: format: int64 type: integer UserUnitType: format: int32 enum: - 0 - 1 - 2 type: integer FullAddresses: type: array items: type: string Strategy: format: int32 enum: - 0 - 1 type: integer AvoidTollRoads: type: boolean AvoidHighways: type: boolean AvoidFerries: type: boolean additionalProperties: false RoutePlannerMissionLocationModel: type: object properties: DistanceInKilometers: format: double type: number DurationInSeconds: format: double type: number Address: type: string Note: type: string RouteStopId: format: int32 type: integer Status: format: int32 enum: - 0 - 1 - 3 type: integer DriverNotes: type: string Latitude: format: double type: number Longitude: format: double type: number additionalProperties: false RoutePlannerMissionModel: type: object properties: DistanceInKilometers: format: double type: number DurationInSeconds: format: double type: number RouteId: format: int32 type: integer Name: type: string ContactId: format: int32 type: integer IsDeparture: type: boolean OccuredAt: format: date-time type: string MissionStatus: format: int32 enum: - 0 - 1 - 2 - 3 type: integer RouteStartedAtUTC: format: date-time type: string RouteStartedByContactId: format: int32 type: integer RouteEndedAtUTC: format: date-time type: string Notes: type: string CreatedUTC: format: date-time type: string Locations: type: array items: $ref: '#/definitions/RoutePlannerMissionLocationModel' additionalProperties: false UpdateStopModel: type: object properties: RouteStopId: format: int32 type: integer Status: format: int32 enum: - 0 - 1 - 3 type: integer DriverNotes: type: string additionalProperties: false securityDefinitions: oauth2: type: oauth2 flow: implicit authorizationUrl: https://api.automile.com/login/ scopes: read: Read access to protected resources write: Write access to protected resources description: OAuth2 Implicit Grant