Automile ResourceOwnerContactVehicle API

The ResourceOwnerContactVehicle API from Automile — 4 operation(s) for resourceownercontactvehicle.

OpenAPI Specification

automile-resourceownercontactvehicle-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Automile ClientApi ResourceOwnerContactVehicle 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
      produces:
      - text/plain
      - application/json
      - text/json
      responses:
        '200':
          description: The vehicelse are returned
          schema:
            type: array
            items:
              $ref: '#/definitions/ContactVehicleDetailModel'
        '500':
          description: Internal server error
      security:
      - oauth2: []
    post:
      tags:
      - ResourceOwnerContactVehicle
      summary: Creates a new vehicle contact and associates it with user
      operationId: CreateResourceOwnerContactVehicle
      consumes:
      - application/json
      - text/json
      - application/*+json
      produces:
      - text/plain
      - application/json
      - text/json
      parameters:
      - in: body
        name: body
        description: The vehicle contact model
        schema:
          $ref: '#/definitions/ContactVehicleCreateModel'
      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
          schema:
            $ref: '#/definitions/ProblemDetails'
        '500':
          description: Internal server error
      security:
      - oauth2: []
  /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
      produces:
      - text/plain
      - application/json
      - text/json
      parameters:
      - in: path
        name: vehicleId
        description: The vehicle id
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: The vehicles are returned
          schema:
            type: array
            items:
              $ref: '#/definitions/ContactModel'
        '403':
          description: Request is forbidden, meaning you dont' have access to this vehicle
          schema:
            $ref: '#/definitions/ProblemDetails'
        '404':
          description: The vehicle that you tried to update doesn't exist
          schema:
            $ref: '#/definitions/ProblemDetails'
        '500':
          description: Internal server error
      security:
      - oauth2: []
  /v1/resourceowner/contactvehicle/{contactVehicleIdToEdit}:
    put:
      tags:
      - ResourceOwnerContactVehicle
      summary: Updates the given contact vehicle id
      operationId: EditResourceOwnerContactVehicle
      consumes:
      - application/json
      - text/json
      - application/*+json
      produces:
      - text/plain
      - application/json
      - text/json
      parameters:
      - in: path
        name: contactVehicleIdToEdit
        description: The contact vehicle that should be updated
        required: true
        type: integer
        format: int32
      - in: body
        name: body
        description: The new contact vehicle model
        schema:
          $ref: '#/definitions/ContactVehicleEditModel'
      responses:
        '200':
          description: ContactVehicle saved
        '403':
          description: Request is forbidden, this could occur if you are not associated with the contact vehicle
          schema:
            $ref: '#/definitions/ProblemDetails'
        '404':
          description: The contact vehicle that you tried to update doesn't exist
          schema:
            $ref: '#/definitions/ProblemDetails'
        '500':
          description: Internal server error
      security:
      - oauth2: []
  /v1/resourceowner/contactvehicle/{contactVehicleIdToDelete}:
    delete:
      tags:
      - ResourceOwnerContactVehicle
      summary: Removes the given vehicle contact
      description: This will delete the given vehicle contact.
      operationId: DeleteResourceOwnerContactVehicle
      produces:
      - text/plain
      - application/json
      - text/json
      parameters:
      - in: path
        name: contactVehicleIdToDelete
        description: The vehicle contact id to remove
        required: true
        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
          schema:
            $ref: '#/definitions/ProblemDetails'
        '404':
          description: The vehicle contact that you tried to remove doesn't exist
          schema:
            $ref: '#/definitions/ProblemDetails'
        '500':
          description: Internal server error
      security:
      - oauth2: []
definitions:
  ContactVehicleCreateModel:
    required:
    - ContactId
    - VehicleId
    type: object
    properties:
      VehicleId:
        format: int32
        type: integer
      ContactId:
        format: int32
        type: integer
    additionalProperties: false
  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
  ContactModel:
    type: object
    properties:
      ContactId:
        format: int32
        type: integer
      FirstName:
        type: string
      LastName:
        type: string
      EmailAddress:
        type: string
    additionalProperties: false
  ContactVehicleEditModel:
    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: {}
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