Rateplan Set (Create/Update)

This endpoint is used to create or update rateplan details within a property unit. When a request is made to this endpoint, it processes the provided rateplan configuration data and either creates a new rateplan or updates an existing one.


Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/agoda/rateplan/set
app-id: c2l0****20=
Authorization: Basic M0****W0
Header
Type
Required
Description

app-id

string

Yes

Your application ID. Required for authentication.

Authorization

string

Yes

Your API key. for authorization. Required for authentication.

Content-Type

string

Yes

Must be set to application/json.


Attributes

hotel_id alphanumeric (Required)

Specifies the hotel ID for the property.


channel_hotel_id string (Required)

Specifies the channel-specific hotel ID for the property.


rateplans array (Required)

A list of one or more rateplan objects defining operations to perform.


action string (Required)

The type of operation to perform. Valid values: "New", "Overlay".

Note: In a single request containing multiple rate plans, only one action is permitted. Submitting multiple rate plans with different actions in the same request is not allowed.


name string (Required)

The human-readable name of the rateplan.


rate_id string (Required / Optional for Overlay action)

The internal ID for the rateplan in your system. Useful for referencing or parent-child mapping.


channel_rate_id string (Required for Overlay action)

The ID assigned by the channel. Required for updating a rateplan.


rate_plan_type enum (Optional)

Specifies the rateplan type for Agoda. Accepted values:

  • 1 → Net Exclusive

  • 2 → Net Inclusive

  • 3 → Sell Exclusive

  • 4 → Sell Inclusive


Sample Request

{
   "hotel_id":"AWSTEST",
   "channel_hotel_id": "76586479",
   "rateplans": [
        {
            "action": "New",
            "name": "Best Rate Plan",
            "rate_id":"565666",
            "rate_plan_type": "1"
        },
        {
            "action": "New", 
            "rate_id": "43434",
            "name": "Standard Rate Plan",
            "rate_plan_type": "1"
        }
    ]
}

Response

Success Response

{
    "Status": "Success",
    "Data": {
channel_rate_id :  21110598
     },
    "Message": "Rate plan set successfully",
    "Ruid": "610e3fcf-6ecd-11f0-a537-6d58688a4bbf"
}

Error Response

{
    "Status": "Fail",
    "Errors": [
        {
            "Code": "1081",
            "ShortText": "rateplans: action is required"
        },
        {
            "Code": "1080",
            "ShortText": "rateplans: name is required"
        }
    ],
    "Message": ""
}

Response Body Element

Status string

Indicates the result of the API call.

Will be "Success" for successful operations.

Will be always "Fail" in case of an error response.


Data object

The response data, the root element.


Message string

The message in the response.


Code string

Specific error code that helps identify the type of error.

For example: "400" indicates a bad request.


ShortText string

A short description of the error.

Last updated

Was this helpful?