POST/hooks/rate

Create Rate

Implementation Notes

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:
  • 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.
POST/hooks/rate

Parameter Details

NameInTypeRequiredDescription
bodybodyOptionalnone
» endpointbodystringOptionalnone
» authtypebodystringOptionalnone
» usernamebodystringOptionalnone
» passwordbodystringOptionalnone
» tokenbodystringOptionalnone

Responses

StatusMeaningDescriptionSchema
200OKSuccessNone
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

{
 "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¤cy=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"
}

Example responses

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

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.