CRMs
Follow the bookings of a property with their guests, to keep a CRM in step — and what changes coming from the legacy CRM export.
5 min read
For a CRM on the partner programme: the bookings of a property that changed since your last call, each with its guest, the property and the room. The route takes your partner key and is reached only once it is enabled on your connection to that property; the answers come sealed to your key, as the encryption guide explains.
| Endpoint | What it is for |
|---|---|
GET /api/integrations/{pcode}/crm/booking-changes | The bookings that changed since since, with their guests, oldest change first, 50 per page. |
Following the changes
- 1Start from an instantCall with
sinceas an ISO 8601 instant with its zone: the moment you start, or further back to load history. The answer is{ data, until, nextCursor }, and fixes a window fromsincetountil. - 2Follow the cursorWhile
nextCursoris not null, call again withcursor=<nextCursor>and nothing else: the cursor carries the window. A booking that changes while you page leaves the window and comes in your next poll, so pages never skip one. - 3Poll from `until`Every page of a pass answers the same
until; oncenextCursoris null, use it as thesinceof your next poll. Changes are compared to the second, so a booking can come twice: keep the latest version of each by its id. Cancellations come too. A cursor that was not issued by the feed is refused with 400bookingChangesCursorInvalid: start again from your lastuntil.
Coming from the legacy API
Each booking keeps the field names of POST /panel/thirdPart/clientify and POST /panel/thirdPart/crm — rscode, extcode, name, email, marketing, name_property, name_room and the rest — so your mapping stays as it is. What changes:
| Legacy | Now |
|---|---|
publicToken and pcode in the body | Your partner key in x-api-key, the property in the path. |
updateDate as Y-m-d H:i:s in Spanish local time, changes strictly after it | since as an ISO 8601 instant with its zone, changes at or after it. |
| At most 100 rows in no particular order, so a second call could skip or repeat bookings | 50 per page, oldest change first, paged with nextCursor inside a fixed window, and until to poll from. |
A bare array, or { success, errors, data } when empty | Always { data, until, nextCursor }. |
| Every value as text | Numbers as JSON numbers, and a missing date (0000-00-00) as null. Each item adds last_modified, the instant of the change in UTC. |
private_notes, issue_date, date_of_expiry, app_url, ancillary, modified_reservations, the room’s doornum, lcode, position, location_id and its location fields | Not sent. A CRM has no use for the hotel’s internal notes, the issue and expiry dates of the guest’s identity document (its type and number still come, in type_vat and vat), or the room’s lock, and app_url carries the guest’s access token. |
thirdPart/crm filters (date_arrival, date_departure, sex, email, language) and its empty phone | No filters: the feed is every change, and you filter on your side. phone comes as the property recorded it. |
| Room blocks among the rows | Only bookings: confirmed, tentative and cancelled. |
Marketing consent is the property’s call
marketing is 1 when the guest accepted marketing communications and 0 when not. Every guest comes, whatever its value: the property is the controller of its guests’ data and tells you what may be done with each contact.