OfficeGest
Workshop/Appointments/Upcoming

List own upcoming appointments

Returns workshop appointments linked to a vehicle/service order (numos, codequipext or is_osv), not yet done, from a start date (default today) onward with no upper bound, ordered by id descending and capped by limit. Scoped to the authenticated employee unless employee_id is given. Powers the OGMF "Marcações" dashboard widget (dashboard.id=69).

GET
/workshop/appointments/upcoming
AuthorizationBearer <token>

In: header

Query Parameters

employee_id?integer

Employee ID to list appointments for. Default: the authenticated employee. No extra privilege is required: oficinas:agenda already exposes every employee's appointments through GET /v2/workshop/appointments.

is_done?boolean

Filter by done status. Default: false (not yet done).

start?string

Lower bound for the start date, open-ended (no upper bound). Default: today.

Formatdate
limit?integer

Maximum number of appointments returned, ordered by id descending. Default: 100.

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/appointments/upcoming?employee_id=0&is_done=true&start=2019-08-24&limit=0"
{
  "data": [
    {
      "id": 0,
      "subject": "string",
      "event_type": "string",
      "category_id": "string",
      "start": "2019-08-24T14:15:22Z",
      "end": "2019-08-24T14:15:22Z",
      "entities": [
        {
          "id": 0,
          "type": "string",
          "name": "string"
        }
      ],
      "service_order": {
        "number": 0,
        "document_number": "string"
      },
      "vehicle_ref": "string"
    }
  ]
}
{
  "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"
  }
}