openapi: 3.0.0
info:
  version: IJC
  title: Internal Job Costing App
  description: Internal Job Costing App
servers:
  - url: http://localhost:12391/
paths:
  /Job:
    get:
      description: ''
      operationId: 'getJob'
      parameters:
        - in: query
          name: createdon
          description: The date the item was created
          required: false
          schema:
            type: string
            format: date
        - in: query
          name: updatedon
          description: The date the item was last updated
          required: false
          schema:
            type: string
            format: date
      responses:
        200:
          description: A paged collection of items including a total count of matches
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/JobCollection'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
    put:
      description: ''
      operationId: 'updateJob'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Job_Write'
      responses:
        200:
          description: The put was successful
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/PutResponse'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
  /Job/{id}:
    get:
      description: ''
      operationId: 'getJobById'
      parameters:
        - in: path
          name: id
          description: 'The ID of the item'
          required: true
          schema:
            type: integer
      responses:
        200:
          description: A single 
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
  /EmployeeLeave:
    get:
      description: ''
      operationId: 'getEmployeeLeave'
      parameters:
        - in: query
          name: createdon
          description: The date the item was created
          required: false
          schema:
            type: string
            format: date
        - in: query
          name: updatedon
          description: The date the item was last updated
          required: false
          schema:
            type: string
            format: date
      responses:
        200:
          description: A paged collection of items including a total count of matches
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/EmployeeLeaveCollection'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
  /EmployeeLeave/{id}:
    get:
      description: ''
      operationId: 'getEmployeeLeaveById'
      parameters:
        - in: path
          name: id
          description: 'The ID of the item'
          required: true
          schema:
            type: integer
      responses:
        200:
          description: A single 
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/EmployeeLeave'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
  schemas:
    PostResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    PutResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    Job:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Code:
          type: string
        Description:
          type: string
        D_JobProduct:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        Manager:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
        D_ProfessionalServicesManager:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
        Customer:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
            HomeBranch:
              type: object
              properties:
                ID:
                  type: integer
                  format: int64
                UpdatedOn:
                  type: string
                  format: date
                CreatedOn:
                  type: string
                  format: date
                Code:
                  type: string
                Description:
                  type: string
            Region:
              type: object
              properties:
                ID:
                  type: integer
                  format: int64
                UpdatedOn:
                  type: string
                  format: date
                CreatedOn:
                  type: string
                  format: date
                Code:
                  type: string
                Description:
                  type: string
        WorkflowStatus:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
            D_BillingFinished:
              type: string
        ExpectedCompletionDate:
          type: string
          format: date
        D_ProfessionalServicesWorkflowStatus:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        CSTAT_SalesOrderHoursProServe:
          type: number
        CSTAT_ChargeableTimeSheetHoursProServe:
          type: number
        Stages:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Description:
                type: string
    Job_Write:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Code:
          type: string
        Description:
          type: string
        D_JobProduct:
          type: number
        Manager:
          type: number
        D_ProfessionalServicesManager:
          type: number
        Customer:
          type: number
        WorkflowStatus:
          type: number
        ExpectedCompletionDate:
          type: string
          format: date
        D_ProfessionalServicesWorkflowStatus:
          type: number
        CSTAT_SalesOrderHoursProServe:
          type: number
        CSTAT_ChargeableTimeSheetHoursProServe:
          type: number
        Stages:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Description:
                type: string
    JobCollection:
      type: object
      properties:
        TotalCount:
          type: integer
        Data:
          type: array
          items:
            $ref: '#/components/schemas/Job'
    EmployeeLeave:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Employee:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
        StartDate:
          type: string
          format: date
        EndDate:
          type: string
          format: date
    EmployeeLeave_Write:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Employee:
          type: number
        StartDate:
          type: string
          format: date
        EndDate:
          type: string
          format: date
    EmployeeLeaveCollection:
      type: object
      properties:
        TotalCount:
          type: integer
        Data:
          type: array
          items:
            $ref: '#/components/schemas/EmployeeLeave'
security:
  - apiKey: []
