# Create / Update Property Settings

This endpoint allows partners to create and update property settings for their accommodations on the Booking.com platform. It provides a comprehensive set of configurable options, including payment policies, guest requirements, and property rules, enabling partners to tailor their offerings effectively to meet their business needs.

***

### <mark style="color:yellow;">Endpoint</mark>

<mark style="color:green;background-color:green;">**`POST`**</mark>&#x20;

<div align="left"><figure><img src="https://958347541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9bn2UcBkeqtqixkl5eF%2Fuploads%2FpsybX0n39kUB8Z8WOk4X%2FSandbox%20image.png?alt=media&#x26;token=4ae73d0f-0d1a-4d73-a4e2-673dbc081d6a" alt="" width="56"><figcaption></figcaption></figure></div>

{% code overflow="wrap" %}
```url
https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/property/settings/set
```
{% endcode %}

#### <mark style="color:yellow;">Header</mark>

```xml
-app-id: YOUR_APP_ID
Authorization: YOUR_API_KEY
Content-Type:application/json
```

<table><thead><tr><th width="185">Header</th><th width="85">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>app-id</code></td><td>string</td><td>Yes</td><td>Your application ID. Required for authentication.</td></tr><tr><td><code>Authorization</code></td><td>string</td><td>Yes</td><td>Your API key for authorization. </td></tr><tr><td><code>Content-Type</code></td><td>string</td><td>Yes</td><td>Must be set to <code>application/json</code>.</td></tr></tbody></table>

***

<mark style="color:yellow;">**Attributes**</mark>

`hotel_id` <mark style="color:orange;">**string (Required)**</mark>

The unique property ID as assigned by the provider upon creation of the property.

***

`channel_hotel_id` <mark style="color:orange;">**string (Required)**</mark>

The unique id for the hotel on the specific channel.

***

`property_settings` <mark style="color:purple;">**object (Optional)**</mark>

Contains multiple various settings related to the property.

`require_cvc` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the guest needs to provide CVC details for the booking.

{% hint style="info" %}
Default: false
{% endhint %}

`view_cc_details` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether a trusted property can view the guest's credit card details on Extranet.

{% hint style="info" %}
Default: false
{% endhint %}

***

`curfew` <mark style="color:purple;">**object (Optional)**</mark>

Contains curfew settings for the property.

{% hint style="info" %}
Curfew start and end cannot be overlapped with property check-in and check-out times.
{% endhint %}

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property has curfew time enabled.

`start` <mark style="color:orange;">**boolean (Optional)**</mark>

Time when curfew starts. Accepts the format: `HH:MM`.&#x20;

{% hint style="info" %}
Required if `enabled=true`.
{% endhint %}

`end` <mark style="color:orange;">**string (Optional)**</mark>

Time when curfew ends. Accepts the format: `HH:MM`.&#x20;

{% hint style="info" %}
Required if `enabled=true`.
{% endhint %}

***

`require_booker_address` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the guests must provide a contact address.

{% hint style="info" %}
Default: false
{% endhint %}

***

`require_booker_phone_number` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the guests must provide a contact telephone number.

{% hint style="info" %}
Default: false
{% endhint %}

***

`age_restriction` <mark style="color:purple;">**object (Optional)**</mark>

Contains whether there is an age limit to check-in.

***

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specify whether age restriction is enabled

***

`min` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies the minimum allowed age for guests to check-in. Allowed age range: 18-99.&#x20;

{% hint style="info" %}
Required if `enabled=true.`
{% endhint %}

***

`max` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies the maximum allowed age for guests to check-in. Allowed age range: 18-99.&#x20;

{% hint style="info" %}
Required if `enabled=true.`
{% endhint %}

***

`auto_replenish` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies if property is enabled to auto-replenish and is used to make a room available to sell again after a cancellation.

{% hint style="info" %}
Default: true
{% endhint %}

***

`replenish_closed_rooms` <mark style="color:orange;">**boolean (Optional)**</mark>

Reopen closed rooms after a cancellation. This will open a closed room after a cancellation is received.

{% hint style="info" %}
Default: true.&#x20;

This option will only work if `auto_replenish=true`.
{% endhint %}

***

`long_stay` <mark style="color:purple;">**object (Optional)**</mark>

Contains whether property accepts a stay longer than 30 nights.

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property has a long stay option enabled.

`max_length_of_stay` <mark style="color:orange;">**integer (Optional)**</mark>

Specifies the maximum number of days allowed to stay at the property.&#x20;

{% hint style="info" %}
Default: `90` (If long stay option is enabled.)

Possible values are:&#x20;

* `45`
* `60`
* `75`
* `90`
{% endhint %}

***

`pricing_type` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies the property's pricing type.&#x20;

{% hint style="info" %}
Default: `Standard`

Possible values are:&#x20;

* `Standard`
* `OBP`

In case of `pricing_type` = `OBP,` see [Create / Update Property Settings - Specific Settings](broken-reference).
{% endhint %}

***

`allow_smoking` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the property allows smoking.

{% hint style="info" %}
Default: `true`
{% endhint %}

***

`pets` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to pets policy.



`pets_allowed` <mark style="color:orange;">**enum (Required)**</mark>

Specifies whether pets are allowed at the property.&#x20;

{% hint style="info" %}
Possible values are:

* `PETS_ALLOWED`
* `PETS_NOT_ALLOWED`
* `PETS_ALLOWED_ON_REQUEST`
{% endhint %}

`pets_price_type` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies pets price type option for the property.&#x20;

{% hint style="info" %}
Possible values are:

* `FREE`
* `CHARGES_MAY_APPLY`
{% endhint %}

***

`damage_policy` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to damage policy.



`amount` <mark style="color:orange;">**double (Required)**</mark>

Specifies the amount on which the damage deposit or programme is applicable for.

{% hint style="info" %}
Default: `0.0`
{% endhint %}

`currency` <mark style="color:orange;">**string (Optional)**</mark>

Specifies the currency in which the claim and limit occurs.

{% hint style="info" %}
Default is Property Currency if not specified.
{% endhint %}

`policy_type` <mark style="color:orange;">**enum (Required)**</mark>

Specifies the policy that is applicable.&#x20;

{% hint style="info" %}
Default: `NONE`

Possible values are:

* `HANDLED_BY_PROPERTY`- Guests pay you a damage deposit directly.
* `HANDLED_BY_BOOKING_COM`- Guests only pay if they cause damage during their stay, facilitated by Booking.com
* `NONE`
{% endhint %}

`damage_programme_terms_agreed` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies if you agree to the terms for the damage programme.&#x20;

{% hint style="info" %}
Default: `false`



Required if you are applying for`HANDLED_BY_BOOKING_COM`.&#x20;



The value of this parameter is determined by the terms of the damage programme, which can be retrieved through the [Retrieve Property Settings Damage Programme](broken-reference) endpoint.

* Set to `true` if you agree to the terms.
* Set to `false` if you do not agree to the terms.



You can only enroll if you agree to the terms which are provided to you.
{% endhint %}

`collection_mode` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies how you would collect damage deposit.&#x20;

{% hint style="info" %}
Only applicable for`HANDLED_BY_PROPERTY.`

Possible values are:&#x20;

* `CASH`
* `CREDIT_CARD`
* `PAYPAL`
* `BANK_TRANSFER`
* `OTHER`
{% endhint %}

`collection_when` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies when you would collect the damage deposit.&#x20;

{% hint style="info" %}
Only applicable for `HANDLED_BY_PROPERTY`.&#x20;

If `collection_mode` is `CASH` then only `ON_ARRIVAL` is allowed for `collection_when.`

Possible values are:&#x20;

* `ON_ARRIVAL`
* `SEVEN_DAYS_BEFORE_ARRIVAL`
* `FOURTEEN_DAYS_BEFORE_ARRIVAL`
{% endhint %}

`return_mode` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies how you would return the damage deposit.&#x20;

{% hint style="info" %}
Only applicable for `HANDLED_BY_PROPERTY`.

Possible values are:&#x20;

* `CASH`
* `CREDIT_CARD`
* `PAYPAL`
* `BANK_TRANSFER`
* `OTHER`
{% endhint %}

`return_when` <mark style="color:orange;">**enum (Optional)**</mark>

Specifies when you would return the damage deposit.&#x20;

{% hint style="info" %}
Only applicable for `HANDLED_BY_PROPERTY`.&#x20;

If `return_mode` is `CASH` then only `ON_CHECKOUT` is allowed for `return_when`.

Possible values are:

* `ON_CHECKOUT`
* `WITHIN_7_DAYS`
* `WITHIN_14_DAYS`
{% endhint %}

***

`standard_phrases` <mark style="color:orange;">**array of objects (Optional)**</mark>

Contains settings related to standard phrases. You can send 1 or multiple standard phrases that you want to enable or remove.

`name` <mark style="color:orange;">**enum (Required)**</mark>

Specifies the name of the standard phrase.

{% hint style="info" %}
Supported `standard_phrases_name` types:

* `GuestIdentification`
* `InformArrivalTime`
* `PayBeforeStay`
* `AccommodationTax`
* `TattooRestriction`
* `RequireInvoice`
* `EarlyDeparture`
* `PedestrianZoneOnly`
* `LimitedParking`
* `AccessByUnpavedRoad`
* `OnsiteFunctions`
* `NoHenStagParty`
* `ResidentialArea`
* `BusyArea`
* `HalfBoardNoDrinks`
* `NoPublicTransport`
* `WaterCrisis`
* `RussiaAntiHostelRegulations`
* `LongStayDisclaimerJapan`
* `GuestRentalAgreement`
* `GuestUnder18`
* `Covid19RestrictionOfGuests`
* `Covid19ExtraCleaning`
* `Covid19ReducedFoodServices`
* `Covid19OnlyEssentialTravellers`
* `Covid19ShuttleSuspended`
* `Covid19ReducedServices`
* `Covid19ReducedHoursOfService`
* `Covid19ExtraDocumentation`
* `Covid19ReducedFacilities`
* `Covid19PhysicalDistance`
* `Covid19LocalGuidelinesFollowed`
* `Covid19FaceMaskMandatory`
* `Covid19QuarantineNotAllowed`
* `Covid19NoChargePCRTest`
* `Covid19NoCostExtension`
* `Covid19MedicalMonitoring`
* `Covid19NegativeRequired`
* `Covid19AtChargePCRTest`
* `Covid19InsurancePCRTest`
* `Covid19VaccinationNegativeTestCheckIn`
* `Covid19VaccinationNegativeTestRecoveryCheckIn`
* `Covid19VaccinationRecoveryCheckIn`
* `Covid19NegativeTestRecoveryCheckIn`
* `Covid19VaccinationCheckIn`
* `Covid19RecoveryCheckIn`
* `Covid19ProofRequired`
* `IsraeliCitizensVat`
* `Covid19BodyTempCheck`
* `Covid19NoSelfQuarantine`
{% endhint %}



`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies if standard phrase should be enabled or removed.

***

`quiet_hours` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to quiet hours of the property.

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property has quiet hours enabled.

`start` <mark style="color:orange;">**string (Optional)**</mark>

Specifies the quiet hours start time.&#x20;

{% hint style="info" %}
Required if `enabled=true`

Accepts the format: HH:mm
{% endhint %}

`end` <mark style="color:orange;">**string (Optional)**</mark>

Specifies the quiet hours end time.&#x20;

{% hint style="info" %}
Required if `enabled=true`

Accepts the format: HH:mm
{% endhint %}

***

`renovation` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to renovation dates.

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether renovation dates are enabled.

`start` <mark style="color:orange;">**string (Optional)**</mark>

Specifies the renovation start date.&#x20;

{% hint style="info" %}
Required if `enabled=true`

Accepts the format: yyyy-mm-dd
{% endhint %}

`end` <mark style="color:orange;">**string (Optional)**</mark>

Specifies the renovation end date.&#x20;

{% hint style="info" %}
Required if `enabled=true`

Accepts the format: yyyy-mm-dd
{% endhint %}

***

`bed_linen_policy` <mark style="color:purple;">**object (Optional)**</mark>

Contains renting details for bed linens and towels as they are not included in the room rate. Guests can rent them at the property for an additional charge or bring their own.

`enabled` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the option to rent bed linen is enabled.

`amount` <mark style="color:orange;">**double (Optional)**</mark>

Specifies the cost of renting bed linens and towels specified in the property's default currency.

{% hint style="info" %}
Required if `enabled=true`
{% endhint %}

***

`accepted_payment_types` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to payment methods.

`codes` <mark style="color:orange;">**array of integers (Required)**</mark>

Specifies the list of supported payment methods. For a full list of payment codes, see [Booking.com Payment Type Codes](broken-reference).

***

`french_tax_details` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to tax details. Required for specified countries.

{% hint style="info" %}
Required to setup for properties located in the specified countries in order to go Open/Bookable.
{% endhint %}

`category_id`<mark style="color:orange;">**string (Optional)**</mark>

Contains a number - city tax category ID.

`nature_id` <mark style="color:orange;">**string (Optional)**</mark>

Contains a number - nature category ID.

`declare_revenue` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property declares revenues as professional for direct tax purposes.

`has_vat`<mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property has a registered VAT for this activity.

`registered_in_rcs` <mark style="color:orange;">**boolean (Required)**</mark>

Specifies whether the property is registered as a professional at the trade commercial register.

***

`cancellation_exceptions` <mark style="color:purple;">**object (Optional)**</mark>

Contains settings related to cancellation for non-refundable policy.

`grace_period` <mark style="color:purple;">**object (Optional)**</mark>

`enabled` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the property has a grace period enabled.

`after_booking` <mark style="color:orange;">**enum (Required)**</mark>

Amount of hours after booking when free cancellation is available.

{% hint style="info" %}
Possible values are:

* `HOUR_1`
* `HOURS_4`
* `HOURS_24`
{% endhint %}

***

`advance_cancellation` <mark style="color:purple;">**object (Optional)**</mark>

`enabled` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the property has an advance cancellation enabled.

`before_check_in` <mark style="color:orange;">**enum (Required)**</mark>

Advance cancellation - amount of weeks before check-in when free cancellation is available.

{% hint style="info" %}
Possible values are:&#x20;

* `WEEKS_4`
* `WEEKS_8`
* `WEEKS_12`
{% endhint %}

***

`age_buckets` <mark style="color:orange;">**array of objects (Optional)**</mark>

Contains age bucket details.

{% hint style="info" %}
No age bucket set up by default.&#x20;

You can create up to three age buckets per property.&#x20;

Each age bucket contains a minimum and maximum age, where the maximum age is inclusive.&#x20;

Age buckets can't overlap with each other.
{% endhint %}

`min_age` <mark style="color:orange;">**integer (Required)**</mark>

Specifies the minimum age for the age bucket.

`max_age` <mark style="color:orange;">**integer (Required)**</mark>

Specifies the maximum age for the age bucket.

***

`children_policies` <mark style="color:purple;">**object (Optional)**</mark>

Indicates whether a property accepts children.

`allow_children` <mark style="color:orange;">**boolean (Optional)**</mark>

Specifies whether the property admits adults and children, or only adults.

`min_age` <mark style="color:orange;">**integer (Optional)**</mark>

Specifies the minimum age of children allowed to stay at the property.

{% hint style="info" %}
Applies only when `allow_children = true`
{% endhint %}

***

`policy_rules` <mark style="color:orange;">**array of objects (Optional)**</mark>

You can specify different price and rules for children.

{% hint style="info" %}
Applies only when `allow_children = true`

Rules ages cannot be overlapped with other rules that have the same type.
{% endhint %}

`rule_type` <mark style="color:orange;">**enum (Required)**</mark>

Specifies the rule type for which this rule applies.

{% hint style="info" %}
Possible values are:

* `EXISTING_BED`
* `EXTRA_BED`
* `CRIB`
* `EXTRA_BED_FOR_ADULT`
{% endhint %}



`from_age` <mark style="color:orange;">**integer (Required)**</mark>

Specifies the minimum age for the children policy to apply.

`to_age` <mark style="color:orange;">**integer (Required)**</mark>

Specifies the maximum age for the children policy to apply.

`price_type` <mark style="color:orange;">**enum (Required)**</mark>

Specifies if the rule is FREE or has a FIXED price.

{% hint style="info" %}
Possible values are:

* FREE
* FIXED
* ADULT\_PERCENTAGE
{% endhint %}

`price_mode` <mark style="color:orange;">**enum (Required)**</mark>

Specifies the unit of time on which the charge is calculated.

{% hint style="info" %}
Possible values are:

* `PER_NIGHT`
* `PER_STAY`
{% endhint %}

`price` <mark style="color:orange;">**double (Optional)**</mark>

Specifies the amount charged in the country's local currency.

{% hint style="info" %}
Required if `price_type=FIXED`
{% endhint %}

***

`booking_model` <mark style="color:purple;">**object (Optional)**</mark>

Indicates that property can have request to book option.

`type` <mark style="color:orange;">**enum (Required)**</mark>

Specifies the booking model type of the property.&#x20;

{% hint style="info" %}
Default:`IB`.

Possible values: `RTB` and `IB`.
{% endhint %}

***

`invoice_settings` <mark style="color:purple;">**object (Optional)**</mark>

Details of the company that owns/manages the property.

{% hint style="info" %}
Invoice settings cannot be updated during the billing period from 1st to 7th day of the month.
{% endhint %}

`legal_name` <mark style="color:orange;">**string (Optional)**</mark>

Legal name of the company.

`country_code` <mark style="color:orange;">**string (Optional)**</mark>

Country Code. Should be valid ISO code.

{% hint style="info" %}
You need to setup if you want property to go Open/Bookable.
{% endhint %}

`city` <mark style="color:orange;">**string (Optional)**</mark>

City name.

{% hint style="info" %}
You need to setup if you want property to go Open/Bookable.
{% endhint %}

`postal_code` <mark style="color:orange;">**string (Optional)**</mark>

Postal/Zip code.

{% hint style="info" %}
You need to setup if you want property to go Open/Bookable and should have valid postal/zip code for the country code.
{% endhint %}

`state` <mark style="color:orange;">**string (Optional)**</mark>

State name.

`notification_channel` <mark style="color:orange;">**enum (Optional)**</mark>

The channel how company should be notified invoice related mails.

{% hint style="info" %}
Possible values are:&#x20;

* POSTAL\_MAIL
* EMAIL
{% endhint %}

`contact_person` <mark style="color:orange;">**string (Optional)**</mark>

Full name of the contact person.

{% hint style="info" %}
You need to setup if you want property to go Open/Bookable.
{% endhint %}

`address` <mark style="color:orange;">**string (Optional)**</mark>

Company address.

{% hint style="info" %}
You need to setup if you want property to go Open/Bookable.
{% endhint %}

***

`brazil_tax_details` <mark style="color:purple;">**object (Optional)**</mark>

Indicates additional settings for Brazilian properties.

{% hint style="info" %}
You need to setup brazil tax details if you want property in Brazil to go Open/Bookable.
{% endhint %}

`tax_payer_number_type` <mark style="color:orange;">**string (Optional)**</mark>

Specifies whether the identifying number belongs to a company or a private individual.

`tax_payer_number` <mark style="color:orange;">**string (Optional)**</mark>

The identifying number. CNPJ = 14 digits. CPF = 11 digits.

`city_hall_id` <mark style="color:orange;">**string (Optional)**</mark>

The 8-digit ID for the city hall which issued the CNPJ or CPF number.

`email` <mark style="color:orange;">**string (Optional)**</mark>

Email address of invoice recipient.

***

## <mark style="color:yellow;">**Sample Request**</mark>

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "property_settings": {
       "require_cvc": true,
       "view_cc_details": true,
       "curfew": {
           "enabled": true,
           "start": "18:00",
           "end": "09:00"
       },
       "require_booker_address": true,
       "require_booker_phone_number": true,
       "age_restriction": {
           "enabled": true,
           "min": 18,
           "max": 99
       },
       "auto_replenish": true,
       "replenish_closed_rooms": true,
       "long_stay": {
           "enabled": true,
           "max_length_of_stay": 45
       },
       "pricing_type": "Standard",
       "allow_smoking": true
   },
   "pets": {
       "pets_allowed": "PETS_NOT_ALLOWED",
       "pets_price_type": "FREE"
   },
   "damage_policy": {
       "amount": 90,
       "currency": "INR",
       "policy_type": "HANDLED_BY_PROPERTY",
       "damage_programme_terms_agreed": true,
       "collection_mode": "CASH",
       "collection_when": "ON_ARRIVAL",
       "return_mode": "CASH",
       "return_when": "ON_CHECKOUT"
   },
   "standard_phrases": [
       {
           "name": "GuestIdentification",
           "enabled": true
       }
   ],
   "quiet_hours": {
       "enabled": true,
       "start": "18:00",
       "end": "08:30"
   },
   "renovation": {
       "enabled": true,
       "start": "2014-01-01",
       "end": "2014-01-10"
   },
   "bed_linen_policy": {
       "enabled": false,
       "amount": 100
   },
   "accepted_payment_types": {
       "codes": [
           1,
           2,
           55
       ]
   },
   "french_tax_details": {
       "category_id": "11",
       "nature_id": "1",
       "declare_revenue": true,
       "has_vat": true,
       "registered_in_rcs": true
   },
   "cancellation_exceptions": {
       "grace_period": {
           "enabled": true,
           "after_booking": "HOURS_4"
       },
       "advance_cancellation": {
           "enabled": true,
           "before_check_in": "WEEKS_4"
       }
   },
   "age_buckets": [
       {
           "min_age": 1,
           "max_age": 10
       }
   ],
   "children_policies": {
       "allow_children": true,
       "min_age": 0,
       "policy_rules": [
           {
               "rule_type": "EXISTING_BED",
               "from_age": 0,
               "to_age": 10,
               "price_type": "FIXED",
               "price_mode": "PER_STAY",
               "price": 0
           }
       ]
   },
   "booking_model": {
       "type": "IB"
   },
   "invoice_settings": {
       "legal_name": "string",
       "contact_person": "string",
       "address": "string",
       "country_code": "US",
       "city": "san francisco",
       "postal_code": "395001",
       "state": "st",
       "notification_channel": "POSTAL_MAIL",
       "brazil_tax_details": {
           "tax_payer_number_type": "CNPJ",
           "tax_payer_number": "11",
           "city_hall_id": "12345678",
           "email": "vishal@gmail.com"
       }
   }
}
```

***

## <mark style="color:yellow;">Sample Examples for Setting up Policies</mark>

#### 1. **Age Restriction Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "property_settings": {
       "age_restriction": {
           "enabled": true,
           "min": 18,
           "max": 99
       }
   }
}
```

#### 2. **Auto Replenish Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "property_settings": {
       "auto_replenish": true,
       "replenish_closed_rooms": true
   }
}
```

#### 3. **Pets Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "pets": {
       "pets_allowed": "PETS_NOT_ALLOWED",
       "pets_price_type": "FREE"
   }
}
```

#### 4. **Damage Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "damage_policy": {
       "amount": 90,
       "currency": "INR",
       "policy_type": "HANDLED_BY_PROPERTY",
       "damage_programme_terms_agreed": true,
       "collection_mode": "CASH",
       "collection_when": "ON_ARRIVAL",
       "return_mode": "CASH",
       "return_when": "ON_CHECKOUT"
   }
}
```

#### 5. **Standard Phrases**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "standard_phrases": [
       {
           "name": "GuestIdentification",
           "enabled": true
       }
   ]
}
```

#### 6. **Quiet Hours Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "quiet_hours": {
       "enabled": true,
       "start": "18:00",
       "end": "08:30"
   }
}
```

#### 7. **Renovation Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "renovation": {
       "enabled": true,
       "start": "2014-01-01",
       "end": "2014-01-10"
   }
}
```

#### 8. **Bed Linen Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "bed_linen_policy": {
       "enabled": false,
       "amount": 100
   }
}
```

#### 9. **Accepted Payment Types Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "accepted_payment_types": {
       "codes": [1, 2, 55]
   }
}
```

#### 10. **French Tax Details Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "french_tax_details": {
       "category_id": "11",
       "nature_id": "1",
       "declare_revenue": true,
       "has_vat": true,
       "registered_in_rcs": true
   }
}
```

#### 11. **Cancellation Exceptions Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "cancellation_exceptions": {
       "grace_period": {
           "enabled": true,
           "after_booking": "HOURS_4"
       },
       "advance_cancellation": {
           "enabled": true,
           "before_check_in": "WEEKS_4"
       }
   }
}
```

#### 12. **Age Buckets Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "age_buckets": [
       {
           "min_age": 1,
           "max_age": 10
       }
   ]
}
```

#### 13. **Children Policies**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "children_policies": {
       "allow_children": true,
       "min_age": 0,
       "policy_rules": [
           {
               "rule_type": "EXISTING_BED",
               "from_age": 0,
               "to_age": 10,
               "price_type": "FIXED",
               "price_mode": "PER_STAY",
               "price": 0
           }
       ]
   }
}
```

#### 14. **Booking Model Policy**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "booking_model": {
       "type": "IB"
   }
}
```

#### 15. **Invoice Settings**

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12837615",
   "invoice_settings": {
       "legal_name": "string",
       "contact_person": "string",
       "address": "string",
       "country_code": "US",
       "city": "san francisco",
       "postal_code": "395001",
       "state": "st",
       "notification_channel": "POSTAL_MAIL",
       "brazil_tax_details": {
           "tax_payer_number_type": "CNPJ",
           "tax_payer_number": "11",
           "city_hall_id": "12345678",
           "email": "vishal@gmail.com"
       }
   }
}
```



## <mark style="color:yellow;">Response</mark>

#### <mark style="color:green;">**Sample Success Response**</mark>

```json
{
  "Status": "Success",
  "Message": "Successfully done",
  "Warnings": "",
  "Ruid": "e527c45a-f23a-4ee4-beb2-7d21f7699b1b",
  "data": {
    "property_settings": {
      "success": true
    },
    "renovation": {
      "success": true
    },
    "standard_phrases": {
      "success": true
    },
    "bed_linen_policy": {
      "success": true
    },
    "child_policies": {
      "success": true
    },
    "age_buckets": {
      "success": true
    },
    "quiet_hours": {
      "success": true
    },
    "booking_model": {
      "success": true
    },
    "cancellation_exceptions": {
      "success": true
    },
    "french_tax_details": {
      "success": true
    },
    "damage_policy": {
      "success": true
    }
  }
}
```

#### <mark style="color:yellow;">Success Response Body Elements</mark>

`Status` <mark style="color:orange;">**string**</mark>&#x20;

Indicates the overall status of the request. In this case, "Success" means the operation was completed successfully.

`Message` <mark style="color:orange;">**string**</mark>

Provides a brief message about the outcome. Here, it states "Successfully done," confirming that the request was processed without issues.

`data` <mark style="color:orange;">**object**</mark>&#x20;

Contains detailed results of the various settings processed in the request.

`property_settings` <mark style="color:orange;">**object**</mark>&#x20;

Indicates whether the property settings were successfully updated. Here, it is true.

`renovation` <mark style="color:orange;">**object**</mark>

Indicates whether the renovation settings were successfully updated. Here, it is true.

`standard_phrases` <mark style="color:orange;">**object**</mark>&#x20;

Indicates whether the standard phrases were successfully updated. Here, it is true.

`bed_linen_policy` <mark style="color:orange;">**object**</mark>&#x20;

Indicates whether the bed linen policy was successfully updated. Here, it is true.

`child_policies` <mark style="color:orange;">**object**</mark>

Indicates whether the child policies were successfully updated. Here, it is true.

`age_buckets` <mark style="color:orange;">**object**</mark>&#x20;

Indicates whether the age buckets were successfully updated. Here, it is true.

`quiet_hours` <mark style="color:orange;">**object**</mark>

Indicates whether the quiet hours settings were successfully updated. Here, it is true.

`booking_model` <mark style="color:orange;">**object**</mark>&#x20;

Indicates whether the booking model settings were successfully updated. Here, it is true.

`cancellation_exceptions` <mark style="color:orange;">**object**</mark>

Indicates whether the cancellation exceptions were successfully updated. Here, it is true.

`french_tax_details` <mark style="color:orange;">**object**</mark>

Indicates whether the French tax details were successfully updated. Here, it is true.

`damage_policy` <mark style="color:orange;">**object**</mark>

Indicates whether the damage policy settings were successfully updated. Here, it is true.

Indicates the result of the API call.&#x20;

***

#### <mark style="color:red;">Errors</mark>

<mark style="color:red;">**Sample Error Response 1**</mark>

```json
{
   "Errors": [
       {
           "Code": "400",
           "ShortText": "HotelCode: Invalid HotelCode ('AWSTEST')"
       }
   ],
   "Status": "Fail"
}
```

<mark style="color:red;">**Sample Error Response 2**</mark>

```json
{
   "Errors": [
       {
           "Code": "573",
           "ShortText": "channel-mapping not found for this property!"
       }
   ],
   "Status": "Fail"
}
```

<mark style="color:red;">**Sample Error Response 3**</mark>

```json
{
   "Errors": [
       {
           "Code": "611",
           "ShortText": "property_settings - require_cvc is invalid or not found!"
       }
   ],
   "Status": "Fail"
}
```

<mark style="color:red;">**Sample Error Response 4**</mark>

```json
{
   "Status": "Fail",
   "Errors": [],
   "Message": "Invalid value: Curfew settings overlap with check-in/check-out",
   "Ruid": "909864b8-5509-4a4e-98d2-6a52dfef7466",
   "Data": {}
}
```

***

<mark style="color:yellow;">**Error Response Body Elements**</mark>

`Status` <mark style="color:orange;">**string**</mark>

Indicates the result of the API call, which will be always `"Fail"` in case of an error response.

***

`Error` <mark style="color:orange;">**array**</mark>

Array that contains details about any errors that occurred during the API call. Each object in the `Errors` array contains the following properties:

`Code` <mark style="color:orange;">**string**</mark>

Specific error code that helps identify the type of error.

{% hint style="info" %}
For example: `"400"` indicates a bad request.
{% endhint %}

`ShortText` <mark style="color:orange;">**string**</mark>

A short description of the error.

***

`Message` <mark style="color:orange;">**string**</mark>

A message providing more information about the error.
