openapi: 3.0.0
info:
  title: 'Mobility AS'
  description: 'API for Mobility. Use x-api-key header with your http calls to set api key'
  version: '1.0'
servers:
  -
    url: 'https://api.mobility.no/api/v1'
paths:
  /asset:
    get:
      tags:
        - 'Asset API'
      summary: 'Search for assets'
      description: 'Display a listing of the resource.'
      operationId: 7391fe6ef4985646abe1db0ad5301764
      parameters:
        -
          name: employee_id
          in: query
        -
          name: unspsc
          in: query
        -
          name: serial_number
          in: query
        -
          name: ean
          in: query
        -
          name: item_number
          in: query
        -
          name: from_date
          in: query
        -
          name: to_date
          in: query
      responses:
        '200':
          $ref: '#/components/schemas/Asset'
    post:
      tags:
        - 'Asset API'
      summary: 'Create asset'
      description: 'Add a new asset with a status (status field can be id-hash or status name from /asset/status)'
      operationId: 1f8ecc656a83ac39510e3c9ad96784b6
      requestBody:
        $ref: '#/components/requestBodies/Asset'
      responses:
        '200':
          $ref: '#/components/schemas/Asset'
  '/asset/{id}':
    patch:
      tags:
        - 'Asset API'
      summary: 'Update asset'
      description: 'Update asset'
      operationId: 4217ba80c2cae36c812e2859932a476d
      parameters:
        -
          name: id
          in: path
          description: 'Id-hash of an existing asset'
      requestBody:
        $ref: '#/components/requestBodies/Asset'
      responses:
        '200':
          description: 'No body'
  '/asset/{id}/status':
    post:
      tags:
        - 'Asset API'
      summary: 'Create asset status'
      description: 'Add a new asset status (status field can be id-hash or status name from /asset/status)'
      operationId: 192cd23ec0c7fdd0620ea4788ec7629a
      parameters:
        -
          name: id
          in: path
          description: 'Id-hash of an existing asset'
      requestBody:
        $ref: '#/components/requestBodies/AssetStatus'
      responses:
        '200':
          description: 'No body'
  /user:
    get:
      tags:
        - 'User API'
      summary: 'Search for employees'
      description: 'Display a listing of the resource.'
      operationId: b99ef8515bed7bc1da41ee523ddbcc52
      parameters:
        -
          name: email
          in: query
        -
          name: employee_id
          in: query
        -
          name: name
          in: query
      responses:
        '200':
          $ref: '#/components/schemas/Employee'
  /asset/productgroup:
    get:
      tags:
        - 'Asset API'
      summary: 'List product groups'
      description: 'Display a listing of the resource.'
      operationId: 50ffcd89a99998f2e5d13312fc4ac99e
      parameters:
        -
          name: productgroup
          in: query
      responses:
        '200':
          $ref: '#/components/schemas/ProductGroup'
  /payroll/salarydeduction:
    get:
      tags:
        - 'Payroll API'
      summary: 'Check for salary deduction'
      description: 'Display a listing of the resource.'
      operationId: 4a8771ccb0763089e9725a7c7f7f5703
      parameters:
        -
          name: from_date
          in: query
          required: true
        -
          name: to_date
          in: query
          required: true
      responses:
        '200':
          $ref: '#/components/schemas/SalaryDeduction'
  /payroll/salarydeduction/instant:
    get:
      tags:
        - 'Payroll API'
      summary: 'Check for instant salary deduction'
      description: 'Display a listing of the resource.'
      operationId: 425276a06e8d6f8e280967fe48e4cb04
      parameters:
        -
          name: from_date
          in: query
          required: true
        -
          name: to_date
          in: query
          required: true
        -
          name: is_processed
          in: query
      responses:
        '200':
          $ref: '#/components/schemas/SalaryDeduction'
  /asset/status:
    get:
      tags:
        - 'Asset API'
      summary: 'Display a listing of the resource.'
      operationId: 4b20e4d2a77a689456ab810d39c92639
      parameters:
        -
          name: status
          in: query
          description: 'Filter by name'
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/schemas/Status'
components:
  schemas:
    Asset:
      properties:
        manufacturer_name:
          type: string
        item_number:
          type: string
        item_name:
          type: string
        item_name_2:
          type: string
        supplier_name:
          type: string
        serial_number:
          type: string
        amount:
          type: string
        currency:
          type: string
        vat_rate:
          type: string
        country_of_origin:
          type: string
        co2_footprint:
          type: string
        order_number:
          type: string
        unspsc:
          type: string
        order_date:
          type: string
          format: date-time
        invoice_number:
          type: string
        invoice_date:
          type: string
          format: date-time
        asset_location1:
          type: string
        asset_location2:
          type: string
        asset_location3:
          type: string
        asset_location4:
          type: string
        asset_location5:
          type: string
        employee_id:
          type: string
        status:
          type: string
        productgroup:
          type: string
      type: object
    AssetStatus:
      properties:
        asset_location2:
          type: string
        asset_location3:
          type: string
        asset_location4:
          type: string
        asset_location5:
          type: string
        employee_id:
          type: string
        status:
          type: string
        productgroup:
          type: string
        date:
          type: string
        description_status:
          type: string
        description_condition:
          type: string
      type: object
    Employee:
      properties:
        employee_id:
          type: integer
        name:
          type: string
        phone:
          type: string
        email:
          type: string
        company_name:
          type: string
        street_address:
          type: string
        street_address_2:
          type: string
        postal_code:
          type: string
        city:
          type: string
        country:
          type: string
        department:
          type: string
        location:
          type: string
        manager:
          type: string
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
      type: object
    ProductGroup:
      properties:
        name:
          type: string
      type: object
    SalaryDeduction:
      properties:
        employee_id:
          type: integer
        type:
          type: string
        period:
          type: string
        amount:
          type: string
      type: object
    Status:
      properties:
        id:
          type: string
        name:
          type: string
      type: object
  requestBodies:
    Asset:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Asset'
    AssetStatus:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AssetStatus'
  securitySchemes:
    apikey:
      type: apiKey
      name: x-api-key
      in: header
security:
  -
    apikey: []
tags:
  -
    name: 'Asset API'
    description: 'Asset API'
  -
    name: 'User API'
    description: 'User API'
  -
    name: 'Payroll API'
    description: 'Payroll API'
