openapi: 3.2.0 info: title: Automile Resource Owner Contact2 API version: v1 tags: - name: ResourceOwnerContact2 paths: /v1/resourceowner/contacts2: get: tags: - ResourceOwnerContact2 summary: Get a list of all contacts that user is associated with description: Only companies that the user is associated with will be returned by this operation. operationId: GetResourceOwnerContacts2 responses: '200': description: The contacts are returned content: text/plain: schema: type: array items: $ref: '#/components/schemas/Contact2Model' application/json: schema: type: array items: $ref: '#/components/schemas/Contact2Model' text/json: schema: type: array items: $ref: '#/components/schemas/Contact2Model' '500': description: Internal server error security: - oauth2: [] post: tags: - ResourceOwnerContact2 summary: Creates a new contact operationId: CreateResourceOwnerContact2 responses: '200': description: A link in the header is returned to the newly created contact '403': description: Request is forbidden, this could occur if you try to associate the contact you are not associated with content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/Contact2CreateModel' text/json: schema: $ref: '#/components/schemas/Contact2CreateModel' application/*+json: schema: $ref: '#/components/schemas/Contact2CreateModel' description: The contact model /v1/resourceowner/contacts2/{contactId}: get: tags: - ResourceOwnerContact2 summary: Get a contact by id description: The user only has access to companies that it is associated with operationId: GetResourceOwnerContact2 parameters: - in: path name: contactId description: The contact id required: true schema: type: integer format: int32 responses: '200': description: The contact is returned content: text/plain: schema: $ref: '#/components/schemas/Contact2DetailModel' application/json: schema: $ref: '#/components/schemas/Contact2DetailModel' text/json: schema: $ref: '#/components/schemas/Contact2DetailModel' '403': description: Request is forbidden, meaning you dont' have access to this contact content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Contact does not exist content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] put: tags: - ResourceOwnerContact2 summary: Updates the given contact id description: This will update the contact with the new model. operationId: EditResourceOwnerContact2 parameters: - in: path name: contactId description: The contact that should be updated required: true schema: type: integer format: int32 responses: '200': description: The contact was saved '404': description: The contact that you tried to update doesn't exist content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '403': description: Request is forbidden, this could occur if you are not associated with the contact content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/Contact2EditModel' text/json: schema: $ref: '#/components/schemas/Contact2EditModel' application/*+json: schema: $ref: '#/components/schemas/Contact2EditModel' description: The new contact model delete: tags: - ResourceOwnerContact2 summary: Removes the given contact operationId: DeleteResourceOwnerContact2 parameters: - in: path name: contactId description: The company id required: true schema: type: integer format: int32 responses: '200': description: The contact has been deleted '403': description: Forbidden content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: The contact that you tried to remove doesn't exist content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error '400': description: Request is bad, You can't delete a contact that is bound to a user security: - oauth2: [] /v1/resourceowner/contacts2/me: get: tags: - ResourceOwnerContact2 summary: Get the contact representing myself operationId: GetResourceOwnerContactMe2 responses: '200': description: The contact is returned content: text/plain: schema: $ref: '#/components/schemas/Contact2DetailModel' application/json: schema: $ref: '#/components/schemas/Contact2DetailModel' text/json: schema: $ref: '#/components/schemas/Contact2DetailModel' '403': description: Request is forbidden, meaning you dont' have access to this contact content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '404': description: Contact does not exist content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contacts2/me/image: get: tags: - ResourceOwnerContact2 summary: Get contact profile image description: This will get the contact profile image, image data is returned in the response content operationId: GetImage parameters: - in: query name: imageType description: enum ApiImageType schema: type: integer format: int32 enum: - 0 - 1 responses: '200': description: Success security: - oauth2: [] /v1/resourceowner/contacts2/me/uploadimage: post: tags: - ResourceOwnerContact2 summary: Upload contact profile image description: This updates the contact profile image operationId: MeUploadImage responses: '200': description: Profile image was saved '500': description: Internal server error '406': description: Request is not properly formatted security: - oauth2: [] requestBody: content: multipart/form-data: schema: type: object properties: ContentType: type: string ContentDisposition: type: string Headers: type: string Length: type: integer format: int64 Name: type: string FileName: type: string /v1/resourceowner/contacts2/me/removeimage: put: tags: - ResourceOwnerContact2 summary: Removes the users profile image" description: This removes the contact profile image operationId: MeRemoveImage responses: '200': description: The profile image has been deleted '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contacts2/update-rfid: post: tags: - ResourceOwnerContact2 operationId: UpdateRfidResourceOwnerContact2 responses: '200': description: Success security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/Contact2UpdateRfidModel' text/json: schema: $ref: '#/components/schemas/Contact2UpdateRfidModel' application/*+json: schema: $ref: '#/components/schemas/Contact2UpdateRfidModel' summary: Update rfid resource owner contact2 x-summary-source: derived /v1/resourceowner/contacts2/me/updatedefaultvehicle/{vehicleId}: put: tags: - ResourceOwnerContact2 summary: Updates the default vehicle description: This will update the default vehicle operationId: MeUpdateDefaultVehicle2 parameters: - in: path name: vehicleId description: The vehicle id required: true schema: type: integer format: int32 responses: '200': description: The default vehicle on contact was saved '403': description: Request is forbidden, this could occur if you are not associated with the contact content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contacts2/updatedefaultvehicle/{vehicleId}: put: tags: - ResourceOwnerContact2 summary: Updates the default vehicle description: This will update the default vehicle operationId: UpdateResourceOwnerContactDefaultVehicle2 parameters: - in: path name: vehicleId description: The vehicle id required: true schema: type: integer format: int32 responses: '200': description: The default vehicle on contact was saved '403': description: Request is forbidden, this could occur if you are not associated with the contact content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contacts2/customcategory: post: tags: - ResourceOwnerContact2 summary: Add and remove custom categories operationId: ResourceOwnerContact2CustomCategory responses: '200': description: '' '500': description: Internal server error security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomCategoryPostModel' text/json: schema: $ref: '#/components/schemas/CustomCategoryPostModel' application/*+json: schema: $ref: '#/components/schemas/CustomCategoryPostModel' description: The contact model /v1/resourceowner/contacts2/{contactId}/customcategories/{customCategoryId}: get: tags: - ResourceOwnerContact2 summary: Get a custom category description: '' operationId: GetCustomCategoryResourceOwnerContacts2 parameters: - in: path name: contactId required: true schema: type: integer format: int32 - in: path name: customCategoryId required: true schema: type: integer format: int32 responses: '200': description: '' content: text/plain: schema: $ref: '#/components/schemas/CustomCategoryModel' application/json: schema: $ref: '#/components/schemas/CustomCategoryModel' text/json: schema: $ref: '#/components/schemas/CustomCategoryModel' '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contacts2/{contactId}/customcategories: get: tags: - ResourceOwnerContact2 summary: Get a all custom categories description: '' operationId: GetCustomCategoriesResourceOwnerContacts2 parameters: - in: path name: contactId required: true schema: type: integer format: int32 responses: '200': description: '' content: text/plain: schema: $ref: '#/components/schemas/CustomCategoryModel' application/json: schema: $ref: '#/components/schemas/CustomCategoryModel' text/json: schema: $ref: '#/components/schemas/CustomCategoryModel' '500': description: Internal server error security: - oauth2: [] components: schemas: Contact2UpdateRfidModel: type: object properties: Email: type: string Rfid: type: string additionalProperties: false Contact2Model: type: object properties: ContactId: format: int32 type: integer FirstName: type: string LastName: type: string EmailAddress: type: string MobilePhoneNumber: type: string ProfileImageUrl: type: string CheckedInDateTimeUtc: format: date-time type: string CheckedIntoVehicleId: format: int32 type: integer CheckedInVehicleOdometerInKilometers: format: double type: number IsManager: type: boolean LastCheckedInTripType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer CheckedInCustomTripTypeName: type: string CompanyRoles: type: array items: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 type: integer CurrencyCode: description: ISO 4217 Currency code type: string 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 Contact2CreateModel: required: - CreateRelationshipToCompanyId - FirstName - LastName type: object properties: FirstName: minLength: 1 type: string LastName: minLength: 1 type: string EmailAddress: type: string Description: type: string CreateRelationshipToCompanyId: format: int32 type: integer CultureName: type: string CountryCodeIso1366: type: string DefaultVehicleId: format: int32 type: integer UnitType: format: int32 enum: - 0 - 1 - 2 type: integer SubscribeToNewsLetter: type: boolean MobilePhoneNumber: type: string MapType: format: int32 enum: - 0 - 1 - 2 type: integer CurrencyCode: description: ISO 4217 Currency code type: string additionalProperties: false OrganizationModel: type: object properties: OrganizationName: type: string LegalIdentificationNumber: type: string VATNumber: type: string BillingAddress: $ref: '#/components/schemas/AddressModel' ShipmentAddress: $ref: '#/components/schemas/AddressModel' Culture: type: string UnitType: format: int32 enum: - 0 - 1 - 2 type: integer IsHierarchyEnabled: type: boolean ISO4217CurrencyCode: type: string OrganizationId: format: int32 type: integer additionalProperties: false Contact2DetailModel: type: object properties: ContactId: format: int32 type: integer FirstName: type: string LastName: type: string EmailAddress: type: string Description: type: string CultureName: type: string CountryCodeIso1366: type: string DefaultVehicleId: format: int32 type: integer UnitType: format: int32 enum: - 0 - 1 - 2 type: integer SubscribeToNewsLetter: type: boolean MobilePhoneNumber: type: string MapType: format: int32 enum: - 0 - 1 - 2 type: integer CheckedIntoVehicleId: format: int32 type: integer CheckedInDateTimeUtc: format: date-time type: string CheckOutDateTimeUtc: format: date-time type: string CheckedInTripType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer CheckedInCustomTripTypeName: type: string CompanyRoles: type: array items: format: int32 enum: - 0 - 1 - 2 - 3 - 4 - 5 type: integer ProfileImageUrl: type: string CurrencyCode: description: ISO 4217 Currency code type: string CompaniesScopes: type: array items: $ref: '#/components/schemas/CompanyScopesModel' IsLocked: type: boolean CustomCategories: type: array items: $ref: '#/components/schemas/CustomCategoryModel' CheckedInVehicleOdometerInKilometers: format: double type: number Organization: $ref: '#/components/schemas/OrganizationModel' HoursOfServiceSettingsModel: $ref: '#/components/schemas/HoursOfServiceSettingsModel' FieldServiceEnabled: type: boolean FieldServiceEnabledWithinOrganization: type: boolean ContactMenuLayout: $ref: '#/components/schemas/ContactMenuLayoutModel' CreatedAt: format: date-time type: string additionalProperties: false CompanyScopesModel: type: object properties: CompanyId: format: int32 type: integer VehicleIds: type: array items: format: int32 type: integer Scopes: type: array items: type: string 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 ProblemDetails: type: object properties: type: type: string title: type: string status: format: int32 type: integer detail: type: string instance: type: string additionalProperties: {} 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 CustomCategoryModel: type: object properties: CustomCategoryId: format: int32 type: integer Value: type: string CustomCategoryType: format: int32 enum: - 0 - 1 type: integer additionalProperties: false ContactMenuLayoutModel: type: object properties: MenuLayout: type: object additionalProperties: format: int64 enum: - 0 - 1 - 2 - 4 type: integer readOnly: true ExpiresAtUtc: format: date-time description: UTC date time when menu layout cache was refreshed type: string RefreshedAtUtc: format: date-time description: UTC date time when menu layout cache was refreshed type: string additionalProperties: false CustomCategoryPostModel: type: object properties: ContactId: format: int32 type: integer Added: description: Custom categories to add type: array items: $ref: '#/components/schemas/CustomCategoryCreateModel' Removed: description: Custom categories to delete type: array items: format: int32 type: integer additionalProperties: false CustomCategoryCreateModel: type: object properties: Value: type: string CustomCategoryType: format: int32 enum: - 0 - 1 type: integer additionalProperties: false Contact2EditModel: type: object properties: FirstName: type: string LastName: type: string EmailAddress: type: string Description: type: string CultureName: type: string CountryCodeIso1366: type: string DefaultVehicleId: format: int32 type: integer UnitType: format: int32 enum: - 0 - 1 - 2 type: integer SubscribeToNewsLetter: type: boolean MobilePhoneNumber: type: string MapType: format: int32 enum: - 0 - 1 - 2 type: integer CheckOutDateTimeUtc: format: date-time type: string CheckedInTripType: format: int32 enum: - 0 - 1 - 2 - 3 type: integer CheckedInCustomTripTypeName: type: string CurrencyCode: description: ISO 4217 Currency code type: string 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)