# SwiftShiftApi.ApplicationApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**applyToShift**](ApplicationApi.md#applyToShift) | **POST** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications/{caregiver_id} | Apply for shift
[**deleteShiftApplication**](ApplicationApi.md#deleteShiftApplication) | **DELETE** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications/{caregiver_id} | delete shift application
[**listShiftApplicationDetails**](ApplicationApi.md#listShiftApplicationDetails) | **GET** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications | List shift applications


<a name="applyToShift"></a>
# **applyToShift**
> ShiftApplication applyToShift(organizationId, siteId, shiftId, caregiverId)

Apply for shift

Apply for shift

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.ApplicationApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
let caregiverId = null; // String | id of a caregiver
apiInstance.applyToShift(organizationId, siteId, shiftId, caregiverId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **shiftId** | [**String**](.md)| id of a shift | 
 **caregiverId** | [**String**](.md)| id of a caregiver | 

### Return type

[**ShiftApplication**](ShiftApplication.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="deleteShiftApplication"></a>
# **deleteShiftApplication**
> ShiftApplication deleteShiftApplication(organizationId, siteId, shiftId, caregiverId, opts)

delete shift application

Delete shift application

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.ApplicationApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
let caregiverId = null; // String | id of a caregiver
let opts = {
  'applicationDeletePayload': new SwiftShiftApi.ApplicationDeletePayload() // ApplicationDeletePayload | 
};
apiInstance.deleteShiftApplication(organizationId, siteId, shiftId, caregiverId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **shiftId** | [**String**](.md)| id of a shift | 
 **caregiverId** | [**String**](.md)| id of a caregiver | 
 **applicationDeletePayload** | [**ApplicationDeletePayload**](ApplicationDeletePayload.md)|  | [optional] 

### Return type

[**ShiftApplication**](ShiftApplication.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="listShiftApplicationDetails"></a>
# **listShiftApplicationDetails**
> InlineResponse20016 listShiftApplicationDetails(organizationId, siteId, shiftId, opts)

List shift applications

List shift applications

### Example
```javascript
import SwiftShiftApi from 'swift_shift_api';

let apiInstance = new SwiftShiftApi.ApplicationApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
let opts = {
  'take': 50, // Number | Page size.
  'skip': 0, // Number | The start index.
  'search': "search_example", // String | Search phrase.
  'select': ["null"], // [String] | List of the properties to return.
  'sort': ["null"], // [String] | List of the properties to sort by.
  'q': "q_example" // String | resource query language
};
apiInstance.listShiftApplicationDetails(organizationId, siteId, shiftId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **organizationId** | [**String**](.md)| id of an organization | 
 **siteId** | [**String**](.md)| id of a site | 
 **shiftId** | [**String**](.md)| id of a shift | 
 **take** | **Number**| Page size. | [optional] [default to 50]
 **skip** | **Number**| The start index. | [optional] [default to 0]
 **search** | **String**| Search phrase. | [optional] 
 **select** | [**[String]**](String.md)| List of the properties to return. | [optional] 
 **sort** | [**[String]**](String.md)| List of the properties to sort by. | [optional] 
 **q** | **String**| resource query language | [optional] 

### Return type

[**InlineResponse20016**](InlineResponse20016.md)

### Authorization

No authorization required

### HTTP request headers

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

