openapi: 3.2.0 info: title: Automile Resource Owner Contact Vehicle API version: v1 tags: - name: ResourceOwnerContactVehicle paths: /v1/resourceowner/contactvehicle: get: tags: - ResourceOwnerContactVehicle summary: Get all vehicles that the logged in user has access to description: Only vehicles that the user is associated with will be returned by this operation. operationId: GetResourceOwnerContactVehicles responses: '200': description: The vehicelse are returned content: text/plain: schema: type: array items: $ref: '#/components/schemas/ContactVehicleDetailModel' application/json: schema: type: array items: $ref: '#/components/schemas/ContactVehicleDetailModel' text/json: schema: type: array items: $ref: '#/components/schemas/ContactVehicleDetailModel' '500': description: Internal server error security: - oauth2: [] post: tags: - ResourceOwnerContactVehicle summary: Creates a new vehicle contact and associates it with user operationId: CreateResourceOwnerContactVehicle responses: '200': description: A link in the header is returned to the newly created vehicle contact '403': description: Request is forbidden, this could occur if you try to associate to companies 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/ContactVehicleCreateModel' text/json: schema: $ref: '#/components/schemas/ContactVehicleCreateModel' application/*+json: schema: $ref: '#/components/schemas/ContactVehicleCreateModel' description: The vehicle contact model /v1/resourceowner/contactvehicle/{vehicleId}: get: tags: - ResourceOwnerContactVehicle summary: Get contacts by vehicle id description: The user only has access to contacts that it is associated with through the company operationId: GetResourceOwnerContactVehicleContactsBasedOnVehicleId parameters: - in: path name: vehicleId description: The vehicle id required: true schema: type: integer format: int32 responses: '200': description: The vehicles are returned content: text/plain: schema: type: array items: $ref: '#/components/schemas/ContactModel' application/json: schema: type: array items: $ref: '#/components/schemas/ContactModel' text/json: schema: type: array items: $ref: '#/components/schemas/ContactModel' '403': description: Request is forbidden, meaning you dont' have access to this vehicle 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 vehicle 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' '500': description: Internal server error security: - oauth2: [] /v1/resourceowner/contactvehicle/{contactVehicleIdToEdit}: put: tags: - ResourceOwnerContactVehicle summary: Updates the given contact vehicle id operationId: EditResourceOwnerContactVehicle parameters: - in: path name: contactVehicleIdToEdit description: The contact vehicle that should be updated required: true schema: type: integer format: int32 responses: '200': description: ContactVehicle saved '403': description: Request is forbidden, this could occur if you are not associated with the contact vehicle 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 vehicle 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' '500': description: Internal server error security: - oauth2: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ContactVehicleEditModel' text/json: schema: $ref: '#/components/schemas/ContactVehicleEditModel' application/*+json: schema: $ref: '#/components/schemas/ContactVehicleEditModel' description: The new contact vehicle model /v1/resourceowner/contactvehicle/{contactVehicleIdToDelete}: delete: tags: - ResourceOwnerContactVehicle summary: Removes the given vehicle contact description: This will delete the given vehicle contact. operationId: DeleteResourceOwnerContactVehicle parameters: - in: path name: contactVehicleIdToDelete description: The vehicle contact id to remove required: true schema: type: integer format: int32 responses: '200': description: The vehicle contact has been deleted '403': description: Request is forbidden, this could occur if you are not associated with the vehicle 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: The vehicle 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 security: - oauth2: [] components: schemas: ContactModel: type: object properties: ContactId: format: int32 type: integer FirstName: type: string LastName: type: string EmailAddress: type: string additionalProperties: false ContactVehicleCreateModel: required: - ContactId - VehicleId type: object properties: VehicleId: format: int32 type: integer ContactId: format: int32 type: integer additionalProperties: false ProblemDetails: type: object properties: type: type: string title: type: string status: format: int32 type: integer detail: type: string instance: type: string additionalProperties: {} ContactVehicleDetailModel: type: object properties: ContactVehicleId: format: int32 type: integer VehicleId: format: int32 type: integer NumberPlate: type: string MakeModelName: type: string ContactId: format: int32 type: integer ContactName: type: string LastModified: format: date-time type: string Created: format: date-time type: string Scopes: type: array items: type: string additionalProperties: false ContactVehicleEditModel: type: object properties: VehicleId: format: int32 type: integer ContactId: format: int32 type: integer 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)