index

setRate JSON


Instructions

Post JSON data here to create or modify a rate in a property.

See here for information about using the JSON API.

The JSON data is similar to that returned by getRates. See it for information about the data fields.

The action field specifies the action to take and can be "new", "modify" or "delete".

rateId must not be specified when adding a new rate. On success the rateId value of the new rate will be returned.

When modifying or deleting a rate both the rateId and roomId values must be correct. An existing rate cannot be moved to a different roomId.

it is not necessary to send unchanged fields when modifying a rate, it is better to only include the fields which have changed.

Example Data

New Rate

{
    "authentication": {
        "apiKey": "apiKeyAsSetInAccountSettings",
        "propKey": "propKeyAsSetForTheProperty"
    },
    "action": "new",
    "roomId": "12345",
    "firstNight": "2014-10-01",
    "lastNight": "2016-10-01",
    "name": "Rate 1",
    "minNights": "1",
    "maxNights": "30",
    "minAdvance": "0",
    "maxAdvance": "365",
    "strategy": "0",
    "roomPrice": "100",
    "roomPriceEnable": "1",
    "roomPriceGuests": "0",
    "1pPrice": "60.00",
    "1pPriceEnable": "1",
    "2pPrice": "85.50",
    "2pPriceEnable": "1",
    "extraPersonPrice": "20.00",
    "extraPersonPriceEnable": "1",
    "extraChildPrice": "0",
    "extraChildPriceEnable": "0",
    "bookingcomRateCode": "",
    "expediacomRateCode": "",
    "feratelRateCode": "",
    "lastminutecomRateCode": "",
    "tablethotelscomRateCode": "",
    "travelocitycomRateCode": ""
}

Modify Rate

{
    "authentication": {
        "apiKey": "apiKeyAsSetInAccountSettings",
        "propKey": "propKeyAsSetForTheProperty"
    },
    "action": "modify",
    "rateId": "123456",
    "roomId": "12345",
    "roomPrice": "119.90"
}

Delete Rate

{
    "authentication": {
        "apiKey": "apiKeyAsSetInAccountSettings",
        "propKey": "propKeyAsSetForTheProperty"
    },
    "action": "delete",
    "rateId": "123456",
    "roomId": "12345"
}