openapi: 3.2.0 info: title: Automile Resource Owner Company Contacts API version: v1 tags: - name: ResourceOwnerCompanyContacts paths: /v1/resourceowner/companycontact: get: tags: - ResourceOwnerCompanyContacts summary: Get a list of all company contacts that user is associated with description: Only company contacts that the user is associated with will be returned by this operation. operationId: GetResourceOwnerCompanyContacts responses: '200': description: The company contacts are returned content: text/plain: schema: type: array items: $ref: '#/components/schemas/CompanyContactDetailModel' application/json: schema: type: array items: $ref: '#/components/schemas/CompanyContactDetailModel' text/json: schema: type: array items: $ref: '#/components/schemas/CompanyContactDetailModel' '500': description: Internal server error security: - oauth2: [] post: tags: - ResourceOwnerCompanyContacts summary: Creates a new company contact and associates it with user description: The user only has access to contacts that it is associated with through the company operationId: CreateResourceOwnerCompanyContact responses: '200': description: A link in the header is returned to the newly created company 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/CompanyContactCreateModel' text/json: schema: $ref: '#/components/schemas/CompanyContactCreateModel' application/*+json: schema: $ref: '#/components/schemas/CompanyContactCreateModel' description: The company contact model /v1/resourceowner/companycontact/{companyContactId}: get: tags: - ResourceOwnerCompanyContacts summary: Get the company contact relationship description: Only company contcats that the user has access to are accessible. operationId: GetResourceOwnerCompanyContact parameters: - in: path name: companyContactId description: The company contact id required: true schema: type: integer format: int32 responses: '200': description: The company contact model is returned content: text/plain: schema: $ref: '#/components/schemas/CompanyContactDetailModel' application/json: schema: $ref: '#/components/schemas/CompanyContactDetailModel' text/json: schema: $ref: '#/components/schemas/CompanyContactDetailModel' '403': description: Request is forbidden, meaning you don't have access to this company vehicle relationship 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/companycontact/{companyContactIdToEdit}: put: tags: - ResourceOwnerCompanyContacts summary: Updates the given companycontact id description: This will update the company contact with the new model. operationId: EditResourceOwnerCompanyContact parameters: - in: path name: companyContactIdToEdit description: The company contact that should be updated required: true schema: type: integer format: int32 responses: '200': description: The company contact was saved '403': description: Request is forbidden, this could occur if you are not associated with the company 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/CompanyContactEditModel' text/json: schema: $ref: '#/components/schemas/CompanyContactEditModel' application/*+json: schema: $ref: '#/components/schemas/CompanyContactEditModel' description: The new company contact model /v1/resourceowner/companycontact/{companyContactIdToDelete}: delete: tags: - ResourceOwnerCompanyContacts summary: Removes the given company contact description: This will delete the given company contact. operationId: DeleteResourceOwnerCompanyContact parameters: - in: path name: companyContactIdToDelete description: The company contact id to remove required: true schema: type: integer format: int32 responses: '200': description: The company contact has been deleted '403': description: Request is forbidden, this could occur if you are not associated with the company 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 company 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: CompanyContactCreateModel: required: - CompanyId - ContactId type: object properties: CompanyId: format: int32 type: integer ContactId: format: int32 type: integer additionalProperties: false CompanyContactEditModel: required: - CompanyId - ContactId type: object properties: CompanyId: 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: {} CompanyContactDetailModel: type: object properties: CompanyContactId: format: int32 type: integer CompanyId: format: int32 type: integer CompanyName: type: string ContactId: format: int32 type: integer ContactName: type: string Scopes: type: array items: 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)