# Channel Password Setup

**The Flow of the Channel Password Setup -**

Step 1 - Add Traveloka as a channel for which the Setup is to be done.

Step 2 - Add the valid data/values for multiple fields related to the Channel password setup process.&#x20;

Step 3 - Submit all the data. (If the channel password setup is successfully done, the system will acknowledge with a message - "Success". And in case of failure, system will acknowledge with an error message.)

***

### <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.su-api.com/SUAPI/jservice/OTA_Setup
```

{% endcode %}

***

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

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

Specifies the required node `hotelid` contains the IT provider's hotel id for which the provider wishes to add mapping information.

***

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

Defines the status of the channel connection in the system.

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

* `"setup"` → Performs both create and update operations. If the channel password does not exist in the system, it will create it; otherwise, it will update the existing one.
* `"remove"` → Directly performs a straightforward remove operation.
  {% endhint %}

***

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

Specifies the Channel Code for OTA in Su.&#x20;

***

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

Defines the status of the channel connection in the system.

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

* `"Active"` → Channel integration is enabled
* `"Inactive"` → Channel integration is disabled
  {% endhint %}

***

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

Specifies the **unique hotel ID** used in the external distribution channel or PMS (Property Management System).

***

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

Specifies the **default currency code** used for pricing.

***

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

Indicates whether the API should automatically **convert prices** into the configured currency.

***

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

Defines the default multiplier value applied in rateplan mapping.

***

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

Specifies the default surcharge value applied in rateplan mapping.

***

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

Defines pricing model (for example, `OBP`, `RP`).

***

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

Provides a **unique name** for the hotel connection to identify it easily in dashboards and reports.

***

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

```json
{
    "hotelid": "AWSTEST",
    "action": "setup",
    "channelid": 386,
    "status": "Active",
    "channelhotelid": "123456789",
    "defaultmultiplier": 1,
    "defaultsurcharge": 0,
    "currency": "USD",
    "convertrates": true,
    "pricingmodel": "OBP",
    "connection_name": "Traveloka V2 Test"
}
```

***

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

{% tabs %}
{% tab title="200 - Success Response" %}
{% code overflow="wrap" %}

```json
{
    "channelmapping": [
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Manageable)-Room and Breakfast",
            "mapping_rateplan": "RB",
            "mappingformula": "TRPPSV####RB",
            "rateplan_code": "",
            "rateplan_id": "RB",
            "rateplanname": "Room and Breakfast",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Manageable)",
            "type": "manageable",
            "rateplan": "Triple Partial Sea View (Manageable)-Room and Breakfast",
            "channelroomname": "Triple Partial Sea View (Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room and Breakfast",
            "channelrateid": "RB",
            "mappingstring": "TRPPSV####RB"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Manageable)-Room and Breakfast Non-Ref",
            "mapping_rateplan": "RBNR",
            "mappingformula": "TRPPSV####RBNR",
            "rateplan_code": "",
            "rateplan_id": "RBNR",
            "rateplanname": "Room and Breakfast Non-Ref",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Manageable)",
            "type": "manageable",
            "rateplan": "Triple Partial Sea View (Manageable)-Room and Breakfast Non-Ref",
            "channelroomname": "Triple Partial Sea View (Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room and Breakfast Non-Ref",
            "channelrateid": "RBNR",
            "mappingstring": "TRPPSV####RBNR"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Non-Manageable)-Room Only Opaque",
            "mapping_rateplan": "ROO",
            "mappingformula": "TRPPSV####ROO",
            "rateplan_code": "",
            "rateplan_id": "ROO",
            "rateplanname": "Room Only Opaque",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Non-Manageable)",
            "type": "nonmanageable",
            "rateplan": "Triple Partial Sea View (Non-Manageable)-Room Only Opaque",
            "channelroomname": "Triple Partial Sea View (Non-Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room Only Opaque",
            "channelrateid": "ROO",
            "mappingstring": "TRPPSV####ROO"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Non-Manageable)-Room Only Non-Ref Opaque",
            "mapping_rateplan": "RONRO",
            "mappingformula": "TRPPSV####RONRO",
            "rateplan_code": "",
            "rateplan_id": "RONRO",
            "rateplanname": "Room Only Non-Ref Opaque",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Non-Manageable)",
            "type": "nonmanageable",
            "rateplan": "Triple Partial Sea View (Non-Manageable)-Room Only Non-Ref Opaque",
            "channelroomname": "Triple Partial Sea View (Non-Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room Only Non-Ref Opaque",
            "channelrateid": "RONRO",
            "mappingstring": "TRPPSV####RONRO"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Manageable)-Room Only Non-Ref",
            "mapping_rateplan": "RONR",
            "mappingformula": "TRPPSV####RONR",
            "rateplan_code": "",
            "rateplan_id": "RONR",
            "rateplanname": "Room Only Non-Ref",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Manageable)",
            "type": "manageable",
            "rateplan": "Triple Partial Sea View (Manageable)-Room Only Non-Ref",
            "channelroomname": "Triple Partial Sea View (Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room Only Non-Ref",
            "channelrateid": "RONR",
            "mappingstring": "TRPPSV####RONR"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Non-Manageable)-Room and Breakfast Non-Ref Opaque",
            "mapping_rateplan": "RBNRO",
            "mappingformula": "TRPPSV####RBNRO",
            "rateplan_code": "",
            "rateplan_id": "RBNRO",
            "rateplanname": "Room and Breakfast Non-Ref Opaque",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Non-Manageable)",
            "type": "nonmanageable",
            "rateplan": "Triple Partial Sea View (Non-Manageable)-Room and Breakfast Non-Ref Opaque",
            "channelroomname": "Triple Partial Sea View (Non-Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room and Breakfast Non-Ref Opaque",
            "channelrateid": "RBNRO",
            "mappingstring": "TRPPSV####RBNRO"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Manageable)-Room Only",
            "mapping_rateplan": "RO",
            "mappingformula": "TRPPSV####RO",
            "rateplan_code": "",
            "rateplan_id": "RO",
            "rateplanname": "Room Only",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Manageable)",
            "type": "manageable",
            "rateplan": "Triple Partial Sea View (Manageable)-Room Only",
            "channelroomname": "Triple Partial Sea View (Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room Only",
            "channelrateid": "RO",
            "mappingstring": "TRPPSV####RO"
        },
        {
            "fixed_occupany": "",
            "is_child": "",
            "mappedname": "Triple Partial Sea View (Non-Manageable)-Room and Breakfast Opaque",
            "mapping_rateplan": "RBO",
            "mappingformula": "TRPPSV####RBO",
            "rateplan_code": "",
            "rateplan_id": "RBO",
            "rateplanname": "Room and Breakfast Opaque",
            "roomtype_id": "TRPPSV",
            "roomtypename": "Triple Partial Sea View (Non-Manageable)",
            "type": "nonmanageable",
            "rateplan": "Triple Partial Sea View (Non-Manageable)-Room and Breakfast Opaque",
            "channelroomname": "Triple Partial Sea View (Non-Manageable)",
            "channelroomid": "TRPPSV",
            "channelratename": "Room and Breakfast Opaque",
            "channelrateid": "RBO",
            "mappingstring": "TRPPSV####RBO"
        }
    ],
    "Status": "Success"
}
```

{% endcode %}
{% endtab %}

{% tab title="400 - Error Response" %}

```json
{
  "Status": "Failed",
  "Errors": [
    {
      "Code": "895",
      "ShortText": "HotelName: Property content is required"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

***

#### <mark style="color:green;">Success Response - 200 Body Elements</mark>&#x20;

`channelmapping` <mark style="color:orange;">**array of objects**</mark>

List of room and rate plan mapping entries.

Each object contains the following fields:

***

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

The combined name of the room type and rate plan.

***

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

The short internal code for the mapped rate plan.

***

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

The formula combining the room type ID and rate plan ID using `####` as a separator.

***

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

The internal identifier for the rate plan.

***

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

The name of the rate plan (e.g., "Room Only", "Room and Breakfast").

***

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

The external or legacy system code for the rate plan (may be empty).

***

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

The internal identifier for the room type.

***

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

The name of the room type.

***

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

Indicates whether the room is `manageable` or `nonmanageable`.

***

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

The full descriptive name combining the room and rate plan.

***

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

The room name as it appears on the external channel.

***

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

The room ID used by the external channel.

***

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

The rate plan name used by the external channel.

***

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

The rate plan ID on the external channel.

***

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

A unique mapping string, typically identical to `mappingformula`.

***

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

Indicates if the room has a fixed occupancy. Usually empty.

***

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

Indicates if the mapping is for a child-specific room or rate.&#x20;

***

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

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

{% hint style="info" %}
Will be `"Success"` for successful operations.
{% endhint %}

***

#### <mark style="color:red;">Errors Response - 400 Body Elements</mark>

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

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

***

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