API Clean Up – What Changed in the Last Week?

 In Miscellaneous

Being close to going live, we wanted to take the opportunity for some last minute cleanup. Because we want to go live with a version 1 that we’re happy with, not just whatever we ended up with after eight months of developing.
Turned out, there was a lot we wanted to improve. Here’s the list of updates from last week, and some tips on how to migrate over.

Big changes

We combined rate plans and extra services into a new module called ‘rateplan’. Just change the paths:
catalog/services => rateplan/services
catalog/inventory => rateplan/inventory
rates/rateplans => rateplan/rateplan
rates/rates => rateplan/rates
Rate plans, inventory and services now all have a service type and a VAT type. The two values where previously concatenated, which was a bit dirty.

The booking model changed to accomodate new requirements:

  • In the output model, we do not include the reservations anymore. You can still get them, just call GET reservations and filter by bookingId.
  • The guest is now called ‘primaryGuest’, as a preparation to support more than one registered person in a room, instead of one registered person and a bunch of strangers.
  • We added a second comment field. Now there is one for the guest (“I am horribly allergic to peanuts and cats.”), and one for the hotel team (“Forward the *peanut* allergy information to the restaurant team.”)
  • We have less required fields in the addresses of booker and guest, to not annoy potential guests with filling out long forms. That also means you cannot rely on them being there. For the booker, only email and name are required, for the guest, only the name.
  • The guest and booker title now have actual values, not numbers. For now, there are Mr, Ms, Dr and ‘other’, if you are none of those, or don’t want to tell.

Small changes

  • When amending a reservation, you now have to specify the number of persons.
  • Rate plans must have a cancellation policy set. You can define those using api.apaleo.com/settings/cancellation-policies.
  • renamed ‘serviceIds’ to ‘extraServiceIds’ in reservations, to make it clearer that those are not the services included in a predefined package.

Fix Spelling

The service type enum value ‘accommodation’ finally got its second ‘m’, and addressline1 and addressline2 were renamed to addressLine1 and addressLine2. Capital L.

Added

api.apaleo.com/finance/types/vat – gives you the VAT types and percentages for one specific country. We don’t support many now, but that list will grow as we go.

Removed

The links are gone. We realized nobody was using them, and keeping them around seemed pretty useless.

That’s all. We tried our best to come up with a clean structure and understandable names. If you have any feedback on what to improve or change (or also what you like), it would be amazing if you’d let us know – we build the API for you, and want you to like it.

Recommended Posts