# SwiftShiftApi.ShiftApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**applyToShift**](ShiftApi.md#applyToShift) | **POST** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications/{caregiver_id} | Apply for shift
[**deleteShiftApplication**](ShiftApi.md#deleteShiftApplication) | **DELETE** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications/{caregiver_id} | delete shift application
[**getShift**](ShiftApi.md#getShift) | **GET** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id} | Get shift details
[**listOrganizationShifts**](ShiftApi.md#listOrganizationShifts) | **GET** /organizations/{organization_id}/shifts | List shifts for an organization
[**listShiftApplicationDetails**](ShiftApi.md#listShiftApplicationDetails) | **GET** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/applications | List shift applications
[**listShiftLogs**](ShiftApi.md#listShiftLogs) | **GET** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/logs | List shift access logs
[**listShifts**](ShiftApi.md#listShifts) | **GET** /shifts | List all shifts
[**listSiteShifts**](ShiftApi.md#listSiteShifts) | **GET** /organizations/{organization_id}/sites/{site_id}/shifts | List shifts for a site
[**organizationShiftDelete**](ShiftApi.md#organizationShiftDelete) | **DELETE** /organizations/{organization_id}/shifts/{shift_id} | 
[**postShift**](ShiftApi.md#postShift) | **POST** /organizations/{organization_id}/sites/{site_id}/shifts | 
[**putShift**](ShiftApi.md#putShift) | **PUT** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id} | 
[**shiftAssign**](ShiftApi.md#shiftAssign) | **POST** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/assign | 
[**shiftCancel**](ShiftApi.md#shiftCancel) | **DELETE** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/cancel | 
[**shiftCover**](ShiftApi.md#shiftCover) | **PUT** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id}/cover | 
[**shiftDelete**](ShiftApi.md#shiftDelete) | **DELETE** /organizations/{organization_id}/sites/{site_id}/shifts/{shift_id} | 


<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.ShiftApi();
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.ShiftApi();
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="getShift"></a>
# **getShift**
> ShiftDetails getShift(organizationId, siteId, shiftId)

Get shift details

Get shift details

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
apiInstance.getShift(organizationId, siteId, shiftId, (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 | 

### Return type

[**ShiftDetails**](ShiftDetails.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="listOrganizationShifts"></a>
# **listOrganizationShifts**
> InlineResponse20014 listOrganizationShifts(organizationId, opts)

List shifts for an organization

List shifts for an organization

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let opts = {
  'from': 3.4, // Number | unix timestamp
  '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.listOrganizationShifts(organizationId, 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 | 
 **from** | **Number**| unix timestamp | [optional] 
 **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

[**InlineResponse20014**](InlineResponse20014.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **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.ShiftApi();
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

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

List shift access logs

List shift access logs

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

let apiInstance = new SwiftShiftApi.ShiftApi();
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.listShiftLogs(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

[**InlineResponse20015**](InlineResponse20015.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="listShifts"></a>
# **listShifts**
> InlineResponse20014 listShifts(opts)

List all shifts

List all shifts

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let opts = {
  'from': 3.4, // Number | unix timestamp
  '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.listShifts(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **from** | **Number**| unix timestamp | [optional] 
 **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

[**InlineResponse20014**](InlineResponse20014.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="listSiteShifts"></a>
# **listSiteShifts**
> InlineResponse20014 listSiteShifts(organizationId, siteId, opts)

List shifts for a site

List shifts for a site

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let opts = {
  'q': "q_example", // String | resource query language
  'accept': "accept_example" // String | accept header param
};
apiInstance.listSiteShifts(organizationId, siteId, 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 | 
 **q** | **String**| resource query language | [optional] 
 **accept** | **String**| accept header param | [optional] 

### Return type

[**InlineResponse20014**](InlineResponse20014.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, application/pdf, text/csv

<a name="organizationShiftDelete"></a>
# **organizationShiftDelete**
> Shift organizationShiftDelete(organizationId, shiftId)



delete shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let shiftId = null; // String | id of a shift
apiInstance.organizationShiftDelete(organizationId, shiftId, (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 | 
 **shiftId** | [**String**](.md)| id of a shift | 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="postShift"></a>
# **postShift**
> Shift postShift(organizationId, siteId, opts)



create new shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let opts = {
  'shiftPayload': new SwiftShiftApi.ShiftPayload() // ShiftPayload | 
};
apiInstance.postShift(organizationId, siteId, 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 | 
 **shiftPayload** | [**ShiftPayload**](ShiftPayload.md)|  | [optional] 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

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



update shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
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 = {
  'shiftPayload': new SwiftShiftApi.ShiftPayload() // ShiftPayload | 
};
apiInstance.putShift(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 | 
 **shiftPayload** | [**ShiftPayload**](ShiftPayload.md)|  | [optional] 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

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



assign shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
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 = {
  'shiftAssignPayload': new SwiftShiftApi.ShiftAssignPayload() // ShiftAssignPayload | 
};
apiInstance.shiftAssign(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 | 
 **shiftAssignPayload** | [**ShiftAssignPayload**](ShiftAssignPayload.md)|  | [optional] 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

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



cancel shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
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 = {
  'shiftCancelPayload': new SwiftShiftApi.ShiftCancelPayload() // ShiftCancelPayload | 
};
apiInstance.shiftCancel(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 | 
 **shiftCancelPayload** | [**ShiftCancelPayload**](ShiftCancelPayload.md)|  | [optional] 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="shiftCover"></a>
# **shiftCover**
> Shift shiftCover(organizationId, siteId, shiftId)



update shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
apiInstance.shiftCover(organizationId, siteId, shiftId, (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 | 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="shiftDelete"></a>
# **shiftDelete**
> Shift shiftDelete(organizationId, siteId, shiftId)



delete shift

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

let apiInstance = new SwiftShiftApi.ShiftApi();
let organizationId = null; // String | id of an organization
let siteId = null; // String | id of a site
let shiftId = null; // String | id of a shift
apiInstance.shiftDelete(organizationId, siteId, shiftId, (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 | 

### Return type

[**Shift**](Shift.md)

### Authorization

No authorization required

### HTTP request headers

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

