openapi: 3.2.0 info: title: Automile Resource Owner Hours Of Service API version: v1 tags: - name: ResourceOwnerHoursOfService paths: /v1/resourceowner/hoursofservice: delete: tags: - ResourceOwnerHoursOfService operationId: HoursOfServiceDeleteCycles responses: '200': description: Success security: - oauth2: [] summary: Hours of service delete cycles x-summary-source: derived /v1/resourceowner/hoursofservice/cycles: get: tags: - ResourceOwnerHoursOfService summary: Parse Hours Of Service duty statuses to cycles and work shiftsS or ended in the… operationId: HoursOfServiceGetCycles parameters: - in: query name: fromDate description: Query on from date schema: type: string format: date-time - in: query name: toDate description: Query on to date schema: type: string format: date-time responses: '200': description: The settings is returned, null if no settings exist content: text/plain: schema: $ref: '#/components/schemas/HoursOfServiceCycles' application/json: schema: $ref: '#/components/schemas/HoursOfServiceCycles' text/json: schema: $ref: '#/components/schemas/HoursOfServiceCycles' security: - oauth2: [] /v1/resourceowner/hoursofservice/statuses: get: tags: - ResourceOwnerHoursOfService summary: Get the Hours of Service statuses that started in the date interval or ended in… operationId: HoursOfServiceGetStatuses parameters: - in: query name: fromDate description: Query on from date schema: type: string format: date-time - in: query name: toDate description: Query on to date schema: type: string format: date-time - in: query name: hoursOfServiceLogId description: Query on id schema: type: integer format: int32 - in: query name: contactId description: Get statuses for a contact schema: type: integer format: int32 - in: query name: vehicleId description: Get statuses for a vehicle schema: type: integer format: int32 - in: query name: notes description: Query on notes schema: type: string responses: '200': description: The settings is returned, null if no settings exist content: text/plain: schema: $ref: '#/components/schemas/HoursOfServiceDutyStatusesModel' application/json: schema: $ref: '#/components/schemas/HoursOfServiceDutyStatusesModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceDutyStatusesModel' security: - oauth2: [] /v1/resourceowner/hoursofservice/synch: get: tags: - ResourceOwnerHoursOfService summary: Get the Hours of Service statuses that have beend added, updated or deleted operationId: HoursOfServiceGetSynch parameters: - in: query name: lastSynchDate description: Query on status that have been created, modified or deleted schema: type: string format: date-time - in: query name: contactId description: Get statuses for a contact schema: type: integer format: int32 responses: '200': description: The settings is returned, null if no settings exist content: text/plain: schema: $ref: '#/components/schemas/HoursOfServiceStatusSynchModel' application/json: schema: $ref: '#/components/schemas/HoursOfServiceStatusSynchModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceStatusSynchModel' security: - oauth2: [] /v1/resourceowner/hoursofservice/status: post: tags: - ResourceOwnerHoursOfService summary: Creates Hours Of Service duty status entry operationId: HoursOfSerivceCreateStatus responses: '200': description: A link in the header is returned to the newly resource security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/HoursOfServiceStatusPostModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceStatusPostModel' application/*+json: schema: $ref: '#/components/schemas/HoursOfServiceStatusPostModel' description: The settings model /v1/resourceowner/hoursofservice/settings: get: tags: - ResourceOwnerHoursOfService summary: Get the current user Hours of Service settings operationId: HoursOfServiceGetSettings parameters: - in: query name: contactHoursOfServiceSettingsId description: '' schema: type: integer format: int32 responses: '200': description: The settings is returned, null if no settings exist content: text/plain: schema: $ref: '#/components/schemas/HoursOfServiceSettingsModel' application/json: schema: $ref: '#/components/schemas/HoursOfServiceSettingsModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceSettingsModel' security: - oauth2: [] post: tags: - ResourceOwnerHoursOfService summary: Creates Hours Of Service Settings operationId: HoursOfSerivceCreateSettings responses: '200': description: A link in the header is returned to the newly resource security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/HoursOfServiceSettingsCreateModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceSettingsCreateModel' application/*+json: schema: $ref: '#/components/schemas/HoursOfServiceSettingsCreateModel' description: The settings model /v1/resourceowner/hoursofservice/export: post: tags: - ResourceOwnerHoursOfService summary: Export Hours Of Service Log operationId: HoursOfSerivceExport responses: '200': description: A mail is sent to the email address security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' application/*+json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' description: The export model /v1/resourceowner/hoursofservice/exportpdf: post: tags: - ResourceOwnerHoursOfService summary: Export Hours Of Service Log as a PDF operationId: HoursOfSerivceExportExportPDF responses: '200': description: A mail is sent to the email address security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' text/json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' application/*+json: schema: $ref: '#/components/schemas/HoursOfServiceExportModel' description: The export model components: schemas: DutyStatus: type: object properties: ContactId: format: int32 type: integer VehicleId: format: int32 type: integer DutyStatusType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer FromUtc: format: date-time type: string ToUtc: format: date-time type: string Notes: type: string Locations: type: string CycleRuleType: format: int32 type: integer WorkDayStartTime: $ref: '#/components/schemas/TimeSpan' DistanceInKm: format: double type: number additionalProperties: false HoursOfServiceStatusPostModel: type: object properties: Added: type: array items: $ref: '#/components/schemas/HoursOfServiceDutyStatusCreateModel' Updated: type: array items: $ref: '#/components/schemas/HoursOfServiceDutyStatusModel' LastSynchDate: format: date-time type: string additionalProperties: false HoursOfServiceStatusSynchModel: type: object properties: LastSynchDate: format: date-time type: string readOnly: true Added: type: array items: $ref: '#/components/schemas/HoursOfServiceDutyStatusModel' Updated: type: array items: $ref: '#/components/schemas/HoursOfServiceDutyStatusModel' additionalProperties: false HoursOfServiceDutyStatusCreateModel: type: object properties: VehicleId: format: int32 type: integer DutyStatusType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer FromDateTime: format: date-time description: From date UTC type: string ToDateTime: format: date-time description: To date UTC type: string Notes: type: string Location: type: string ExternalId: format: uuid type: string additionalProperties: false HoursOfServiceExportModel: type: object properties: FromDate: format: date-time type: string ToDate: format: date-time type: string EmailAddress: description: Recipient of the report type: string additionalProperties: false Cycle: type: object properties: WorkShifts: type: array items: $ref: '#/components/schemas/WorkShift' TotalTime: $ref: '#/components/schemas/TimeSpan' OffDutyTime: $ref: '#/components/schemas/TimeSpan' OnDutyTime: $ref: '#/components/schemas/TimeSpan' DrivingTime: $ref: '#/components/schemas/TimeSpan' SleeperBerthTime: $ref: '#/components/schemas/TimeSpan' NumberOfDays: format: double type: number readOnly: true OnDutyAndDriving: format: double type: number readOnly: true additionalProperties: false AddressModel: required: - AddressLine2 - City - ISO3166CountryCode - ZipCode type: object properties: AddressId: format: int32 type: integer CompanyName: type: string ContactNameAtAddress: type: string AddressLine2: minLength: 1 type: string AddressLine3: type: string AddressLine4: type: string ZipCode: minLength: 1 type: string City: minLength: 1 type: string StateOrProvince: type: string ISO3166CountryCode: minLength: 1 type: string additionalProperties: false HoursOfServiceSettingsModel: type: object properties: TimeZoneType: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 type: integer WorkDayStartTime: $ref: '#/components/schemas/TimeSpan' CycleRuleType: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 type: integer CargoTypeType: format: int32 enum: - 0 - 1 - 2 type: integer RestartRuleType: format: int32 enum: - 0 - 1 type: integer RestBreakRuleType: format: int32 enum: - 0 - 1 type: integer ShortHaulExceptionType: format: int32 enum: - 0 - 1 type: integer OdometerUnitType: format: int32 enum: - 0 - 1 - 2 type: integer WellSiteRuleType: format: int32 enum: - 0 - 1 type: integer CarrierInfo: $ref: '#/components/schemas/AddressModel' IsEnabled: type: boolean additionalProperties: false HoursOfServiceCycles: type: object properties: Cycles: type: array items: $ref: '#/components/schemas/Cycle' additionalProperties: false WorkShift: type: object properties: TotalTime: $ref: '#/components/schemas/TimeSpan' OffDutyTime: $ref: '#/components/schemas/TimeSpan' OnDutyTime: $ref: '#/components/schemas/TimeSpan' DrivingTime: $ref: '#/components/schemas/TimeSpan' SleeperBerthTime: $ref: '#/components/schemas/TimeSpan' DutyStatuses: type: array items: $ref: '#/components/schemas/DutyStatus' WorkShiftTime: $ref: '#/components/schemas/TimeSpan' additionalProperties: false HoursOfServiceDutyStatusesModel: type: object properties: LastSynchDate: format: date-time type: string readOnly: true DutyStatuses: type: array items: $ref: '#/components/schemas/HoursOfServiceDutyStatusModel' additionalProperties: false HoursOfServiceDutyStatusModel: type: object properties: HoursOfServiceLogId: format: int32 type: integer VehicleId: format: int32 type: integer DutyStatusType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer FromDateTime: format: date-time description: From date UTC type: string ToDateTime: format: date-time description: To date UTC type: string Notes: type: string Location: type: string CycleRuleType: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 type: integer WorkDayStartTime: $ref: '#/components/schemas/TimeSpan' DistanceInKm: format: double type: number CreatedDateTime: format: date-time description: Created UTC type: string ModifiedDateTime: format: date-time description: Modified UTC type: string ExternalId: format: uuid type: string IsDeleted: type: boolean additionalProperties: false TimeSpan: type: object properties: Ticks: format: int64 type: integer Days: format: int32 type: integer readOnly: true Hours: format: int32 type: integer readOnly: true Milliseconds: format: int32 type: integer readOnly: true Microseconds: format: int32 type: integer readOnly: true Nanoseconds: format: int32 type: integer readOnly: true Minutes: format: int32 type: integer readOnly: true Seconds: format: int32 type: integer readOnly: true TotalDays: format: double type: number readOnly: true TotalHours: format: double type: number readOnly: true TotalMilliseconds: format: double type: number readOnly: true TotalMicroseconds: format: double type: number readOnly: true TotalNanoseconds: format: double type: number readOnly: true TotalMinutes: format: double type: number readOnly: true TotalSeconds: format: double type: number readOnly: true additionalProperties: false HoursOfServiceSettingsCreateModel: type: object properties: TimeZoneType: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 type: integer WorkDayStartTime: $ref: '#/components/schemas/TimeSpan' CycleRuleType: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 type: integer CargoTypeType: format: int32 enum: - 0 - 1 - 2 type: integer RestartRuleType: format: int32 enum: - 0 - 1 type: integer RestBreakRuleType: format: int32 enum: - 0 - 1 type: integer ShortHaulExceptionType: format: int32 enum: - 0 - 1 type: integer OdometerUnitType: format: int32 enum: - 0 - 1 - 2 type: integer WellSiteRuleType: format: int32 enum: - 0 - 1 type: integer CarrierInfo: $ref: '#/components/schemas/AddressModel' IsEnabled: type: boolean additionalProperties: false securitySchemes: oauth2: type: oauth2 flows: implicit: scopes: read: Read access to protected resources write: Write access to protected resources authorizationUrl: https://api.automile.com/login/ description: OAuth2 Implicit Grant x-provenance: method: harvested publisher: Automileab source: https://api.automile.com/swagger/v1/swagger.json note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json); stamped by stamp-openapi-provenance.py (roadmap#793)