Payloads
The event body's data object is a rich snapshot of the booking assembled at publish time. It is the same
regardless of event type — booking.cancelled simply carries the cancelled state, booking.updated / payment_collected carries the new paid/outstanding figures, and so on.
data
├── booking – the full bookings row
├── agent – the owning agent (or null)
├── agentGroup – the agent's group (or null)
├── cancellationPlan – parsed cancellation plan object (or null)
├── cancellationPolicies – parsed dated refund windows (array/object, or null)
├── properties[] – per-property stay lines
├── meals[] – per-property meal add-ons
├── vas[] – per-property value-added services
├── primaryGuest – the lead guest (or null)
└── secondaryGuests[] – additional guests
Field names are camelCase (Jackson defaults). A section is null when the related record doesn't exist (e.g.
agent for an agent-less booking); a null inner field means that column is unset. cancellationPlan /
cancellationPolicies are the booking's JSONB columns parsed into objects — not escaped strings.
data.booking
The full bookings row.
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | string | couponCode | string | |
code | string | couponDiscountAmount | number | |
bookingDate | datetime | couponDiscountPercentage | number | |
checkinDate | date | bankOfferCode | string | |
checkoutDate | date | promotionCode | string | |
numberOfNights | int | promotionDiscountAmount | number | |
adults | int | cancellationPlan | string (raw JSON; parsed copy in data.cancellationPlan) | |
children | int | cancellationPolicies | string (raw JSON; parsed copy in data.cancellationPolicies) | |
infants | int | cancellationPlanInstantDiscountAmount | number | |
numberOfGuest | int | cancellationPlanOfferType | string | |
propertyQuantity | int | cancellationPlanOfferValue | number | |
channelId | string | originalNetAmountBeforeTax | number | |
bookingStatus | string | originalNetAmountAfterTax | number | |
paymentStatus | string | netAmountBeforeTax | number | |
bookingPaymentTerm | string | netAmountAfterTax | number | |
splitPaymentType | string | netBookingAmountBeforeTax | number | |
paymentGateway | string | netBookingAmountAfterTax | number | |
paymentMode | string | gstAmount | number | |
propertyId | string | bookingGstAmount | number | |
propertyUnitId | long | mealCost | number | |
guestId | string | netVasAmountBeforeTax | number | |
agentId | string | platformFeeAmount | number | |
guestManager | string | platformFeePercentage | number | |
source | string | paidAmount | number | |
bookingType | string | actualPaidAmount | number | |
businessCategory | string | outstandingAmount | number | |
hasMigrated | bool | isOtaBooking | bool | |
remarks | string | createdBy / updatedBy | string |
data.agent
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | string | designation | string | |
name | string | focusRegion | string | |
email | string | managerId | string | |
phone | string | agentGroupId | long | |
firstName | string | countryCode | string | |
lastName | string | picture | string | |
active | bool | rolesCsv | string |
data.agentGroup
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | long | agentGroupCategoryId | long | |
name | string | city | string | |
contactPersonName | string | state | string | |
email | string | gstId | string | |
phone | string | active | bool |
data.cancellationPlan / data.cancellationPolicies
The booking's cancellation JSONB columns, parsed. cancellationPlan is the plan/offer; cancellationPolicies
is the set of dated refund windows. Shape is passed through verbatim from what was stored at booking time
(free-form object/array). If a column isn't valid JSON it is passed through as the raw string.
data.properties[]
Per-property stay lines (booking_properties).
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | long | mealPlan | string | |
bookingId | string | mealCost | number | |
propertyId | string | couponDiscountAmount | number | |
price | number | promotionDiscountAmount | number | |
totalPrice | number | quantity | int | |
tax | number | securityDepositAmount | number | |
valueAddedServiceCost | number | checkin / checkout | date | |
adults | int | platformFeeAmount | number | |
children | int | platformFeePercentage | number | |
metadata | string (JSON) |
data.meals[]
Per-property meal add-ons (booking_property_meal).
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | long | perAdultCost | number | |
bookingId | string | perChildCost | number | |
bookingPropertyId | long | pricingType | string | |
mealId | string | pricingConfig | string (JSON) | |
mealDate | date | name | string | |
adults | int | attributes | string (JSON) | |
children | int | meta | string (JSON) |
data.vas[]
Per-property value-added services (booking_property_vas).
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | long | unitPrice | number | |
bookingId | string | pricingType | string | |
bookingPropertyId | long | pricingConfig | string (JSON) | |
vasId | string | name | string | |
variantId | string | description | string | |
vasDate | date | attributes | string (JSON) | |
quantity | int | meta | string (JSON) |
data.primaryGuest
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | string | lastName | string | |
name | string | city | string | |
email | string | dob | date | |
phone | string | anniversary | date | |
salutation | string | createdAt | datetime | |
firstName | string | updatedAt | datetime |
data.secondaryGuests[]
| Field | Type | Field | Type | |
|---|---|---|---|---|
id | uuid | email | string | |
bookingId | string | phone | string | |
position | int | countryCode | string | |
guestId | string | city | string | |
salutation | string | dob | date | |
firstName | string | anniversary | date | |
lastName | string | createdAt / updatedAt | datetime |
Full example — booking.updated / payment_collected
{
"id": "9f1c8e2a-6b3d-4e7a-9c10-2f5b8a1d4e33",
"event": "booking.updated",
"occurredAt": "2026-07-23T09:14:05.482Z",
"bookingId": "GWVFXCDFFO",
"reason": "payment_collected",
"data": {
"booking": {
"id": "GWVFXCDFFO",
"code": "GWVFXCDFFO",
"bookingDate": "2026-07-14T10:57:10",
"checkinDate": "2026-09-16",
"checkoutDate": "2026-09-17",
"numberOfNights": 1,
"adults": 2,
"children": 0,
"bookingStatus": "CONFIRMED",
"paymentStatus": "PAID",
"agentId": "user_PZTidD1RNlhnE6",
"guestId": "guest_8b21",
"netBookingAmountAfterTax": 15643.36,
"paidAmount": 15643.36,
"actualPaidAmount": 15643.36,
"outstandingAmount": 0.00,
"cancellationPlan": "{\"type\":\"FLEXIBLE\"}",
"isOtaBooking": false
},
"agent": {
"id": "user_PZTidD1RNlhnE6",
"name": "Akhand Pratap Singh",
"email": "[email protected]",
"phone": "98xxxxxx01",
"agentGroupId": 42,
"designation": "Sales",
"active": true,
"rolesCsv": "ROLE_AGENT,ROLE_SUPER_POWER_AGENT"
},
"agentGroup": {
"id": 42,
"name": "North Sales Group",
"contactPersonName": "R. Sharma",
"email": "[email protected]",
"city": "Delhi",
"state": "DL",
"active": true
},
"cancellationPlan": { "type": "FLEXIBLE" },
"cancellationPolicies": [
{ "from": "2026-07-14", "to": "2026-09-09", "refundPct": 100 },
{ "from": "2026-09-10", "to": "2026-09-15", "refundPct": 50 }
],
"properties": [
{
"id": 90211,
"bookingId": "GWVFXCDFFO",
"propertyId": "prop_1123",
"price": 13256.00,
"totalPrice": 15643.36,
"tax": 2387.36,
"adults": 2,
"children": 0,
"mealPlan": "CP",
"quantity": 1,
"securityDepositAmount": 0,
"checkin": "2026-09-16",
"checkout": "2026-09-17"
}
],
"meals": [
{
"id": 5501,
"bookingId": "GWVFXCDFFO",
"bookingPropertyId": 90211,
"mealId": "meal_breakfast",
"mealDate": "2026-09-16",
"adults": 2,
"children": 0,
"perAdultCost": 350.00,
"pricingType": "PER_PERSON",
"name": "Breakfast"
}
],
"vas": [
{
"id": 7801,
"bookingId": "GWVFXCDFFO",
"bookingPropertyId": 90211,
"vasId": "vas_airport_pickup",
"vasDate": "2026-09-16",
"quantity": 1,
"unitPrice": 1200.00,
"pricingType": "PER_UNIT",
"name": "Airport Pickup"
}
],
"primaryGuest": {
"id": "guest_8b21",
"name": "Rohit Verma",
"email": "[email protected]",
"phone": "99xxxxxx23",
"firstName": "Rohit",
"lastName": "Verma",
"city": "Mumbai"
},
"secondaryGuests": [
{
"id": "b84d3ced-88cd-4c76-894e-a4de42571a1b",
"bookingId": "GWVFXCDFFO",
"position": 2,
"firstName": "Neha",
"lastName": "Verma",
"countryCode": "+91"
}
]
}
}
By default (raw message delivery off) SQS receives the standard SNS envelope — your body above is the
JSON string in the Message field, and eventType is under MessageAttributes:
{ "Type": "Notification", "MessageId": "…", "TopicArn": "…",
"Message": "{\"id\":\"9f1c…\",\"event\":\"booking.updated\", … }",
"MessageAttributes": { "eventType": { "Type": "String", "Value": "booking.updated" } } }
Subscribe with rawMessageDelivery: true to receive the payload JSON directly as the SQS message body
(the eventType attribute is then delivered as an SQS message attribute). See
Subscriptions.