POST
/webhookCreate WebHook
This API enables you to set up a webhook endpoint to receive data. It uses the webhook to deliver rate data generated by your shop to the designated endpoint you specify. It is a one time setup post that the rates will be automatically sent to the endpoint at the scheduled date and time. The webhook supports different authentication types including basic and token-based.
POST
/webhookImportant Notes
Authentication types and its descriptions:
- None: No authentication required. Users can access resources without providing any credentials.
- Basic: Username and password required. Users must provide their credentials for verification.
- Bearer: Token-based authentication. Users present a valid access token to access resources.
- Header: API key in header. API key is provided as a specific header value (e.g., X-Api-Key).
This hook will POST the following JSON schema to your endpoint.
{
"shopId": 10,
"dtCollected": "2025-10-09T13:00:11.675Z",
"websiteCode": 2,
"checkIn": "2025-10-28T00:00:00.000Z",
"checkOut": "2025-10-29T00:00:00.000Z",
"los": 1,
"pos": 0,
"guests": 1,
"hotelId": 381072,
"hotelCode": 676700,
"hotelName": "Casa Andina Select Zorritos Tumbes",
"sourceUrl": "https://www.booking.com/hotel/pe/terrazas-de-bocapan.en-gb.html",
"address": "Panamericana Norte Km 1232 - Bocapan",
"city": "Zorritos",
"state": "",
"country": "Peru",
"latitude": "",
"longitude": "",
"currency": "PEN",
"isLAR": true,
"propertyType": "Hotels",
"roomType": "Superior Double Room",
"roomDescription": "bedrooms 0, kitchen 0, beds 1, living room 0, bathroom 0",
"roomAmenities": "",
"mapLink": "https://www.booking.com/hotel/pe/terrazas-de-bocapan.en-gb.html?map=1",
"roomAvailable": "1",
"roomLeft": "4",
"reviewRating": 8.7,
"reviewsCount": 422,
"taxAmount": 46,
"taxType": "Excluded",
"taxStatus": 2,
"mealPlan": "Breakfast included",
"ratePlan": "FreeCancellation",
"locationRating": 0,
"promo": "",
"ratingText": "Fabulous",
"onsiteRate": 462.7,
"netRate": 0,
"discount": 0,
"occupancy": 1,
"paymentType": "Pay at the property",
"rankingListingCount": 1,
"navigationPage": 1,
"newArrival": "",
"distanceHotel": 6,
"otherInformation": "",
"statusCode": 200,
"otherRatings": {
"htlRating": 4,
"aptRating": 0,
"dotsRating": 0
},
"ratingFlags": {
"preferredPartner": true,
"preferredPlus": false
}
}Parameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
» endpoint | body | Required | none | |
» authType | body | string | Required | none |
» userName | body | string | Optional | none |
» password | body | string | Optional | none |
» token | body | string | Optional | none |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | OK | Webhook created successfully | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Authentication Failed or Account validity Expired | None |
| 429 | Too Many Requests | Too Many Requests | None |
| 500 | Internal Server Error | Internal Server Error | None |
Example Request
# You can also use wget
curl -X POST /webhook \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'Body parameter
{
"endpoint": "https://sampleendpoint.com/webhook",
"authType": "basic",
"userName": "sampleuser",
"password": "testpassword",
"token": ""
}Example responses
201 Response
{
"message": "Webhook Created Successfully"
}Need Support?
Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.