API Webhooks 3.0 Implementation

Introduction

Webhooks is a simple HTTP requests that are being sent out when a given event occurred. You can define a single or separate handlers (URLs) for each event and when this event handlers received a webhooks requests, it will return a http 200 response accordingly.
If you're not familiar with webhooks concept, there is a very good read on sendgrid blog.
Webhooks 3.0 is our latest version of Webhooks. Compare to our previous versions, this version has more endpoints and more detailed notifications for product & product type


Webhooks Payload Detail

  • Webhooks are sent as POST HTTP/1.1 requests with JSON payload
  • Payload vary depending on the event, but will always contains type, timestamp, signature
  • Webhooks expect 200 OK HTTP response as a confirmation, meaning the event has been acknowledged by your application.

Webhooks Acknowledgement

  • Webhooks handler from your server is expected to return HTTP response 200 OK as event acknowledgement
  • When webhooks receive a http 200 response from your webhooks handler, it is marked as acknowledged and will not be sent again
  • In case our webhooks get any other HTTP response or no response at all after waiting for more than 20 second, webhooks delivery is marked as failed and there will be retry
  • Number of retries
    • Total number of retries is 10 times
    • 1st retry will take place 1 minute after original webhook
    • 2nd retry will take place 2 minutes after the 1st retry
    • Intervals between subsequent retries will be 1, 2, 4, 8, 16, 32, 64 minutes on the same day
    • After the 7th retry, subsequent retries will be every 24 hours for the next 3 days
    • If after subsequent retries for the next 3 days still failed, the Webhooks for this event will be auto-deactivated. You will have to resolve the issues and then login to Agents Marketplace to enable it.

Webhooks Events

Name
Description
product_available Fired when a new Product is available for booking
product_updated Fired when existing fields' data in the Product API endpoint changes
product_type_available Fired when a new Product Type is online
product_type_not_available Fired when an existing active Product Type is offline
product_type_content_updated Fired when existing content fields' data in the Product Type API endpoint changes
product_type_availability_update Fired when a product type availability date has been updated
product_type_pricing_updated Fired when a product type base pricing has been updated. Note: Price of Product type may be different per date, please use the Product types pricing API endpoint to get the latest pricing based on dates
booking_status_updated Fired whenever the booking's status changes
booking_data_updated Fired whenever there is change in booking's data, excluding status
booking_tickets_updated Fired when vouchers for an approved booking has been generated or updated and is ready to be downloaded

Webhooks Security

In order to ensure the origin of the webhook call, you need to use payload signing.
In the Agents Marketplace webhooks configuration page, you can (re)generate your hash secret key, which will be used to create HMAC for the webhook call.
Signature is a sha256 HMAC of the payload in JSON format with your hash secret key. It is based on values of 2 fields. "type", "timestamp" concatenated using |.
Example checking of Signature in PHP:
Note* Webhook will only be activated when the hash secret key has been generated. Please make sure you have generated the hash secret key


$json = json_decode($request->getBody(), true);
$signature = $json['signature'];
$payload = $json;
$signature === hash_hmac('sha256', $payload['type'].'|'.$payload['timestamp'], 'MY_WEBHOOK_SECRET_KEY');


Steps in Configuring Webhooks

  • Create a webhook event handler in your server
  • The main task for this webhook handler is to receive the payload from our Webhooks server, save it as a job in your server queue and then return a http 200 response. You must ensure it is able to return a response within 20 second
  • Create a job in your server to loop through the server queue and process each of the job accordingly
  • Login to Agents MarketPlace
  • Click on API and then Webhooks 3 tab
  • Generate a webhook hash secret key by clicking on the "Generate" button
  • Input a valid URL's of your event handler in each of the webhooks event
  • Update the webhooks event handler in your server to use this new secret key
  • Start testing your webhooks event handler

Webhooks event JSON Payload Samples

  • product_available

    
    {
        "type": "product_available",
        "data": {
                "uuid": "862a4a30-533f-57dc-94d0-dab9d59bacc5",
                "updatedAt": "2019-01-18 15:30:35",
                "title": "Sentosa Day Fun Pass",
                "titleTranslated": "Sentosa Day Fun Pass",
                "description": "Discover endless fun and surprises at Sentosa from alluring attractions, pristine beaches, action-packed activities and lush rainforests. To get the most out of your trip, all you need is the Sentosa FUN Pass — your ticket to The State of Fun!\n\nWhether you’re a thrill-seeker, nature lover, or simply out for some family fun, there’s definitely something for you with the Day Fun Pass, which offers you the freedom to cover up to 18 exciting attractions! Experience three, five, or all 18 attractions.",
                "descriptionTranslated": "Discover endless fun and surprises at Sentosa from alluring attractions, pristine beaches, action-packed activities and lush rainforests. To get the most out of your trip, all you need is the Sentosa FUN Pass — your ticket to The State of Fun!\n\nWhether you’re a thrill-seeker, nature lover, or simply out for some family fun, there’s definitely something for you with the Day Fun Pass, which offers you the freedom to cover up to 18 exciting attractions! Experience three, five, or all 18 attractions.",
                "highlights": "Experience the favourite attractions and activities in Sentosa\nChoose among 18 exciting attractions with up to 70% savings\nDecide on the spot which attractions you want to visit",
                "highlightsTranslated": "Experience the favourite attractions and activities in Sentosa\nChoose among 18 exciting attractions with up to 70% savings\nDecide on the spot which attractions you want to visit",
                "additionalInfo": "Notes:\n- The price of Fun Passes excludes island admission and Cable Car Sentosa Line.\n- Each ticket allows one visit per attraction per person only.\n",
                "additionalInfoTranslated": "Notes:\n- The price of Fun Passes excludes island admission and Cable Car Sentosa Line.\n- Each ticket allows one visit per attraction per person only.\n",
                "covid19Measures":  "Information on Covid-19 notice of Safety Standards of visiting the attractions",
                "covid19MeasuresTranslated": "Information on Covid-19 notice of Safety Standards of visiting the attractions on requested language",
                "priceIncludes": "Admission fee",
                "priceIncludesTranslated": "Admission fee",
                "priceExcludes": "Transfer services\nPersonal expenses\nTips",
                "priceExcludesTranslated": "Transfer services\nPersonal expenses\nTips",
                "validFrom": null,
                "validThrough": null,
                "itinerary": "",
                "itineraryTranslated": "",
                "warnings": "- In cases of extreme weather conditions, this tour may be cancelled. Your host will contact you directly.\n\nSafety and insurance:\n- Children must be accompanied by a paying adult at all times.",
                "warningsTranslated": "- In cases of extreme weather conditions, this tour may be cancelled. Your host will contact you directly.\n\nSafety and insurance:\n- Children must be accompanied by a paying adult at all times.",
                "safety": null,
                "safetyTranslated": null,
                "latitude": "1.2485520",
                "longitude": "103.8304437",
                "minPax": 1,
                "maxPax": 60,
                "basePrice": 45.58,
                "currency": {
                    "code": "SGD",
                    "symbol": "S$",
                    "uuid": "cd15153e-dfd1-5039-8aa3-115bec58e86e"
                },
                "isFlatPaxPrice": true,
                "reviewCount": 1,
                "reviewAverageScore": 4,
                "typeName": "Attraction",
                "typeUuid": "d3c54653-dd05-598f-b193-f6683d1064ab",
                "photosUrl": "https://s3.amazonaws.com/playground.bemyguest.com.sg",
                "businessHoursFrom": "09:00",
                "businessHoursTo": "22:00",
                "averageDelivery": 567,
                "hotelPickup": false,
                "airportPickup": false,
                "hasOptions": false,
                "allProductTypesHaveOptions": false,
                "photos": [
                    {
                        "caption": null,
                        "uuid": "f6f289e9-3545-51d4-9530-c4b5dfe1f5d8",
                        "paths": {
                            "original": "/images/content/original/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "75x50": "/images/content/75x50/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "175x112": "/images/content/175x112/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "680x325": "/images/content/680x325/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    },
                    {
                        "caption": null,
                        "uuid": "9a03285e-e0d9-5c6b-b2d9-630aa466fd34",
                        "paths": {
                            "original": "/images/content/original/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "75x50": "/images/content/75x50/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "175x112": "/images/content/175x112/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "680x325": "/images/content/680x325/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    },
                    {
                        "caption": null,
                        "uuid": "1c00c548-99aa-5f30-8bd9-b2d42579f339",
                        "paths": {
                            "original": "/images/content/original/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "75x50": "/images/content/75x50/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "175x112": "/images/content/175x112/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "680x325": "/images/content/680x325/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    }
                ],
                "categories": [
                    {
                        "name": "Themeparks",
                        "uuid": "9384f408-a941-58ba-b958-4a814c23d1bc"
                    }
                ],
                "locations": [
                    {
                        "city": "Sentosa",
                        "cityUuid": "29ad1bd7-2000-5321-aff8-f71a6464142b",
                        "state": "Sentosa",
                        "stateUuid": "ab7d9ac9-036d-11e5-a2a9-d07e352b4840",
                        "country": "Singapore",
                        "countryUuid": "885e90a3-a83d-56d3-b5e8-040b4017c825"
                    }
                ],
                "guideLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "audioHeadsetLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "writtenLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/862a4a30-533f-57dc-94d0-dab9d59bacc5"
                    },
                    {
                        "method": "GET",
                        "rel": "productTypes",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/862a4a30-533f-57dc-94d0-dab9d59bacc5/product-types"
                    }
                ],
                "translationLanguages": [
                    {
                        "code": "ZH-HANS",
                        "name": "chinese_simplified",
                        "uuid": "d182fbd9-4520-5c66-a513-94fcd3d46d9b"
                    }
                ]
        },
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
    
           

  • product_updated

    
    {
        "type": "product_updated",
        "data": {
                "uuid": "862a4a30-533f-57dc-94d0-dab9d59bacc5",
                "updatedAt": "2019-01-18 15:30:35",
                "title": "Sentosa Day Fun Pass",
                "titleTranslated": "Sentosa Day Fun Pass",
                "description": "Discover endless fun and surprises at Sentosa from alluring attractions, pristine beaches, action-packed activities and lush rainforests. To get the most out of your trip, all you need is the Sentosa FUN Pass — your ticket to The State of Fun!\n\nWhether you’re a thrill-seeker, nature lover, or simply out for some family fun, there’s definitely something for you with the Day Fun Pass, which offers you the freedom to cover up to 18 exciting attractions! Experience three, five, or all 18 attractions.",
                "descriptionTranslated": "Discover endless fun and surprises at Sentosa from alluring attractions, pristine beaches, action-packed activities and lush rainforests. To get the most out of your trip, all you need is the Sentosa FUN Pass — your ticket to The State of Fun!\n\nWhether you’re a thrill-seeker, nature lover, or simply out for some family fun, there’s definitely something for you with the Day Fun Pass, which offers you the freedom to cover up to 18 exciting attractions! Experience three, five, or all 18 attractions.",
                "highlights": "Experience the favourite attractions and activities in Sentosa\nChoose among 18 exciting attractions with up to 70% savings\nDecide on the spot which attractions you want to visit",
                "highlightsTranslated": "Experience the favourite attractions and activities in Sentosa\nChoose among 18 exciting attractions with up to 70% savings\nDecide on the spot which attractions you want to visit",
                "additionalInfo": "Notes:\n- The price of Fun Passes excludes island admission and Cable Car Sentosa Line.\n- Each ticket allows one visit per attraction per person only.\n",
                "additionalInfoTranslated": "Notes:\n- The price of Fun Passes excludes island admission and Cable Car Sentosa Line.\n- Each ticket allows one visit per attraction per person only.\n",
                "covid19Measures":  "Information on Covid-19 notice of Safety Standards of visiting the attractions",
                "covid19MeasuresTranslated": "Information on Covid-19 notice of Safety Standards of visiting the attractions on requested language",
                "priceIncludes": "Admission fee",
                "priceIncludesTranslated": "Admission fee",
                "priceExcludes": "Transfer services\nPersonal expenses\nTips",
                "priceExcludesTranslated": "Transfer services\nPersonal expenses\nTips",
                "validFrom": null,
                "validThrough": null,
                "itinerary": "",
                "itineraryTranslated": "",
                "warnings": "- In cases of extreme weather conditions, this tour may be cancelled. Your host will contact you directly.\n\nSafety and insurance:\n- Children must be accompanied by a paying adult at all times.",
                "warningsTranslated": "- In cases of extreme weather conditions, this tour may be cancelled. Your host will contact you directly.\n\nSafety and insurance:\n- Children must be accompanied by a paying adult at all times.",
                "safety": null,
                "safetyTranslated": null,
                "latitude": "1.2485520",
                "longitude": "103.8304437",
                "minPax": 1,
                "maxPax": 60,
                "basePrice": 45.58,
                "currency": {
                    "code": "SGD",
                    "symbol": "S$",
                    "uuid": "cd15153e-dfd1-5039-8aa3-115bec58e86e"
                },
                "isFlatPaxPrice": true,
                "reviewCount": 1,
                "reviewAverageScore": 4,
                "typeName": "Attraction",
                "typeUuid": "d3c54653-dd05-598f-b193-f6683d1064ab",
                "photosUrl": "https://s3.amazonaws.com/playground.bemyguest.com.sg",
                "businessHoursFrom": "09:00",
                "businessHoursTo": "22:00",
                "averageDelivery": 567,
                "hotelPickup": false,
                "airportPickup": false,
                "hasOptions": false,
                "allProductTypesHaveOptions": false,
                "photos": [
                    {
                        "caption": null,
                        "uuid": "f6f289e9-3545-51d4-9530-c4b5dfe1f5d8",
                        "paths": {
                            "original": "/images/content/original/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "75x50": "/images/content/75x50/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "175x112": "/images/content/175x112/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "680x325": "/images/content/680x325/f6f289e9-3545-51d4-9530-c4b5dfe1f5d8.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    },
                    {
                        "caption": null,
                        "uuid": "9a03285e-e0d9-5c6b-b2d9-630aa466fd34",
                        "paths": {
                            "original": "/images/content/original/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "75x50": "/images/content/75x50/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "175x112": "/images/content/175x112/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "680x325": "/images/content/680x325/9a03285e-e0d9-5c6b-b2d9-630aa466fd34.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    },
                    {
                        "caption": null,
                        "uuid": "1c00c548-99aa-5f30-8bd9-b2d42579f339",
                        "paths": {
                            "original": "/images/content/original/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "75x50": "/images/content/75x50/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "175x112": "/images/content/175x112/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "680x325": "/images/content/680x325/1c00c548-99aa-5f30-8bd9-b2d42579f339.jpg",
                            "1280x720": null,
                            "1920x1080": null,
                            "2048x1536": null
                        }
                    }
                ],
                "categories": [
                    {
                        "name": "Themeparks",
                        "uuid": "9384f408-a941-58ba-b958-4a814c23d1bc"
                    }
                ],
                "locations": [
                    {
                        "city": "Sentosa",
                        "cityUuid": "29ad1bd7-2000-5321-aff8-f71a6464142b",
                        "state": "Sentosa",
                        "stateUuid": "ab7d9ac9-036d-11e5-a2a9-d07e352b4840",
                        "country": "Singapore",
                        "countryUuid": "885e90a3-a83d-56d3-b5e8-040b4017c825"
                    }
                ],
                "guideLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "audioHeadsetLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "writtenLanguages": [
                    {
                        "name": "english",
                        "uuid": "790395c0-23b6-5dd9-8a6b-ca61b95dcfd4"
                    }
                ],
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/862a4a30-533f-57dc-94d0-dab9d59bacc5"
                    },
                    {
                        "method": "GET",
                        "rel": "productTypes",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/862a4a30-533f-57dc-94d0-dab9d59bacc5/product-types"
                    }
                ],
                "translationLanguages": [
                    {
                        "code": "ZH-HANS",
                        "name": "chinese_simplified",
                        "uuid": "d182fbd9-4520-5c66-a513-94fcd3d46d9b"
                    }
                ]
        },
        "updatedFields": [
            "photos", 
            "warnings"
        ]
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
            

  • product_type_available

    
    {
        "type": "product_type_available",
        "productUuid": "862a4a30-533f-57dc-94d0-dab9d59bacc5",
        "productTypeUuid": "b92e76dc-6953-40dc-b0e6-8bb600f8e5b3",
        "endpoint": "https://api.demo.bemyguest.com.sg/v2/product-types/b92e76dc-6953-40dc-b0e6-8bb600f8e5b3/price-lists",
        "timestamp": "2019-08-29T13:45:52+08:00",
        "signature": "6c2e4efed3f902612ef1b9367221a7b3002c79d6714c5a183cafc4eda173ede2"
    }
            

  • product_type_not_available

    
    {
        "type": "product_type_not_available",
        "productUuid": "862a4a30-533f-57dc-94d0-dab9d59bacc5",
        "productTypeUuid": "e96a52d5-9488-5891-bf5a-ce60caec8d1f",
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
            

  • product_type_content_updated

    
    {
        "type": "product_type_content_updated",
        "data": {
                "uuid": "e96a52d5-9488-5891-bf5a-ce60caec8d1f",
                "title": "Fun Pass Play 3",
                "titleTranslated": "Fun Pass Play 3",
                "description": "Choose Fun Pass Play 3 to play 3 out of 18 attractions",
                "descriptionTranslated": "Choose Fun Pass Play 3 to play 3 out of 18 attractions",
                "durationDays": 0,
                "durationHours": 12,
                "durationMinutes": 0,
                "daysInAdvance": null,
                "cutOffTime": null,
                "firstAvailabilityDate": "2019-07-22",
                "isNonRefundable": true,
                "allowAdults": true,
                "minPax": 1,
                "maxPax": 60,
                "minAdultAge": 13,
                "maxAdultAge": 100,
                "hasChildPrice": true,
                "allowChildren": true,
                "minChildren": 0,
                "maxChildren": 20,
                "minChildAge": 3,
                "maxChildAge": 12,
                "allowSeniors": false,
                "minSeniors": null,
                "maxSeniors": null,
                "minSeniorAge": null,
                "maxSeniorAge": null,
                "allowInfant": false,
                "minInfantAge": null,
                "maxInfantAge": null,
                "maxGroup": null,
                "minGroup": null,
                "instantConfirmation": true,
                "nonInstantVoucher": true,
                "directAdmission": false,
                "voucherUse": "You will receive a voucher by email. It contains all the information for this activity. You will need to present this voucher.",
                "voucherUseTranslated": "You will receive a voucher by email. It contains all the information for this activity. You will need to present this voucher.",
                "voucherRedemptionAddress": "Sentosa Ticketing Counters\n- Beach Station (09:00 to 21:00)\n- Fort Siloso (10:00 to 17:30)\n- Imbiah Forecourt (09:00 to 18:00)\n- Imbiah Lookout (10:00 to 19:00)\n- Merlion Plaza (09:00 to 20:00)\n- Sentosa Boardwalk (09:00 to 17:00)\n- Sentosa Station, VivoCity, Lobby L, Level 3 (09:00 to 21:00) \n- Sentosa Merlion (10:00 to 19:30)\n- Waterfront Station (09:00 to 16:00)",
                "voucherRedemptionAddressTranslated": "Sentosa Ticketing Counters\n- Beach Station (09:00 to 21:00)\n- Fort Siloso (10:00 to 17:30)\n- Imbiah Forecourt (09:00 to 18:00)\n- Imbiah Lookout (10:00 to 19:00)\n- Merlion Plaza (09:00 to 20:00)\n- Sentosa Boardwalk (09:00 to 17:00)\n- Sentosa Station, VivoCity, Lobby L, Level 3 (09:00 to 21:00) \n- Sentosa Merlion (10:00 to 19:30)\n- Waterfront Station (09:00 to 16:00)",
                "voucherRequiresPrinting": false,
                "meetingTime": null,
                "meetingAddress": null,
                "meetingLocation": "Make your own way\nto Sentosa Ticketing Counters",
                "meetingLocationTranslated": "Make your own way\nto Sentosa Ticketing Counters",
                "cancellationPolicies": [],
                "recommendedMarkup": 6.67,
                "childRecommendedMarkup": null,
                "seniorRecommendedMarkup": null,
                "adultParityPrice": null,
                "childParityPrice": null,
                "seniorParityPrice": null,
                "adultGateRatePrice": 0,
                "childGateRatePrice": 0,
                "seniorGateRatePrice": null,
                "validity": {
                    "type": "after_issue_date",
                    "days": 90,
                    "date": null,
                    "hasBatchValidityDate": false
                },
                "timeslots": [],
                "options": {
                    "perBooking": [],
                    "perPax": []
                },
                "hasOptions": false,
                "hasFileUploadOptions": false,
                "hasPriceOptions": false,
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "https://api.demo.bemyguest.com.sg/v2/product-types/e96a52d5-9488-5891-bf5a-ce60caec8d1f"
                    },
                    {
                        "method": "GET",
                        "rel": "product",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/862a4a30-533f-57dc-94d0-dab9d59bacc5"
                    },
                    {
                        "method": "GET",
                        "rel": "priceLists",
                        "href": "https://api.demo.bemyguest.com.sg/v2/product-types/e96a52d5-9488-5891-bf5a-ce60caec8d1f/price-lists"
                    }
                ]
        },
        "updatedFields": [
            "minPax",
            "minChildren"
        ],
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
           

  • product_type_availability_updated

    
    {
        "productTypeUuid": "608a63b6-bdf7-4413-942c-7ad827d6f037",
        "dates": {
            "blackouts": {
                "0": "2019-01-22",
                "1": "2019-01-23",
                "2": "2019-03-06",
                "3": "2019-03-07"
            }
        },
        "type": "product_type_availability_updated",
        "timestamp": "2020-01-28T11:48:54+08:00",
        "signature": "056b7bc898cee89d38b92df71c0f90e3ea76dc172e1ebf3008d7fb2aff5c2365"
    }
           

  • product_type_pricing_updated

    
    {
        "type": "product_type_pricing_updated",
        "productTypeUuid": "e96a52d5-9488-5891-bf5a-ce60caec8d1f",
        "endpoint": "https://api.demo.bemyguest.com.sg/v2/product-types/e96a52d5-9488-5891-bf5a-ce60caec8d1f/price-lists",
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
           

  • booking_status_updated

    
     {
        "type": "booking_status_updated",
        "bookingUuid": "aae5cbca-c065-31c3-ab49-21fc53fade89"
        "previousStatus": "waiting",
        "currentStatus": "approved",
        "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
           

  • booking_data_updated

    
    {
        "type": "booking_data_updated",
        "bookingUuid": "aae5cbca-c065-31c3-ab49-21fc53fade89",
        "data": {
                "uuid": "aae5cbca-c065-31c3-ab49-21fc53fade89",
                "code": "2D5AD6G",
                "partnerReference": "Test-12345566",
                "status": "approved",
                "productTypeTitle": "National Orchid Garden E-ticket",
                "productTypeTitleTranslated": "National Orchid Garden E-ticket",
                "productTypeUuid": "f57358a6-4854-5d36-8eaf-0cecc053af59",
                "currencyCode": "SGD",
                "currencyUuid": "cd15153e-dfd1-5039-8aa3-115bec58e86e",
                "totalAmount": 2.84,
                "amountBreakdown": [
                    {
                        "name": "adult",
                        "quantity": 1,
                        "price": "2.84"
                    }
                ],
                "arrivalDate": "2019-08-12",
                "createdAt": "2019-08-11 14:18:52",
                "updatedAt": "2019-08-11 14:20:06",
                "salutation": "Mr.",
                "firstName": "Tester",
                "lastName": null,
                "email": "tester@bemyguest.com.sg",
                "phone": "+6512345678",
                "adults": 1,
                "children": 0,
                "seniors": null,
                "options": [],
                "completedAt": "2019-07-21 14:20:06",
                "cancellationRequestAt": null,
                "cancellationRequestStatus": "none",
                "cancellationStatus": null,
                "refundDate": null,
                "refundAmount": null,
                "refundTransaction": null,
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "https://api.demo.bemyguest.com.sg/v2/bookings/aae5cbca-c065-31c3-ab49-21fc53fade89"
                    },
                    {
                        "method": "GET",
                        "rel": "vouchers",
                        "href": "https://api.demo.bemyguest.com.sg/v2/bookings/aae5cbca-c065-31c3-ab49-21fc53fade89/vouchers"
                    },
                    {
                        "method": "GET",
                        "rel": "productType",
                        "href": "https://api.demo.bemyguest.com.sg/v2/product-types/f57358a6-4854-5d36-8eaf-0cecc053af59"
                    },
                    {
                        "method": "GET",
                        "rel": "product",
                        "href": "https://api.demo.bemyguest.com.sg/v2/products/6aca0761-c17d-56a4-87a2-adddcb987b7c"
                    }
                ]
        },
        "updatedFields": [
            "arrivalDate",
            "phone"
        ],
       "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
            

  • booking_tickets_updated

    
    { 
        "type": "booking_tickets_updated",
        "bookingUuid": "aae5cbca-c065-31c3-ab49-21fc53fade89"
        "data": [
              {
                "uuid": "45dffgg-g6h8-3f6j-6789-93b1dc90ba72",
                "generatedAt": "2019-07-22 14:19:57",
                "downloadedAt": null,
                "links": [
                    {
                        "method": "GET",
                        "rel": "download",
                        "href": "https://api.demo.bemyguest.com.sg/v2/bookings/aae5cbca-c065-31c3-ab49-21fc53fade89/download-voucher/9f5a925e-70ca5678-5566-f11f25d6c5fb"
                    },
                    {
                        "method": "GET",
                        "rel": "booking",
                        "href": "https://api.demo.bemyguest.com.sg/v2/bookings/aae5cbca-c065-31c3-ab49-21fc53fade89"
                    }
                ]
              }
        ],
       "signature": "gdfhgy786g78dfg7d7f8gdfghgfhgk6786786868",
        "timestamp": "2020-11-27T18:00:27+08:00"
    }
           

Webhooks event JSON Response Sample


 {
    "code": 200,
    "message": "success",
    "timestamp": "2020-11-27T18:00:27+08:00"
}