OfficeGest
Workshop/Appointments/{id}

Update appointment

Sending reception_date or delivery_date also updates the linked service order and reports the outcome in meta.service_order_dates_synced. The appointment end is never used as the service order delivery datetime: only the explicit fields propagate. Clearing no_show is rejected with 409 once at least one appointment has been rescheduled from this one, and a cascade that clears it reports siblings in the same situation under meta.cascade.skipped_ids. A new service_order is rejected with 422 unless it exists, is not cancelled, belongs to the appointment plate and its status allows scheduling. An empty service_order unlinks the appointment without validating the order. Linking a new service order moves it to the scheduled status, as creating an appointment does, and unlinking the last appointment of an order in that status moves it back to waiting, as deleting one does.

PATCH
/workshop/appointments/{id}
AuthorizationBearer <token>

In: header

Path Parameters

idstring
subject?string
start?string
end?string
employee_id?number | null
vehicle_plate?string
confirmed?boolean
completed?boolean
no_show?boolean
cascade_service_order?boolean
all_day?string
location?string
priority?string
contact_name?string
contact_phone?string
customer_id?number
observations?string
reception_date?string
delivery_date?string
warehouse_id?number
department_id?number | null

Valid value from departamentos.id.

service_order?string
checklists?array<unknown>
interventions?array<object>

Response Body

curl -X PATCH "https://og-tenant1.test:8003/api/v2/workshop/appointments/string" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "data": {
    "resource": "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"
  }
}