Fideltour to HDH API Migration

AUTHENTICATION

In the old API, each customer was given a TOKEN by the provider, and it was always added to the header of every request.

In the current API, a login request is required to obtain the TOKEN, which must then be added to the header of the rest of the requests.

The token expires after 24 hours, and two methods are recommended to refresh it:

Refresh when a 401 is received,

Use the verify and token-refresh methods

Changes related to contacts GET to https://backend.fideltour.com/api/3rd-party/contacts/

GET to https://app.hoteldatahub.io/api/v1/contacts/

POST to https://backend.fideltour.com/api/3rd-party/contacts/

POST to https://app.hoteldatahub.io/api/v1/contacts/

PATCH to https://backend.fideltour.com/api/3rd-party/contacts/

PATCH to https://app.hoteldatahub.io/api/v1/contacts/1234566/

The "hc" attribute should no longer be sent.

The "first_name" and "last_name" attributes have been replaced with "name" and "surname", respectively.

When making a PATCH, the contact's ID must be included in the URL, and it's not necessary to send its email in the body.

Changes related to bookings

GET to https://backend.fideltour.com/api/3rd-party/bookings/

GET to https://app.hoteldatahub.io/api/v1/entries/

POST to https://backend.fideltour.com/api/3rd-party/bookings/

POST to https://app.hoteldatahub.io/api/v1/entries/

PATCH to https://backend.fideltour.com/api/3rd-party/bookings/123455/

PATCH to https://app.hoteldatahub.io/api/v1/entries/123455/

The "hc" attribute has been replaced with "hotel_chain".

When creating a booking, the "contact" attribute is required, containing the linked contact's ID (integer).

The "checkin" and "checkout" attributes have been replaced with "entrance" and "departure", respectively.

The "hotel" attribute must contain the hotel's ID (integer), provided by Fideltour.

The "contact_first_name", "contact_last_name", "contact_email" and "contact_phone" attributes are no longer used.

The following new attributes have been added: "is_checkin_realized", "is_checkout_realized", "sub_status", "juniors", "room_number", "notes", "fare_type", "offer", "event_type", "package" and "category"