apimaticcalculatorlatest 4.0.0
Python client library for Channel Management API

# Getting started

![example image](https://i.ibb.co/7bqPkGJ/PMS-integration-workflow.png "An exemplary image")

**Before beginning work it is necessary that:**

  * Your organization is registered and activated
  * You have participated in a kick­off meeting
  * The opening questionnaire has been filled out
  * You have your login and password. (Using it you get a unique session `token` that must be used in every request to API as param `jwt`)

[Contact us](https://bookingpal.com/en/contact-us/) to be registered and get your credentials.

All responses are returned as JSON.

This document covers all the API calls and other methods that can be used to complete Razor-Cloud integration. It is important to note that all parameters are **case sensitive** in this document and should be used as documented.

**Responses:**
When a request is successful, a response body will typically be sent back in the form of a JSON object. An exception to this is when a DELETE request is processed, which will result in a successful `200` status and an empty response body.

## How to Build


You must have Python ```2 >=2.7.9``` or Python ```3 >=3.4``` installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc. 
These dependencies are defined in the ```requirements.txt``` file that comes with the SDK.
To resolve these dependencies, you can use the PIP Dependency manager. Install it by following steps at [https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/).

Python and PIP executables should be defined in your PATH. Open command prompt and type ```pip --version```.
This should display the version of the PIP Dependency Manager installed if your installation was successful and the paths are properly defined.

* Using command line, navigate to the directory containing the generated files (including ```requirements.txt```) for the SDK.
* Run the command ```pip install -r requirements.txt```. This should install all the required dependencies.

![Building SDK - Step 1](https://apidocs.io/illustration/python?step=installDependencies&workspaceFolder=Channel%20Management%20API-Python)


## How to Use

The following section explains how to use the Apimaticcalculatorlatest SDK package in a new project.

### 1. Open Project in an IDE

Open up a Python IDE like PyCharm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

![Open project in PyCharm - Step 1](https://apidocs.io/illustration/python?step=pyCharm)

Click on ```Open``` in PyCharm to browse to your generated SDK directory and then click ```OK```.

![Open project in PyCharm - Step 2](https://apidocs.io/illustration/python?step=openProject0&workspaceFolder=Channel%20Management%20API-Python)     

The project files will be displayed in the side bar as follows:

![Open project in PyCharm - Step 3](https://apidocs.io/illustration/python?step=openProject1&workspaceFolder=Channel%20Management%20API-Python&projectName=apimaticcalculatorlatest)     

### 2. Add a new Test Project

Create a new directory by right clicking on the solution name as shown below:

![Add a new project in PyCharm - Step 1](https://apidocs.io/illustration/python?step=createDirectory&workspaceFolder=Channel%20Management%20API-Python&projectName=apimaticcalculatorlatest)

Name the directory as "test"

![Add a new project in PyCharm - Step 2](https://apidocs.io/illustration/python?step=nameDirectory)
   
Add a python file to this project with the name "testsdk"

![Add a new project in PyCharm - Step 3](https://apidocs.io/illustration/python?step=createFile&workspaceFolder=Channel%20Management%20API-Python&projectName=apimaticcalculatorlatest)

Name it "testsdk"

![Add a new project in PyCharm - Step 4](https://apidocs.io/illustration/python?step=nameFile)

In your python file you will be required to import the generated python library using the following code lines

```Python
from apimaticcalculatorlatest.apimaticcalculatorlatest_client import ApimaticcalculatorlatestClient
```

![Add a new project in PyCharm - Step 4](https://apidocs.io/illustration/python?step=projectFiles&workspaceFolder=Channel%20Management%20API-Python&libraryName=apimaticcalculatorlatest.apimaticcalculatorlatest_client&projectName=apimaticcalculatorlatest&className=ApimaticcalculatorlatestClient)

After this you can write code to instantiate an API client object, get a controller object and  make API calls. Sample code is given in the subsequent sections.

### 3. Run the Test Project

To run the file within your test project, right click on your Python file inside your Test project and click on ```Run```

![Run Test Project - Step 1](https://apidocs.io/illustration/python?step=runProject&workspaceFolder=Channel%20Management%20API-Python&libraryName=apimaticcalculatorlatest.apimaticcalculatorlatest_client&projectName=apimaticcalculatorlatest&className=ApimaticcalculatorlatestClient)


## How to Test

You can test the generated SDK and the server with automatically generated test
cases. unittest is used as the testing framework and nose is used as the test
runner. You can run the tests as follows:

  1. From terminal/cmd navigate to the root directory of the SDK.
  2. Invoke ```pip install -r test-requirements.txt```
  3. Invoke ```nosetests```

## Initialization

### Authentication
In order to setup authentication and initialization of the API client, you need the following information.

| Parameter | Description |
|-----------|-------------|
| jwt | Token which need to be passed in every request as GET parameter. You will get this token in authorization response. Token is valid 1 hour. |



API client can be initialized as following.

```python
# Configuration parameters and credentials
jwt = 'jwt' # Token which need to be passed in every request as GET parameter. You will get this token in authorization response. Token is valid 1 hour.

client = ApimaticcalculatorlatestClient(jwt)
```



# Class Reference

## <a name="list_of_controllers"></a>List of Controllers

* [ProductController](#product_controller)
* [LOSPricingController](#los_pricing_controller)
* [MessagingController](#messaging_controller)
* [PropertyManagersController](#property_managers_controller)
* [RequestToBookController](#request_to_book_controller)
* [ImagesController](#images_controller)
* [FeeAndTaxMandatoryAtThePropertyLevelController](#fee_and_tax_mandatory_at_the_property_level_controller)
* [YieldsController](#yields_controller)
* [FeeAndTaxController](#fee_and_tax_controller)
* [ValidationController](#validation_controller)
* [PushNotificationController](#push_notification_controller)
* [RatesAndAvailabilityController](#rates_and_availability_controller)
* [ReservationNotificationsController](#reservation_notifications_controller)
* [TestingOfMessageAPICallsController](#testing_of_message_api_calls_controller)
* [AuthorizationController](#authorization_controller)

## <a name="product_controller"></a>![Class: ](https://apidocs.io/img/class.png ".ProductController") ProductController

### Get controller instance

An instance of the ``` ProductController ``` class can be accessed from the API Client.

```python
 product_controller = client.product
```

### <a name="updateproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.updateproduct") updateproduct

> This function allows a logged in user to update product details.
> 
> Request parameters and request example will be the same as in the create product API. The only field that must be added is the product id.
> 
> You need to have all other parameters which were used in the create API call that you want to keep (AltID can’t be updated). Everything that you do not send as an update will be deleted (overwritten).
> 
> Response parameters and response examples are the same as in the create product API.

```python
def updateproduct(self,
                      content_type,
                      body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateUpdatePropertyRequest()

result = product_controller.updateproduct(content_type, body)

```


### <a name="createproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.createproduct") createproduct

> This function allows a logged in user to create new product. You can only send one product in each request. 
> 
> 

```python
def createproduct(self,
                      content_type,
                      body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateUpdatePropertyRequest()

result = product_controller.createproduct(content_type, body)

```


### <a name="deletelistproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.deletelistproduct") deletelistproduct

> This function allows logged in user to delete list of products.
> 
> 

```python
def deletelistproduct(self,
                          content_type,
                          body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PropertyListRequest()

result = product_controller.deletelistproduct(content_type, body)

```


### <a name="create_activationlistproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.create_activationlistproduct") create_activationlistproduct

> This function allows logged in user to activate a list of products in BookingPal. Products MUST be activated successfully before they can be distributed to any channel. 
> 
> Note: When a product is successfully activated it will be queued for the internal BP validation function and you will receive async push messages when the validation is completed - like it is described in the Validation section.

```python
def create_activationlistproduct(self,
                                     content_type,
                                     body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PropertyListRequest()

result = product_controller.create_activationlistproduct(content_type, body)

```


### <a name="deleteproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.deleteproduct") deleteproduct

> This function allows the logged in user to delete product.

```python
def deleteproduct(self,
                      product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | Property ID |



#### Example Usage

```python
product_id = 'productId'

result = product_controller.deleteproduct(product_id)

```


### <a name="getproductlist"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.getproductlist") getproductlist

> This API call will return a list of properties that belong to the current user. This means that a user has to be logged in with products created already.
> Every API call in this section should be with PM credentials.

```python
def getproductlist(self)
```

#### Example Usage

```python

result = product_controller.getproductlist()

```


### <a name="create_deactivationlistproduct"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.create_deactivationlistproduct") create_deactivationlistproduct

> This function allows the logged in user to deactivate a list of products. This function will also close the calendars on every channel the products have been listed on.

```python
def create_deactivationlistproduct(self,
                                       content_type,
                                       body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PropertyListRequest()

result = product_controller.create_deactivationlistproduct(content_type, body)

```


### <a name="getproductby_id"></a>![Method: ](https://apidocs.io/img/method.png ".ProductController.getproductby_id") getproductby_id

> This function allows logged in user to get a specific product.

```python
def getproductby_id(self,
                        product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | Id of the property |



#### Example Usage

```python
product_id = 'productId'

result = product_controller.getproductby_id(product_id)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="los_pricing_controller"></a>![Class: ](https://apidocs.io/img/class.png ".LOSPricingController") LOSPricingController

### Get controller instance

An instance of the ``` LOSPricingController ``` class can be accessed from the API Client.

```python
 los_pricing_controller = client.los_pricing
```

### <a name="createandupdate_los_lengthof_stay_pricing"></a>![Method: ](https://apidocs.io/img/method.png ".LOSPricingController.createandupdate_los_lengthof_stay_pricing") createandupdate_los_lengthof_stay_pricing

> Introduction: You can use this function if you would like to send BookingPal different prices for various Length of Stays with the same starting date.
> 
> 
> 
> LOS Pricing will be a different method in sending rates to BookingPal and is defined as pricing sent for a specific “Stay ranges”, In the LOS  method you are setting specific rates based on the Length of Stay. (This is a different way to push rates to BookingPal. )
> 
> 
> 
> For date periods of 1 to 30 days a specific rate need to enter check-in date and a rate for every possible reservation starting at that date (i.e. 1 day, 2 days, up to 30 days, 30 days is the maximum value allowed for this field) you will need to send BookingPal total rate value for that period. 
> 
> 
> 
> Maximum LOS number of days is 30. All other LOS values after 30 will not be saved. If you do not support reservation for some specific number of dates - send value 0.00 for this LOS number of days. Keep in mind that all values not sent for any specific check-in date will be considered as 0, and reservation for this number of days will not be possible.
> 
> Field maxGuests allows you to set different rates per different number of guests. If you do not have different rate values per number of guests - you can send the value for maximum number of guests, and all others will have the same rate.
> 
> 
> 
> For MLT properties which supported LOS price for update number of count you can use it rates and availability API.
> 
> 
> 
> It is suggested to manage availability over “rates and availability” API call, and to close/open dates over this call.
> 
> 
> 
> Note: this API call can be used only if you set supportedLosRates = true on the product. Otherwise using this API for specific product is not possible.
> 
> 

```python
def createandupdate_los_lengthof_stay_pricing(self,
                                                  content_type,
                                                  body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateandupdateLOSRequest()

result = los_pricing_controller.createandupdate_los_lengthof_stay_pricing(content_type, body)

```


### <a name="getlospriceslistbyproduct_id"></a>![Method: ](https://apidocs.io/img/method.png ".LOSPricingController.getlospriceslistbyproduct_id") getlospriceslistbyproduct_id

> This function allows the logged in user to get a LOS rate for property.

```python
def getlospriceslistbyproduct_id(self,
                                     product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | Property ID in BookingPal |



#### Example Usage

```python
product_id = 'productId'

result = los_pricing_controller.getlospriceslistbyproduct_id(product_id)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="messaging_controller"></a>![Class: ](https://apidocs.io/img/class.png ".MessagingController") MessagingController

### Get controller instance

An instance of the ``` MessagingController ``` class can be accessed from the API Client.

```python
 messaging_controller = client.messaging
```

### <a name="getmessagethreads"></a>![Method: ](https://apidocs.io/img/method.png ".MessagingController.getmessagethreads") getmessagethreads

> This function allows the logged in user to get all message threads or message threads with unresponded message from guest for whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return first page and 10 threads per page. And in heading you will get a link for the next page.

```python
def getmessagethreads(self,
                          page,
                          limit,
                          thread_type)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| page |  ``` Required ```  | Number of current page |
| limit |  ``` Required ```  | Limit of how many threads will be showed at one page |
| threadType |  ``` Required ```  | Request all threads or only threads with  unanswered message {new,all} |



#### Example Usage

```python
page = 73
limit = 73
thread_type = 'threadType'

result = messaging_controller.getmessagethreads(page, limit, thread_type)

```


### <a name="postnewmessageforspecificthread"></a>![Method: ](https://apidocs.io/img/method.png ".MessagingController.postnewmessageforspecificthread") postnewmessageforspecificthread

> This function will allow PM to post new messages in already existing threads.

```python
def postnewmessageforspecificthread(self,
                                        content_type,
                                        body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PostnewmessageforspecificthreadRequest()

result = messaging_controller.postnewmessageforspecificthread(content_type, body)

```


### <a name="getmessagelistforspecificthread"></a>![Method: ](https://apidocs.io/img/method.png ".MessagingController.getmessagelistforspecificthread") getmessagelistforspecificthread

> This function allows the logged in user to get a list of all messages from passed thread Id. You need to use PM credentials.
> 
> 

```python
def getmessagelistforspecificthread(self,
                                        thread_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| threadId |  ``` Required ```  | ID of the thread |



#### Example Usage

```python
thread_id = 'threadId'

result = messaging_controller.getmessagelistforspecificthread(thread_id)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="property_managers_controller"></a>![Class: ](https://apidocs.io/img/class.png ".PropertyManagersController") PropertyManagersController

### Get controller instance

An instance of the ``` PropertyManagersController ``` class can be accessed from the API Client.

```python
 property_managers_controller = client.property_managers
```

### <a name="get_p_mslist"></a>![Method: ](https://apidocs.io/img/method.png ".PropertyManagersController.get_p_mslist") get_p_mslist

> This API call will return a list of property managers (PM) that have been created in the BookingPal platform that is associated with your PMS.
> In all requests in this API section, you need to use your PMS credentials.

```python
def get_p_mslist(self)
```

#### Example Usage

```python

result = property_managers_controller.get_p_mslist()

```


### <a name="update_property_managerdetails"></a>![Method: ](https://apidocs.io/img/method.png ".PropertyManagersController.update_property_managerdetails") update_property_managerdetails

> This function will update a property manager’s details. In case of an update you do not need to pass all information, but if you have values in one section - all fields inside are mandatory.

```python
def update_property_managerdetails(self,
                                       content_type,
                                       body,
                                       id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |
| id |  ``` Required ```  | Property Manager ID |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreatenewUpdatePropertyManagerRequest()
id = 'id'

result = property_managers_controller.update_property_managerdetails(content_type, body, id)

```


### <a name="createnew_property_manager"></a>![Method: ](https://apidocs.io/img/method.png ".PropertyManagersController.createnew_property_manager") createnew_property_manager

> This API call will allow the PMS to pass all data to BookingPal that is required for registering a new PM (Property Manager). All fields are mandatory - PMS must pass this data in order for a PM account to be created. You need to use PMS credentials for this request.

```python
def createnew_property_manager(self,
                                   content_type,
                                   body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreatenewUpdatePropertyManagerRequest()

result = property_managers_controller.createnew_property_manager(content_type, body)

```


### <a name="get_property_managerdetaildata"></a>![Method: ](https://apidocs.io/img/method.png ".PropertyManagersController.get_property_managerdetaildata") get_property_managerdetaildata

> This function will return a property manager’s details that belong to the current user. You need to use your PMS API credentials. 
> 
> Request Body parameters are the same as for creating PM.
> 
> Response is the same as in creating a Property Manager function. Here you do not need to pass all root level fields, but if some are used - all fields inside are mandatory:
> - in CompanyDetails Model you can pass any field, and none of them is mandatory
> - in Policies Model - you can pass any field,  and none of them is mandatory
> - if you do use PaymentPolicy - all fields inside are mandatory
> - if you do use CancellationPolicy - all fields inside are mandatory
> - if you use Payment Model - all fields inside are mandatory

```python
def get_property_managerdetaildata(self,
                                       content_type,
                                       id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| id |  ``` Required ```  | Property Manager ID |



#### Example Usage

```python
content_type = 'Content-Type'
id = 'id'

result = property_managers_controller.get_property_managerdetaildata(content_type, id)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="request_to_book_controller"></a>![Class: ](https://apidocs.io/img/class.png ".RequestToBookController") RequestToBookController

### Get controller instance

An instance of the ``` RequestToBookController ``` class can be accessed from the API Client.

```python
 request_to_book_controller = client.request_to_book
```

### <a name="create_requestto_book_test"></a>![Method: ](https://apidocs.io/img/method.png ".RequestToBookController.create_requestto_book_test") create_requestto_book_test

> Since you can not get the request to book on our test environment (since this first needs to be created on the channel) We provide the possibility for PMS to test this request with some random filled data in our system. So when you call this API function - we will send you push notification for the request to book for a provided property ID.

```python
def create_requestto_book_test(self,
                                   body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
body = RequesttoBookTestRequest()

result = request_to_book_controller.create_requestto_book_test(body)

```


### <a name="create_requestto_book_answerfrom_pms"></a>![Method: ](https://apidocs.io/img/method.png ".RequestToBookController.create_requestto_book_answerfrom_pms") create_requestto_book_answerfrom_pms

> This is an API call which you should use for accepting on avoiding requests to book.

```python
def create_requestto_book_answerfrom_pms(self,
                                             content_type,
                                             body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = RequesttoBookAnswerfromPMSRequest()

result = request_to_book_controller.create_requestto_book_answerfrom_pms(content_type, body)

```


### <a name="create_requestto_book_request"></a>![Method: ](https://apidocs.io/img/method.png ".RequestToBookController.create_requestto_book_request") create_requestto_book_request

> *Tags:*  ``` Skips Authentication ``` 

> This will be a request which we will send to PMS when we get a request to book from the channel.
> So when BookingPal gets a new request to book request - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section - "requestToBook"). 
> 
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.

```python
def create_requestto_book_request(self,
                                      body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
body = RequestToBookRequestModel()

result = request_to_book_controller.create_requestto_book_request(body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="images_controller"></a>![Class: ](https://apidocs.io/img/class.png ".ImagesController") ImagesController

### Get controller instance

An instance of the ``` ImagesController ``` class can be accessed from the API Client.

```python
 images_controller = client.images
```

### <a name="createimages"></a>![Method: ](https://apidocs.io/img/method.png ".ImagesController.createimages") createimages

> This function allows the logged in user to upload images for the existing product. Every new image will be sorted to the end. The first image sent will be used as the “Main Image”. (Image re-ordering can also be done within the BookingPal platform manually by users)

```python
def createimages(self,
                     content_type,
                     body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateimagesRequest()

result = images_controller.createimages(content_type, body)

```


### <a name="getimagelistbyproduct_id"></a>![Method: ](https://apidocs.io/img/method.png ".ImagesController.getimagelistbyproduct_id") getimagelistbyproduct_id

> This function allows logged in user to get image list for the existing product

```python
def getimagelistbyproduct_id(self,
                                 product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | ID of the property |



#### Example Usage

```python
product_id = 'productId'

result = images_controller.getimagelistbyproduct_id(product_id)

```


### <a name="deleteallimagesperproperty"></a>![Method: ](https://apidocs.io/img/method.png ".ImagesController.deleteallimagesperproperty") deleteallimagesperproperty

> This function allows logged in user to delete images.

```python
def deleteallimagesperproperty(self,
                                   content_type,
                                   product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| productId |  ``` Required ```  | ID of property for which you want to delete all images |



#### Example Usage

```python
content_type = 'Content-Type'
product_id = 'productId'

result = images_controller.deleteallimagesperproperty(content_type, product_id)

```


### <a name="deletelistofimages"></a>![Method: ](https://apidocs.io/img/method.png ".ImagesController.deletelistofimages") deletelistofimages

> This function allows the logged in user to delete image(s) from the existing product.

```python
def deletelistofimages(self,
                           content_type,
                           body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = DeletelistofimagesRequest()

result = images_controller.deletelistofimages(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="fee_and_tax_mandatory_at_the_property_level_controller"></a>![Class: ](https://apidocs.io/img/class.png ".FeeAndTaxMandatoryAtThePropertyLevelController") FeeAndTaxMandatoryAtThePropertyLevelController

### Get controller instance

An instance of the ``` FeeAndTaxMandatoryAtThePropertyLevelController ``` class can be accessed from the API Client.

```python
 fee_and_tax_mandatory_at_the_property_level_controller = client.fee_and_tax_mandatory_at_the_property_level
```

### <a name="getfeeandtaxmandatory"></a>![Method: ](https://apidocs.io/img/method.png ".FeeAndTaxMandatoryAtThePropertyLevelController.getfeeandtaxmandatory") getfeeandtaxmandatory

> This function allows the logged in user to get info about current set for all PM properties are fees/taxes set to be mandatory or not.
> 
> 

```python
def getfeeandtaxmandatory(self)
```

#### Example Usage

```python

result = fee_and_tax_mandatory_at_the_property_level_controller.getfeeandtaxmandatory()

```


### <a name="create_importorupdatefeeandtaxmandatory"></a>![Method: ](https://apidocs.io/img/method.png ".FeeAndTaxMandatoryAtThePropertyLevelController.create_importorupdatefeeandtaxmandatory") create_importorupdatefeeandtaxmandatory

> This function allows the logged in user to import or update a fee and tax mandatory.

```python
def create_importorupdatefeeandtaxmandatory(self,
                                                content_type,
                                                body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = SetfeeandtaxvalidationsettingRequest()

result = fee_and_tax_mandatory_at_the_property_level_controller.create_importorupdatefeeandtaxmandatory(content_type, body)

```


### <a name="create_remove_validation_settings"></a>![Method: ](https://apidocs.io/img/method.png ".FeeAndTaxMandatoryAtThePropertyLevelController.create_remove_validation_settings") create_remove_validation_settings

> This function allows the logged in user to remove any setup on property level and to return on default (which is that fee/taxes are mandatory). This API call will accept a list of properties.
> 
> 

```python
def create_remove_validation_settings(self,
                                          content_type,
                                          body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PropertyListRequest()

result = fee_and_tax_mandatory_at_the_property_level_controller.create_remove_validation_settings(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="yields_controller"></a>![Class: ](https://apidocs.io/img/class.png ".YieldsController") YieldsController

### Get controller instance

An instance of the ``` YieldsController ``` class can be accessed from the API Client.

```python
 yields_controller = client.yields
```

### <a name="get_ym_rlistbyproduct_id"></a>![Method: ](https://apidocs.io/img/method.png ".YieldsController.get_ym_rlistbyproduct_id") get_ym_rlistbyproduct_id

> This function allows the logged in user to get yield management rules list of the specific product.
> 
> 

```python
def get_ym_rlistbyproduct_id(self,
                                 product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | ID of the property |



#### Example Usage

```python
product_id = 'productId'

result = yields_controller.get_ym_rlistbyproduct_id(product_id)

```


### <a name="create_ymr"></a>![Method: ](https://apidocs.io/img/method.png ".YieldsController.create_ymr") create_ymr

> This function allows the logged-in user to add yield management rules for the specific product. Yield management rules can affect the final price of the property depending on some special conditions (like the length of stay, early booking, etc.). These rules automate price manipulations, on an inquiry by inquiry basis. When set criteria are met, they help maximize revenue and occupancy.
> 
> How is the price calculated?
> The price for a night is calculated based on the basic price and the yield management rules.
> 
> - If no YMR:
> {basic price per night} = price per night
> - If YMR is set it can Increase/decrease percent or increase/decrease amount:
> 	{basic price per night} + {yield amount} = {price per night}
> 	or
> 	{basic price per night} - {yield amount} = {price per night}
> 
> The below examples will use the scenario to walk you step by step and explain how the price is calculated based on different YMRs. 
> Let’s say that the basic price per night for 2016 is 100 USD.
> 
> This function is used also for updating yield. So if you already create a specific yield for some date - and you send a new one - we will update the yield for this date.
> If you need to delete a specific yield type - you can send an empty list for that type.
> 
> Important: The maximum allowed end date is 3 years in the future.

```python
def create_ymr(self,
                   content_type,
                   body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateYieldRequest()

result = yields_controller.create_ymr(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="fee_and_tax_controller"></a>![Class: ](https://apidocs.io/img/class.png ".FeeAndTaxController") FeeAndTaxController

### Get controller instance

An instance of the ``` FeeAndTaxController ``` class can be accessed from the API Client.

```python
 fee_and_tax_controller = client.fee_and_tax
```

### <a name="getfeeandtaxlistbyproduct_id"></a>![Method: ](https://apidocs.io/img/method.png ".FeeAndTaxController.getfeeandtaxlistbyproduct_id") getfeeandtaxlistbyproduct_id

> This function allows the logged in user to get a fee list for the specific product.

```python
def getfeeandtaxlistbyproduct_id(self,
                                     product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | ID of the property |



#### Example Usage

```python
product_id = 'productId'

result = fee_and_tax_controller.getfeeandtaxlistbyproduct_id(product_id)

```


### <a name="createfeeandtax"></a>![Method: ](https://apidocs.io/img/method.png ".FeeAndTaxController.createfeeandtax") createfeeandtax

> This function allows the logged in user to set fees (i.e. cleaning fee, damage waiver, extra bed, extra person etc.) and taxes for the specific product. Here, you always need to send all fees and taxes for one property. All fees or taxes which were in our system for that property and which are not in the new request will be deleted. Taxes in the BookingPal system will always have percent value. 
> 
> If you want to delete all fees and/or taxes for one property (if you do not have fees and taxes in your system for one property) send an empty list of fees and.or taxes. In short when you use this request you need to always send us a full list of fees and taxes per property, since we will do a full update.

```python
def createfeeandtax(self,
                        content_type,
                        body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreatefeeandtaxRequest()

result = fee_and_tax_controller.createfeeandtax(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="validation_controller"></a>![Class: ](https://apidocs.io/img/class.png ".ValidationController") ValidationController

### Get controller instance

An instance of the ``` ValidationController ``` class can be accessed from the API Client.

```python
 validation_controller = client.validation
```

### <a name="get_booking_pal_validationjob_full_pm"></a>![Method: ](https://apidocs.io/img/method.png ".ValidationController.get_booking_pal_validationjob_full_pm") get_booking_pal_validationjob_full_pm

> This function will allow the PMC to call the BookingPal property validation job for all properties identified which belong to the current user. Authorization token should be on PM level. 
> Also we will run validation only for properties which are activated. If you deactivate property - we will not validate this property.
> 
> After the request you will get a response indicating if messages were processed or not. If the request is good your request for the validator job will be put into a queue. Once the request is processed, BookingPal will send an async push message per property informing the user if a property is valid or not, and if it is not valid - with reasons why the validation failed. This message will be sent on the endpoint which was entered in section Push Notifications, field asyncPush.
> 
> Note: If the property is distributed already on some channel - this property will not be moved to an Incomplete state. Also if you have property on Incomplete state because of some reason, and you update this data which causes that property is on ‘Incomplete’ property will not be moved automatically to a valid state. Instead, you should run a Validation job manually for that property or wait for our automatic validation job which we are running once per day. 
> 
> To make the property ready for Onboarding you should run validation first. if the property is valid - it will be ready for onboarding. Otherwise - the property will be in Incomplete state. Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.

```python
def get_booking_pal_validationjob_full_pm(self)
```

#### Example Usage

```python

result = validation_controller.get_booking_pal_validationjob_full_pm()

```


### <a name="create_booking_pal_validationjob_listofproperties"></a>![Method: ](https://apidocs.io/img/method.png ".ValidationController.create_booking_pal_validationjob_listofproperties") create_booking_pal_validationjob_listofproperties

> This function will allow the PMS to call the BookingPal property validation job for a list of properties from request. These properties must belong to the current user and authorization token should be on PM level.
> Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.

```python
def create_booking_pal_validationjob_listofproperties(self,
                                                          content_type,
                                                          body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = ValidationforListofpropertiesRequest()

result = validation_controller.create_booking_pal_validationjob_listofproperties(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="push_notification_controller"></a>![Class: ](https://apidocs.io/img/class.png ".PushNotificationController") PushNotificationController

### Get controller instance

An instance of the ``` PushNotificationController ``` class can be accessed from the API Client.

```python
 push_notification_controller = client.push_notification
```

### <a name="get_notification_links"></a>![Method: ](https://apidocs.io/img/method.png ".PushNotificationController.get_notification_links") get_notification_links

> This will return all notification URLs which are set. It will work on PMS level, so use PMS credentials.
> 
> 

```python
def get_notification_links(self)
```

#### Example Usage

```python

result = push_notification_controller.get_notification_links()

```


### <a name="create_push_notification_links"></a>![Method: ](https://apidocs.io/img/method.png ".PushNotificationController.create_push_notification_links") create_push_notification_links

> Provide the links on which the requests about new reservation and cancel reservation will be sent. Links should be https.
> 
> These links should be set on PMS level, so please use your PMS credentials. 
> 
> 

```python
def create_push_notification_links(self,
                                       content_type,
                                       body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = PushNotificationLinksRequest()

result = push_notification_controller.create_push_notification_links(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="rates_and_availability_controller"></a>![Class: ](https://apidocs.io/img/class.png ".RatesAndAvailabilityController") RatesAndAvailabilityController

### Get controller instance

An instance of the ``` RatesAndAvailabilityController ``` class can be accessed from the API Client.

```python
 rates_and_availability_controller = client.rates_and_availability
```

### <a name="getratesandavailabilityproduct_id"></a>![Method: ](https://apidocs.io/img/method.png ".RatesAndAvailabilityController.getratesandavailabilityproduct_id") getratesandavailabilityproduct_id

> This function allows logged in users to get rates and availability for the specific product.
> Every API call in this section should be with PM credentials.

```python
def getratesandavailabilityproduct_id(self,
                                          content_type,
                                          product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| productId |  ``` Required ```  | ID of the property |



#### Example Usage

```python
content_type = 'Content-Type'
product_id = 'productId'

result = rates_and_availability_controller.getratesandavailabilityproduct_id(content_type, product_id)

```


### <a name="createandupdateratesandavailability"></a>![Method: ](https://apidocs.io/img/method.png ".RatesAndAvailabilityController.createandupdateratesandavailability") createandupdateratesandavailability

> Create and update calls are the same. When data is sent, if the data already exists in BookingPal - that data will be updated. Otherwise it will be created (inserted). If you want to update data for some period, you should just send data for these dates. All other data (for other dates) will remain untouched. This allows you to update only changed periods and we will not delete previously sent data for other periods.
> 
> In the case of a first data push, all data for one property should be sent in one request.  When making updates or changes to existing data, then all changed data should be sent in one request.
> 
> Note: if property is set to use LOS rates (supportedLosRates) - only field leadTime, array availableCount and availability can be updated in this API call (for MLT property). For SGL property only leadTime and availability can be updated. This API call can not be used for OWN properties.
> Important: Maximum allowed end date in any data type is 3 years in future.
> 
> Every API call in this section should be with PM credentials.

```python
def createandupdateratesandavailability(self,
                                            content_type,
                                            body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| contentType |  ``` Required ```  | TODO: Add a parameter description |
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
content_type = 'Content-Type'
body = CreateandupdateratesandavailabilityRequest()

result = rates_and_availability_controller.createandupdateratesandavailability(content_type, body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="reservation_notifications_controller"></a>![Class: ](https://apidocs.io/img/class.png ".ReservationNotificationsController") ReservationNotificationsController

### Get controller instance

An instance of the ``` ReservationNotificationsController ``` class can be accessed from the API Client.

```python
 reservation_notifications_controller = client.reservation_notifications
```

### <a name="get_reservationby_product"></a>![Method: ](https://apidocs.io/img/method.png ".ReservationNotificationsController.get_reservationby_product") get_reservationby_product

> This function allows logged-in users to get all reservations for the specific product.

```python
def get_reservationby_product(self,
                                  product_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| productId |  ``` Required ```  | Product ID |



#### Example Usage

```python
product_id = 'productId'

result = reservation_notifications_controller.get_reservationby_product(product_id)

```


### <a name="get_reservationby_pm"></a>![Method: ](https://apidocs.io/img/method.png ".ReservationNotificationsController.get_reservationby_pm") get_reservationby_pm

> This API call will return a list of reservations that belong to the current user.

```python
def get_reservationby_pm(self)
```

#### Example Usage

```python

result = reservation_notifications_controller.get_reservationby_pm()

```


[Back to List of Controllers](#list_of_controllers)

## <a name="testing_of_message_api_calls_controller"></a>![Class: ](https://apidocs.io/img/class.png ".TestingOfMessageAPICallsController") TestingOfMessageAPICallsController

### Get controller instance

An instance of the ``` TestingOfMessageAPICallsController ``` class can be accessed from the API Client.

```python
 testing_of_message_api_calls_controller = client.testing_of_message_api_calls
```

### <a name="get_testmessagelistforspecificthread"></a>![Method: ](https://apidocs.io/img/method.png ".TestingOfMessageAPICallsController.get_testmessagelistforspecificthread") get_testmessagelistforspecificthread

> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
> 
> This function allows the logged-in user to get a list of all messages from passed thread Id. You need to use PM credentials
> 
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.

```python
def get_testmessagelistforspecificthread(self,
                                             thread_id)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| threadId |  ``` Required ```  | ID of thread |



#### Example Usage

```python
thread_id = 'threadId'

result = testing_of_message_api_calls_controller.get_testmessagelistforspecificthread(thread_id)

```


### <a name="get_testmessagethreads"></a>![Method: ](https://apidocs.io/img/method.png ".TestingOfMessageAPICallsController.get_testmessagethreads") get_testmessagethreads

> This function allows the logged in user to get all message threads or message threads with an unresponded message from guest for the whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return the first page and 10 threads per page.
> 
> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes we’ve  built an additional endpoint with the same API calls where you will be able to test these calls.
> 
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.

```python
def get_testmessagethreads(self,
                               page,
                               limit,
                               thread_type)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| page |  ``` Required ```  | TODO: Add a parameter description |
| limit |  ``` Required ```  | TODO: Add a parameter description |
| threadType |  ``` Required ```  | Request all threads or only threads with unanswered message {new,all} |



#### Example Usage

```python
page = 237
limit = 237
thread_type = 'threadType'

result = testing_of_message_api_calls_controller.get_testmessagethreads(page, limit, thread_type)

```


### <a name="postnew_testmessageforspecificthread"></a>![Method: ](https://apidocs.io/img/method.png ".TestingOfMessageAPICallsController.postnew_testmessageforspecificthread") postnew_testmessageforspecificthread

> This function will allow PM to post new messages in already existing threads. Since this call is only for testing - we will not actually save these passed values.
> 
> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
> 
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return to you messages for 1 property from your PM.

```python
def postnew_testmessageforspecificthread(self,
                                             body)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| body |  ``` Required ```  | TODO: Add a parameter description |



#### Example Usage

```python
body = PostnewmessageforspecificthreadRequest()

result = testing_of_message_api_calls_controller.postnew_testmessageforspecificthread(body)

```


[Back to List of Controllers](#list_of_controllers)

## <a name="authorization_controller"></a>![Class: ](https://apidocs.io/img/class.png ".AuthorizationController") AuthorizationController

### Get controller instance

An instance of the ``` AuthorizationController ``` class can be accessed from the API Client.

```python
 authorization_controller = client.authorization
```

### <a name="get_login"></a>![Method: ](https://apidocs.io/img/method.png ".AuthorizationController.get_login") get_login

> *Tags:*  ``` Skips Authentication ``` 

> In order to begin utilizing the platform APIs, your application must be authenticated and authorized to access domain resources. Follow the URL with your credentials and obtain an authorization token which is used in every request.
> You will have 2 types of tokens. One is on the PMS level, and this one should be used when you send requests related to PMS/PM data. For managing properties, you will need a token on PM level, with PM credentials. For every API call it will be noted which API credentials you should use.

```python
def get_login(self,
                  username,
                  password)
```

#### Parameters

| Parameter | Tags | Description |
|-----------|------|-------------|
| username |  ``` Required ```  | Your account email address (for PMS or PM) |
| password |  ``` Required ```  | Your password |



#### Example Usage

```python
username = 'username'
password = 'password'

result = authorization_controller.get_login(username, password)

```


[Back to List of Controllers](#list_of_controllers)