POST/hooks/rate

Create Rate

This API call uses a WebHook to deliver the rate data generated by your RateShop to a designated endpoint you specify. If a hook is defined, the rates will be automatically sent to this endpoint once the queue is completed.

Authentication types and its descriptions:
1. None - No authentication required. Users can access resources without providing any credentials.
2. Basic - Username and password required. Users must provide their credentials for verification.
3. Bearer - Token-based authentication. Users present a valid access token to access resources.
4. Header - API key in header: API key is provided as a specific header value (e.g., X-Api-Key).
POST/hooks/rate

Parameter Details

NameInTypeRequiredDescription
bodybodyRequirednone

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestBad RequestNone
401UnauthorizedAuthentication Failed or Account validity expiredNone
500Internal Server ErrorInternal server errorNone

Example Request

# You can also use wget
curl -X POST /hooks/rate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "endpoint": "string",
  "authtype": "string",
  "username": "string",
  "password": "string",
  "token": "string"
}

Example responses

200 Response
{
  "requestid": "string",
  "message": "string"
}

This hook will POST the following JSON schema to your endpoint.

{
  "queueId": 31595295,
  "rateshopId": 28796129,
  "hotelCode": 48436,
  "subjectHotelCode": null,
  "websiteCode": 1,
  "dtCollected": "2024-09-17T04:04:15.286Z",
  "checkIn": "2024-09-19",
  "checkOut": "2024-09-20",
  "los": 1,
  "guests": 1,
  "roomType": "Premier Room",
  "onsiteRate": 218,
  "netRate": 0,
  "currency": "USD",
  "roomDescription": "''Reserve now, pay later'', ''Free WiFi'', ''Continental breakfast'', ''Early check-in'', '' 2'', ''1 Queen Bed''",
  "ratePlan": "Fully refundable Before Tue, Sep 17  Pay_Later",
  "mealPlan": "breakfast_included",
  "roomAmenities": "[{\"Bathroom\": \"  Bathtub or shower  Free toiletries  Hair dryer  Towels  '', ''Bedroom\": \"  Bed sheets  Blackout drapes/curtains  Heating  Separate bedroom  '', ''Entertainment\": \"   Cable channels   Flat-screen TV  '', ''Food and drink\": \"  Coffee/tea maker  '', ''Internet\": \"  Free WiFi  '', ''More\": \"  Daily housekeeping  Desk  Electrical adapters/chargers  Individually decorated  Individually furnished  Iron/ironing board  Phone  Safe  \"}]",
  "occupancy": 2,
  "sourceUrl": "https://www.expedia.com/San-Francisco-Hotels-Cornell-Hotel-De-France.h1222727.Hotel-Information?chkin=2024-09-19&chkout=2024-09-20&rm1=a1&currency=USD&rooms-and-rates&langid=2057",
  "isPromo": false,
  "closed": false,
  "discount": 0,
  "promoName": "",
  "roomTypeCode": 5,
  "ratePlanCode": 3,
  "mealPlanCode": 6,
  "statusCode": 200,
  "taxStatus": 2,
  "taxType": "Excludes taxes and fees",
  "taxAmount": 0,
  "pos": 0,
  "isRatePerStay": "Y",
  "minStay": null,
  "optionalExtras": "",
  "payPlan": "Pay_Later",
  "channelType": "OTA"
}

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.