Skip to content

Return hotel rules (reference payload).

Request

Available January 2023. Hotel Rules retrieves the rules associated with a specific rate. The reference payload references an offer by sending the unique offer ID from an Availability response, instead of sending all required offer details as in the full payload Rules request. The response for both the reference and full payload is the same.

Security
bearerAuth
Headers
TraceIdstring, [ 10 .. 89 ] characters(^[a-zA-Z-0-9_]*[-]?[+]?$)

Used in hospitality workflows to provide a Unique transaction or tracking id for a single request and response.

Example:TraceID_123456789
XAUTH_TRAVELPORT_ACCESSGROUPstring, = 36 characters([a-zA-Z-0-9-_]*)

Identifies the Travelport access group with which the caller is associated

Example:19Y88702-C27A-4E5D-829A-89D7016688B1
TVP-PCC-Corestring^[a-zA-Z\d]{3,4}_\w{2}$

Allows user to pass PCC instead of Access Group ID

Example:DU7_1G
TVP-Correlation-Idstring, (uuid)

Identifier used to correlate hotel API invocations across a multi-call business flows.

Example:382c74c3-721d-4f34-80e5-57657b6cbc27
Bodyapplication/jsonrequired
OfferQueryBuildFromCatalogOfferingobject(OfferQueryBuildFromCatalogOffering)

Used for a Hotel Rules (Reference Payload) request. Defines a request to retrieve the rules associated with a specific rate by referencing a selected offer from a preceding Hotel Availability response. This request is typically sent directly after Hotel Availability and before booking. If the cached offer expires, a new Hotel Availability request must be sent.

curl -i -X POST \
  https://developer.travelport.com/_mock/apis/stays/hotel/rules/offershospitality/buildfromcatalogoffering \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'TVP-Correlation-Id: 382c74c3-721d-4f34-80e5-57657b6cbc27' \
  -H 'TVP-PCC-Core: DU7_1G' \
  -H 'TraceId: TraceID_123456789' \
  -H 'XAUTH_TRAVELPORT_ACCESSGROUP: 19Y88702-C27A-4E5D-829A-89D7016688B1' \
  -d '{
    "OfferQueryBuildFromCatalogOffering": {
      "@type": "OfferQueryBuildFromCatalogOffering",
      "BuildFromCatalogOfferingHospitality": {
        "@type": "BuildFromCatalogOfferingHospitality",
        "CatalogOfferingIdentifier": {
          "value": "c122d8e9-6563-4139-a9c7-99334e5a052e:898e8fab584bb2b787a41fe9f95ce9b3"
        }
      }
    }
  }'

Responses

OK - Successful Response - 200

Bodyapplication/json
OfferHospitalityResponseobject(OfferHospitalityResponse)

The response of a Hotel Rules (Reference Payload) or Hotel Rules (Full Payload) endpoint request.

Response
{ "OfferHospitalityResponse": { "Offer": { "@type": "Offer", "id": "offer_1", "offerRef": "offer_1", "Identifier": {}, "ContentSource": "GDS", "parentOfferRef": "offer_1", "offerModifyRef": "string", "Product": [], "Price": {}, "TermsAndConditionsFull": [], "passiveOfferInd": true, "scheduleChangeInd": true }, "@type": "response", "transactionId": "49f58f5f-c443-43b4-9f5d-be405fd00a01", "traceId": "TraceID_123456", "correlationId": "48fb4cd3-2ef6-4479-bea1-7c92721b988c", "reservationStatus": "Success", "Result": { "@type": "Result", "status": "Complete", "Error": [], "Warning": [] }, "Identifier": { "value": "A0656EFF-FAF4-456F-B061-0161008D7C4E", "authority": "TVPT" }, "NextSteps": { "baseURI": "string", "id": "5", "NextStep": [] }, "ReferenceList": [ {} ], "CurrencyRateConversion": [ {} ], "Pagination": { "@type": "Pagination", "page": 1, "pageSize": 20, "totalPages": 5, "totalItems": 100 } } }