将json发送到v4.0.0 / book / flights / seatmaps?mode = seatmaps时出错

时间:2017-07-19 12:46:05

标签: json spring api sabre

当我将测试json发送到座位图时,我收到错误消息。 API资源管理器也返回500错误。

方法:POST 网址:https://api-crt.cert.havail.sabre.com/v4.0.0/book/flights/seatmaps?mode=seatmaps

我正在传递有效的Bearer令牌并将content-type设置为application / json

以下JSON是我发布的内容:

{
  "EnhancedSeatMapRQ": {
    "SeatMapQueryEnhanced": {
      "RequestType": "Payload",
      "Flight": {
        "destination": "SAN",
        "origin": "ATL",
        "DepartureDate": {
          "content": "2017-10-23"
        },
        "ArrivalDate": {
          "content": "2017-10-23"
        },
        "Operating": {
          "carrier": "DL",
          "content": "1692"
        },
        "Marketing": [
          {
            "carrier": "DL",
            "content": "1692"
          }
        ]
      },
      "CabinDefinition": {
        "RBD": "Y"
      }
    }
  }
}

我从API收到以下错误:

{
  "status": "NotProcessed",
  "reportingSystem": "RAF",
  "timeStamp": "2017-07-19T12:27:54+00:00",
  "type": "Validation",
  "errorCode": "ERR.RAF.VALIDATION",
  "instance": "raf-darhlc005-9080",
  "message": "Required request body is missing: public org.springframework.http.ResponseEntity com.sabre.rest.facade.controller.j2x.RestToSoapController.postRestToSoap(java.lang.String,javax.servlet.http.HttpServletRequest,boolean) throws java.lang.Throwable"
}

1 个答案:

答案 0 :(得分:1)

只有当我没有发送任何内容时才能收到错误,当我添加了一个有效负载时,我得到了一个成功的响应(下面是我使用Postman测试的屏幕截图)。 / p>

Image of test