openapi: 3.0.0
servers:
  - url: https://live-api.letmc.com
info:
  contact:
    x-twitter: agentOSSoftware
  title: agentOS API V3, Maintenance Call Group
  version: v3-maintenance
  x-apisguru-categories:
    - ecommerce
  x-logo:
    url: https://twitter.com/agentOSSoftware/profile_image?size=original
  x-origin:
    - format: openapi
      url: https://live-api.letmc.com/swagger/docs/v3-maintenance
      version: "3.0"
  x-providerName: letmc.com
  x-serviceName: maintenance
paths:
  "/v3/maintenance/{shortName}/maintenance/{branchID}/createmaintenancejob":
    post:
      deprecated: false
      operationId: MaintenanceController_CreateMaintenanceJob
      parameters:
        - description: The unique client short-name
          in: path
          name: shortName
          required: true
          schema:
            type: string
        - description: The unique ID of the Branch
          in: path
          name: branchID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MaintenanceIssueModel"
          application/x-www-form-urlencoded:
            schema:
              $ref: "#/components/schemas/MaintenanceIssueModel"
          application/xml:
            schema:
              $ref: "#/components/schemas/MaintenanceIssueModel"
          text/json:
            schema:
              $ref: "#/components/schemas/MaintenanceIssueModel"
          text/xml:
            schema:
              $ref: "#/components/schemas/MaintenanceIssueModel"
        description: A JSON object containing details of the maintenance job
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Object"
            application/xml:
              schema:
                $ref: "#/components/schemas/Object"
            text/json:
              schema:
                $ref: "#/components/schemas/Object"
            text/xml:
              schema:
                $ref: "#/components/schemas/Object"
          description: OK
      summary: Create a maintenance job for a specific branch
      tags:
        - MaintenanceController
components:
  schemas:
    MaintenanceDocumentModel:
      description: Submission Model - Handles all the fields required to attach documents to an online maintenance job
      properties:
        MimeType:
          description: The document Mime Type
          type: string
        URL:
          description: The document URL (This has to be public)
          type: string
      type: object
    MaintenanceIssueModel:
      description: Submission Model - Handles all fields required to submit an online maintenance job
      properties:
        Documents:
          description: Documents linked to a submitted maintenance job
          items:
            $ref: "#/components/schemas/MaintenanceDocumentModel"
          type: array
        ExternalID:
          description: ID used externally to manage jobs before sending to the system. This has a 10 character limit.
          type: string
        IssueFault:
          description: The fault title if applicable
          type: string
        IssueNotes:
          description: Fault notes
          type: string
        IssuePriority:
          description: The priority of the job (Defaults to 'Low' if incorrect value or empty)
          enum:
            - Low
            - Medium
            - High
          type: string
        IssueTitle:
          description: The title of the issue
          type: string
        PropertyAddress1:
          description: The first line of the property address
          type: string
        PropertyAddress2:
          description: The second line of the property address
          type: string
        PropertyAddress3:
          description: The third line of the property address
          type: string
        PropertyAddress4:
          description: The forth line of the property address
          type: string
        PropertyCountry:
          description: The country the property is located
          type: string
        PropertyPostcode:
          description: The property postcode
          type: string
        ReportedAt:
          description: The date the job was reported
          format: date-time
          type: string
        TenantEMailAddress:
          description: The email address of the Tenant
          type: string
        TenantForename:
          description: The forename of the Tenant
          type: string
        TenantPhonePrimary:
          description: The primary phone number of the Tenant
          type: string
        TenantPhoneSecondary:
          description: The secondary phone number of the Tenant
          type: string
        TenantPresenceRequested:
          description: Is the Tenant’s presence requested during the maintenance visit? (Defaults to “false” if incorrect value or empty)
          type: boolean
        TenantSurname:
          description: The surname of the Tenant
          type: string
        TenantTitle:
          description: The title of the Tenant
          type: string
      type: object
    Object:
      properties: {}
      type: object
  securitySchemes:
    apiKey:
      description: ApiKey Authentication
      in: header
      name: ApiKey
      type: apiKey
    basic:
      description: Basic HTTP Authentication
      scheme: basic
      type: http
