我正在尝试通过邮递员向Saber CarAvailability API发出POST请求。当我发出请求时,我得到以下错误:用户名值长度超过20个字符。
我获得了承载令牌并将其添加到请求的授权部分
我carAvailabilityRequest
在请求的主体部分中将对象作为原始数据添加。
我尝试更改此对象的值,但到目前为止还算不上运气。我知道我做错了事,但我不知道该怎么办。
这是我传递的carAvailabilityRequest对象:
{
"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"
}
}
}
}
}
该请求未通过,并且我收到以下错误消息:
{
"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"
}
]
}
请帮助我解决此问题-预先感谢。
相关分类