I am trying to make a POST request to the Sabre CarAvailability API with Postman. When I make the request I get back the following error: Username value length exceeds 20 characters.
- I obtained a bearer token and added it to the authorization section of my request
- I added the
carAvailabilityRequest
object as raw data, in the body section of the request. - I tried changing the values of this object, but so far without luck. I know I am doing something wrong but I have no idea what.
Here is the carAvailabilityRequest object I passed:
{
"OTA_VehAvailRateRQ":
{
"TimeStamp": "string",
"Version": "string",
"ReturnHostCommand": true,
"VehAvailRQCore":
{
"RPH": 0,
"QueryType": "Quote",
"VehRentalCore":
{
"PickUpDateTime": "03-31T09:00",
"ReturnDateTime": "04-05T11:00",
"PickUpLocation":
{
"LocationCode": "DFW",
"CityLocation": "string"
},
"ReturnLocation":
{
"LocationCode": "DFW"
}
}
}
}
}
The request does not get through and I get the following error message:
{
"Fault": {
"faultcode": "{http://schemas.xmlsoap.org/soap/envelope/}Client.EbXmlFieldTooLong",
"faultstring": "Username value length exceeds 20 characters",
"detail": {
"StackTrace": [
"com.sabre.universalservices.base.exception.InvalidEbXMLException: errors.xml.USG_EBXML_FIELD_TOO_LONG"
]
}
},
"Links": [
{
"rel": "self",
"href": "https://api-crt.cert.havail.sabre.com/v2.4.1/shop/cars"
},
{
"rel": "linkTemplate",
"href": "https://api-crt.cert.havail.sabre.com/<version>/shop/cars"
}
]
}
Please help me solve this issue - thanks in advance.