我正在尝试使用 Sabre REST API - 获取 Rbd 的 Cabin (/v1.0.0/rbd/cabin)
根据页面描述: 必填信息为承运人代码、RBD(或舱位代码)、旅行航段的出发地和目的地、航班号为必填信息,除非这是开放航段类型。除非是开放航段类型,否则需要旅行日期(出发日期)。
但是,我在 RQ 数据模型中找不到任何可用于将段类型指定为 OPEN 的字段。
曾尝试在 RQ 属性 [flightNumber] 中使用空白、“OPEN”或 null。 API 总是响应“正常航段的航班号不能为空”
{
"segmentItems": {
"segment": [
{
"id": 1,
"carrierCode": "AA",
"bookingCode": "J",
"origin": "DFW",
"destination": "MIA",
"processingDate": "2023-11-13T09:05:06.332Z",
"flightNumber": null
}
]
},
"lang": "EN",
"version": "1.0.0"
}
{
"status": "FAILURE",
"errorItems": {
"error": [
{
"code": "INVALID_REQUEST",
"shortDescription": "javax.validation.ConstraintViolation",
"longDescription": "Flight number can not be null for normal segment",
"refId": 1
}
]
},
"version": "1.0.0",
"lang": "EN"
}
有人知道如何在此 API 中指定“OPEN”段类型吗?
终于收到Saber的正式回复了。对于那些要使用这个 API 的人来说绝对有用
The way to indicate that the segment is an open segment is to change the node "segment" and change it to "opensegment" in the following way:
{
"segmentItems": {
"opensegment": [
Then, eliminate the "flightNumber" and "departureDate" nodes from the request.