postAppointmentsNextFreeDate method

Future<RestApiResponse> postAppointmentsNextFreeDate(
  1. DateTime from,
  2. DateTime to,
  3. DateTime searchArea,
  4. List<String> users,
)

This request allows to find next free date with given duration

from Appointment start

to Appointment end

searchArea end date for search

users checks free dates in user calenders

Implementation

Future<RestApiResponse> postAppointmentsNextFreeDate(
  DateTime from,
  DateTime to,
  DateTime searchArea,
  List<String> users,
) {
  return _bodyRequest(
    ApiHttpMethod.post,
    '/appointments/nextFreeDate',
    'postAppointmentsNextFreeDate',
    <String, dynamic>{
      'from': from.toISOFormatString(),
      'to': to.toISOFormatString(),
      'searchArea': searchArea.toISOFormatString(),
      'users': users,
    },
  );
}