OfficeGest
Workshop/Mechanic availability/Occupancy

Mechanic occupancy heatmap

Per mechanic and day: occupied minutes (appointments) and scheduled minutes (capacity), plus the day status.

GET
/workshop/mechanic-availability/occupancy
AuthorizationBearer <token>

In: header

Query Parameters

start?string

Interval start date (inclusive)

Formatdate
end?string

Interval end date (inclusive)

Formatdate
warehouse_id?integer

Filter mechanics by their associated warehouse

include_hidden_days?boolean

Also return the weekdays hidden in the agenda view (OFIC_hide_days), which are omitted by default

departments?array<unknown>

Filter mechanics by department ids (departments[]=4&departments[]=6)

employees?array<unknown>

Filter mechanics by employee ids (employees[]=3&employees[]=5)

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/mechanic-availability/occupancy?start=2019-08-24&end=2019-08-24&warehouse_id=0&include_hidden_days=true&departments=&employees="
{
  "data": [
    {
      "employee_id": 0,
      "department_id": 0,
      "days": {
        "date": "2019-08-24",
        "status": "available",
        "capacity_minutes": 0,
        "occupied_minutes": 0
      }
    }
  ]
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}