# Product List

This endpoint allows you to fetch a list of hotel products, including details about room types, rate plans, value-added services, policies, and more.

***

### <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/product/list
```
{% 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. Required for authentication.</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>

Specifies the hotel ID for the property.

***

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

Specifies the channel-specific hotel ID for the property.

***

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

Start date for overriding policies.

{% hint style="info" %}
Format `YYYY-MM-DD`
{% endhint %}

***

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

End date for overriding policies. Example:

{% hint style="info" %}
Format `YYYY-MM-DD`
{% endhint %}

> **NOTE**
>
> **The** <mark style="color:orange;">`policy_override_start_date`</mark> **and** <mark style="color:orange;">`policy_override_end_date`</mark> **keys are utilized when retrieving product list data that includes override policy content. It is mandatory to provide values for both** <mark style="color:orange;">`policy_override_start_date`</mark> **and** <mark style="color:orange;">`policy_override_end_date`</mark> **in such cases. See the fields above.**



***

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

```json
{
    "hotel_id": "AWSTEST",
    "channel_hotel_id": "12962495",
    "policy_override_start_date": "2023-11-20",
    "policy_override_end_date": "2025-11-22"
}
```

***

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

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

```json
{
    "Status": "Success",
    "Data": {
        "hotel_products": {
            "channel_hotel_id": 12962495,
            "hotel_product": [
                {
                    "room_types": {
                        "room_type": {
                            "channel_room_id": 1296249501,
                            "max_occupancy": 0
                        }
                    },
                    "rate_plans": {
                        "rate_plan": {
                            "channel_rate_id": 49681540
                        }
                    },
                    "value_add_inclusions": {
                        "meal_plan": {
                            "mealplan_code": 10
                        }
                    },
                    "policy_info": {
                        "cancel_policy": {
                            "cancel_penalty": {
                                "policy_code": 152,
                                "policy_id": 402538147,
                                "policy_name": "General"
                            },
                            "tpa_extensions": {
                                "no_show_policy": {
                                    "penalty": "default"
                                }
                            }
                        },
                        "guarantee_payment_policy": {
                            "guarantee_payment": {
                                "effective_from": "",
                                "pre_payment_required": true
                            }
                        }
                    },
                    "value_added_services": {
                        "name": "additional package",
                        "value_added_service": [
                            {
                                "service_id": 2009,
                                "amount": "",
                                "currency_code": "",
                                "percentage": "20.0",
                                "hour": 0,
                                "minute": 0,
                                "num_pets": 0
                            },
                            {
                                "service_id": 1001,
                                "amount": "",
                                "currency_code": "",
                                "percentage": "",
                                "hour": 0,
                                "minute": 0,
                                "num_pets": 0
                            }
                        ]
                    },
                    "tpa_extensions": {
                        "pricing_type": {
                            "value": "Standard",
                            "price1": true
                        }
                    }
                },
                {
                    "child_rate": true,
                    "room_types": {
                        "room_type": {
                            "channel_room_id": 1296249501,
                            "max_occupancy": 0
                        }
                    },
                    "rate_plans": {
                        "rate_plan": {
                            "channel_rate_id": 49681937
                        }
                    },
                    "value_add_inclusions": {
                        "meal_plan": {
                            "mealplan_code": 19
                        }
                    },
                    "policy_info": {
                        "cancel_policy": {
                            "cancel_penalty": {
                                "policy_code": 152,
                                "policy_id": 402538147,
                                "policy_name": "General"
                            },
                            "tpa_extensions": {
                                "no_show_policy": {
                                    "penalty": "default"
                                }
                            }
                        },
                        "guarantee_payment_policy": {
                            "guarantee_payment": {
                                "effective_from": "",
                                "pre_payment_required": true
                            }
                        }
                    },
                    "tpa_extensions": {
                        "pricing_type": {
                            "value": "Standard",
                            "price1": true
                        },
                        "rate_relation": {
                            "follows_closed": true,
                            "follows_restrictions": true,
                            "follows_policy": true,
                            "follows_price": true,
                            "parent_rateplan_code": "49681540",
                            "percent": "60.0"
                        }
                    }
                },
                {
                    "child_rate": true,
                    "room_types": {
                        "room_type": {
                            "channel_room_id": 1296249501,
                            "max_occupancy": 0
                        }
                    },
                    "rate_plans": {
                        "rate_plan": {
                            "channel_rate_id": 49682438
                        }
                    },
                    "value_add_inclusions": {
                        "meal_plan": {
                            "mealplan_code": 12
                        }
                    },
                    "policy_info": {
                        "booking_rules": {
                            "booking_rule": {
                                "min_advanced_booking_offset": "P2D",
                                "max_advanced_booking_offset": "",
                                "release_time_of_day_start": "",
                                "release_time_of_day_end": ""
                            }
                        },
                        "cancel_policy": {
                            "cancel_penalty": {
                                "policy_code": 549,
                                "policy_id": 403723453,
                                "policy_name": "Non Refundable"
                            },
                            "tpa_extensions": {
                                "no_show_policy": {
                                    "penalty": "default"
                                }
                            }
                        },
                        "guarantee_payment_policy": {
                            "guarantee_payment": {
                                "effective_from": "after_reservation_is_made",
                                "pre_payment_required": true
                            }
                        },
                        "override_policies": {
                            "override_policy": {
                                "policy_code": "",
                                "policy_id": "403933411",
                                "policy_name": "Fully Flexible",
                                "book_dates": {
                                    "book_date": [
                                        {
                                            "start": "2024-11-25",
                                            "end": "2024-11-30"
                                        },
                                        {
                                            "start": "2024-12-05",
                                            "end": "2024-12-10"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "value_added_services": {
                        "name": "additional package 2",
                        "value_added_service": [
                            {
                                "service_id": 2001,
                                "amount": "50.0",
                                "currency_code": "USD",
                                "percentage": "",
                                "hour": 0,
                                "minute": 0,
                                "num_pets": 0
                            },
                            {
                                "service_id": 1001,
                                "amount": "",
                                "currency_code": "",
                                "percentage": "",
                                "hour": 0,
                                "minute": 0,
                                "num_pets": 0
                            }
                        ]
                    },
                    "tpa_extensions": {
                        "pricing_type": {
                            "value": "Standard",
                            "price1": true
                        },
                        "rate_relation": {
                            "follows_closed": true,
                            "follows_restrictions": true,
                            "follows_policy": true,
                            "follows_price": true,
                            "parent_rateplan_code": "49681540",
                            "percent": "150.0"
                        }
                    }
                }
            ]
        }
    },
    "Message": "Product fetched successfully",
    "Ruid": "a2a3ccd9-3062-40fe-a701-f170cec0c5f0"
}

```

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

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

Indicates the result of the API call.

***

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

A message describing the outcome.

***

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

A unique request identifier.

***

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

Contains the actual response data.

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

Contains information about the hotel products.

***

`channel_hotel_id` <mark style="color:orange;">**integer**</mark>

The unique identifier for the hotel in the channel's system.

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

A list of hotel products available.

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

Contains information for the first hotel product.

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

Specifies the details about room types.

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

Details for the room type in the product.

`channel_room_id` <mark style="color:orange;">**integer**</mark>

The unique identifier for the room type.

`max_occupancy`  <mark style="color:orange;">**integer**</mark>

The maximum occupancy allowed for the room.

***

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

Describes the rate plans available for the room type.

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

Details of a specific rate plan associated with the room type.

`channel_rate_id` <mark style="color:orange;">**integer**</mark>

The unique identifier for the rate plan.

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

Describes the additional inclusions in the rate plan.

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

Information about meal plans included in the booking.

`mealplan_code` <mark style="color:orange;">**integer**</mark>

The code for the meal plan included.

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

Information related to the policies that apply to the hotel product.

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

Describes any booking rules.

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

This object contains specific rules regarding the booking conditions for a particular hotel product.

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

Defines the minimum number of days a customer must book the room in advance.&#x20;

Example: `"P2D"` means the customer must book at least 2 days before check-in.

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

Defines the maximum number of days a customer can book the room in advance.&#x20;

If empty, no limit is specified.

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

Specifies the time of day when the room may be released if the booking isn't confirmed (if applicable). Empty means no specific time is set.

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

Specifies the cut-off time by which the room must be booked.&#x20;

Empty means no specific end time is defined.

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

Specifies the cancellation policy details.

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

Describes the penalty for cancellation.

`policy_code` <mark style="color:orange;">**integer**</mark>

The code for the cancellation policy.

`policy_id` <mark style="color:orange;">**integer**</mark>

The unique identifier for the cancellation policy.

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

The name of the cancellation policy.

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

Details about the guarantee payment policy.

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

This is the main object containing details about the guarantee payment policy for the hotel room or booking.

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

This parameter specifies when the guarantee payment policy becomes effective. It typically represents the date and/or time from which the payment guarantee rule applies.

{% hint style="info" %}
`YYYY-MM-DD`
{% endhint %}

`pre_payment_required` <mark style="color:orange;">**boolean**</mark>

Whether pre-payment is required.

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

Lists the value-added services included with the room product.

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

Name of the value-added services package.

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

A list of individual services offered as part of the package.

`service_id` <mark style="color:orange;">**integer**</mark>

The unique identifier for the service.

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

The amount for the service.

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

The percentage of the value-added service charge.

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

Extensions for additional policy or pricing details.

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

Describes the type of pricing for the hotel product.

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

The pricing type.

`price1` <mark style="color:orange;">**boolean**</mark>

Indicates if the product follows the standard pricing rule.

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

Contains information for the second hotel product.

`child_rate` <mark style="color:orange;">**boolean**</mark>

Indicates whether there is a child rate available.

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

Specifies any relations with other rates.

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

The code of the parent rate plan from which this rate plan is derived.

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

Specifies the percentage difference compared to the parent rate plan.

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

Contains information for the third hotel product.

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

Describes any booking rules.

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

The minimum advanced booking offset.

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

Describes any override policies for specific date ranges.

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

Name of the override policy.

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

The list of date ranges when the override policy applies.

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

The start date of the bookable range.

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

The end date of the bookable range.

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

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

```json
{
    "Status": "Fail",
    "Errors": [
        {
            "Code": "400",
            "ShortText": "hotel_id: Invalid HotelCode ('')"
        },
        {
            "Code": "572",
            "ShortText": "channel_hotel_id - is invalid or not found!"
        }
    ],
    "Message": ""
}
```

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

```json
{
    "Status": "Fail",
    "Errors": [],
    "Message": "401 - Authorization Required",
    "Ruid": "2dd35b1a-babc-4fe3-9bfa-b995891903ba"
}
```

***

<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.

***

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

A unique identifier for tracking the request.
