# openapi.api.AppointmentApi

## Load the API package
```dart
import 'package:openapi/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**approve**](AppointmentApi.md#approve) | **PUT** /api/shop-config/appointment/{id}/approve | 
[**book**](AppointmentApi.md#book) | **POST** /api/shop-config/appointment/book | 
[**cancel**](AppointmentApi.md#cancel) | **DELETE** /api/shop-config/appointment/{id} | 
[**customerCancel**](AppointmentApi.md#customercancel) | **DELETE** /api/shop-config/appointment/customer/{id} | 
[**findAllAvailableTimes**](AppointmentApi.md#findallavailabletimes) | **GET** /api/shop-config/appointment/available | 
[**findAllFreeTimes**](AppointmentApi.md#findallfreetimes) | **GET** /api/shop-config/appointment | 
[**shopAppointments**](AppointmentApi.md#shopappointments) | **GET** /api/shop-config/appointment/shop-appointments | 
[**updateFreeDays**](AppointmentApi.md#updatefreedays) | **PUT** /api/shop-config/appointment/days | 
[**updateFreeTimes**](AppointmentApi.md#updatefreetimes) | **PUT** /api/shop-config/appointment/{dayId}/times | 
[**userAppointments**](AppointmentApi.md#userappointments) | **GET** /api/shop-config/appointment/user-appointments | 
[**userAppointmentsById**](AppointmentApi.md#userappointmentsbyid) | **GET** /api/shop-config/appointment/user-appointments-by-id/{customerId} | 


# **approve**
> OkRes approve(id, locale)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num id = 8.14; // num | 
final String locale = locale_example; // String | 

try {
    final response = api.approve(id, locale);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->approve: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **locale** | **String**|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **book**
> OkRes book(locale, bookAppointmentDto)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final String locale = locale_example; // String | 
final BookAppointmentDto bookAppointmentDto = ; // BookAppointmentDto | 

try {
    final response = api.book(locale, bookAppointmentDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->book: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **locale** | **String**|  | 
 **bookAppointmentDto** | [**BookAppointmentDto**](BookAppointmentDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **cancel**
> OkRes cancel(id, cancelAppointmentReasonDto)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num id = 8.14; // num | 
final CancelAppointmentReasonDto cancelAppointmentReasonDto = ; // CancelAppointmentReasonDto | 

try {
    final response = api.cancel(id, cancelAppointmentReasonDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->cancel: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **cancelAppointmentReasonDto** | [**CancelAppointmentReasonDto**](CancelAppointmentReasonDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **customerCancel**
> OkRes customerCancel(id, cancelAppointmentReasonDto)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num id = 8.14; // num | 
final CancelAppointmentReasonDto cancelAppointmentReasonDto = ; // CancelAppointmentReasonDto | 

try {
    final response = api.customerCancel(id, cancelAppointmentReasonDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->customerCancel: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **cancelAppointmentReasonDto** | [**CancelAppointmentReasonDto**](CancelAppointmentReasonDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **findAllAvailableTimes**
> FindAllAvailableTimeRes findAllAvailableTimes(date, topicId)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final DateTime date = 2013-10-20T19:20:30+01:00; // DateTime | 
final num topicId = 8.14; // num | 

try {
    final response = api.findAllAvailableTimes(date, topicId);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->findAllAvailableTimes: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **date** | **DateTime**|  | 
 **topicId** | **num**|  | 

### Return type

[**FindAllAvailableTimeRes**](FindAllAvailableTimeRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **findAllFreeTimes**
> FindAllFreeTimeRes findAllFreeTimes()



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();

try {
    final response = api.findAllFreeTimes();
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->findAllFreeTimes: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**FindAllFreeTimeRes**](FindAllFreeTimeRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **shopAppointments**
> UserBookedAppointmentRes shopAppointments(page, limit, search, sort, customerIds, topicIds, status, from)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num page = 8.14; // num | Page number
final num limit = 8.14; // num | Number of results to be returned
final String search = search_example; // String | 
final GetAllCustomerSort sort = ; // GetAllCustomerSort | sort of customer
final BuiltList<num> customerIds = ; // BuiltList<num> | customerIds that you want to get
final BuiltList<num> topicIds = ; // BuiltList<num> | topicIds that you want to get
final FindAllShopAppointmentDtoAppointmentStatus status = ; // FindAllShopAppointmentDtoAppointmentStatus | 
final String from = from_example; // String | From date

try {
    final response = api.shopAppointments(page, limit, search, sort, customerIds, topicIds, status, from);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->shopAppointments: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **page** | **num**| Page number | [default to 1]
 **limit** | **num**| Number of results to be returned | [default to 10]
 **search** | **String**|  | [optional] 
 **sort** | [**GetAllCustomerSort**](.md)| sort of customer | [optional] 
 **customerIds** | [**BuiltList&lt;num&gt;**](num.md)| customerIds that you want to get | [optional] 
 **topicIds** | [**BuiltList&lt;num&gt;**](num.md)| topicIds that you want to get | [optional] 
 **status** | [**FindAllShopAppointmentDtoAppointmentStatus**](.md)|  | [optional] 
 **from** | **String**| From date | [optional] 

### Return type

[**UserBookedAppointmentRes**](UserBookedAppointmentRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateFreeDays**
> OkRes updateFreeDays(updateAvailableDaysDto)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final UpdateAvailableDaysDto updateAvailableDaysDto = ; // UpdateAvailableDaysDto | 

try {
    final response = api.updateFreeDays(updateAvailableDaysDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->updateFreeDays: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **updateAvailableDaysDto** | [**UpdateAvailableDaysDto**](UpdateAvailableDaysDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateFreeTimes**
> OkRes updateFreeTimes(dayId, updateAvailableTimesDto)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num dayId = 8.14; // num | 
final UpdateAvailableTimesDto updateAvailableTimesDto = ; // UpdateAvailableTimesDto | 

try {
    final response = api.updateFreeTimes(dayId, updateAvailableTimesDto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->updateFreeTimes: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dayId** | **num**|  | 
 **updateAvailableTimesDto** | [**UpdateAvailableTimesDto**](UpdateAvailableTimesDto.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **userAppointments**
> UserBookedAppointmentRes userAppointments()



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();

try {
    final response = api.userAppointments();
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->userAppointments: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**UserBookedAppointmentRes**](UserBookedAppointmentRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **userAppointmentsById**
> UserBookedAppointmentRes userAppointmentsById(customerId)



### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getAppointmentApi();
final num customerId = 8.14; // num | 

try {
    final response = api.userAppointmentsById(customerId);
    print(response);
} catch on DioError (e) {
    print('Exception when calling AppointmentApi->userAppointmentsById: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **customerId** | **num**|  | 

### Return type

[**UserBookedAppointmentRes**](UserBookedAppointmentRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

