Extend the stay

Arrive a day earlier? Stay for the weekend? Extending the stay is a very standard amend use-case.

To extend the stay, you get the alternative offers for a reservation, and either wait for user input to choose one, or use your magic to determine the best. When getting the alternative offers, be sure to change the arrival and/or departure dates of the reservation, so that the new offer covers the additional days.

GET /booking/v1/reservations/{id}/offers

When getting the alternative offers, be sure to change the arrival and/or departure dates of the reservation, so that the new offer covers the additional days.

Example

{
    "property":{
        "id":"LND",
        "code":"LND",
        "name":"Hotel London",
        "description":"Located in a quiet side street with a beautiful garden in the backyard, Hotel London is prefect for relaxing after a day of shopping or a night of partying."
    },
    "offers":[
        {
            "arrival":"2020-09-24T16:00:00+01:00",
            "departure":"2020-09-29T10:00:00+01:00",
            "minGuaranteeType":"Prepayment",
            "availableUnits":22,
            "totalGrossAmount":{
                "amount":599,
                "currency":"GBP"
            },
            "cancellationFee":{
                "code":"STR",
                "name":"Strict",
                "description":"No free cancellation.",
                "dueDateTime":"2020-09-23T08:24:53.092124+01:00",
                "fee":{
                    "amount":449,
                    "currency":"GBP"
                }
            },
            "noShowFee":{
                "code":"NONREF",
                "fee":{
                    "amount":449,
                    "currency":"GBP"
                }
            },
            "timeSlices":[
                {
                    "from":"2020-09-24T16:00:00+01:00",
                    "to":"2020-09-25T09:00:00+01:00",
                    "ratePlan":{
                        "id":"LND-NONREF-SGL",
                        "code":"NONREF",
                        "name":"Non Refundable",
                        "description":"Pay in advance and safe. If you cancel we well keep the amount of the full stay.",
                        "isSubjectToCityTax":true
                    },
                    "unitGroup":{
                        "id":"LND-SGL",
                        "code":"SGL",
                        "name":"Single",
                        "description":"Nice and comfortable room with shower and single bed.",
                        "maxPersons":1
                    },
                    "baseAmount":{
                        "grossAmount":94,
                        "netAmount":89.52,
                        "vatType":"Reduced",
                        "currency":"GBP"
                    },
                    "totalGrossAmount":{
                        "amount":94,
                        "currency":"GBP"
                    }
                },
                {
                    "from":"2020-09-25T09:00:00+01:00",
                    "to":"2020-09-26T09:00:00+01:00",
                    "ratePlan":{
                        "id":"LND-NONREF-SGL",
                        "code":"NONREF",
                        "name":"Non Refundable",
                        "description":"Pay in advance and safe. If you cancel we well keep the amount of the full stay.",
                        "isSubjectToCityTax":true
                    },
                    "unitGroup":{
                        "id":"LND-SGL",
                        "code":"SGL",
                        "name":"Single",
                        "description":"Nice and comfortable room with shower and single bed.",
                        "maxPersons":1
                    },
                    "baseAmount":{
                        "grossAmount":81,
                        "netAmount":77.14,
                        "vatType":"Reduced",
                        "currency":"GBP"
                    },
                    "totalGrossAmount":{
                        "amount":81,
                        "currency":"GBP"
                    }
                },
                ------------------

Next, you amend the reservation by calling the following endpoint.

PUT /booking/v1/reservation-actions/{id}/amend

Use the data from the offers endpoint to construct the input for the call. The amend functionality is pretty powerful and constructing the input from scratch is complex.

Example

{
    "arrival":"2020-09-24T17:00:00+02:00",
    "departure":"2020-09-27T11:00:00+02:00",
    "adults":1,
    "requote":false,
    "timeSlices":[
        {
            "ratePlanId":"LND-NONREF-SGL",
            "totalGrossAmount":{
                "amount":81.00,
                "currency":"GBP"
            }
        },
        {
            "ratePlanId":"LND-NONREF-SGL",
            "totalGrossAmount":{
                "amount":86.00,
                "currency":"GBP"
            }
        },
        {
            "ratePlanId":"LND-NONREF-SGL",
            "totalGrossAmount":{
                "amount":91.00,
                "currency":"GBP"
            }
        }
    ]
}