Message Headers

HTTP Headers

Two HTTP headers are mandatory: Content-Type and Authorization.

  • The Content-Type header should have three parts separated by a semicolon: The MIME type, character encoding standard (charset), and SOAP action.
  • The Authorization header should have the value "Bearer" followed by a space and then the access token retrieved from the STR Identity Server.

Example HTTP Header

Copy
Content-Type: application/soap+xml; charset=utf-8;
action="http://api.str.com/datasubmission/v1_0/OTA_HotelStatsNotifRQ_SubmitRequest"
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI

SOAP Headers

htnga:CorrelationID – A unique identifier that is used to correlate the submitted data to the request. The Correlation ID is returned in the response. The Correlation ID should be unique for each request. It can be any character value up to 256 characters in length, however GUIDs are suggested.

Example SOAP Header

Copy
<soapenv:Header xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> 
  <htnga:CorrelationID xmlns:htnga="http://htng.org/PWSWG/2007/02/AsyncHeaders">e328c5eb-8dda-48ab-84e7-16ddc95e6e9e</htnga:CorrelationID>
</soapenv:Header>

 

Next topic: Request Message