ShipStation订单创建

时间:2019-06-20 16:56:36

标签: c# asp.net-mvc asp.net-mvc-4 asp.net-core-mvc

尝试创建订单时,我们遇到以下错误。我们正在使用Ship Staion真实帐户。

{
    "Message": "The request is invalid.",
    "ModelState": {
        "apiOrder.orderNumber": [
            "The orderNumber field is required."
        ],
        "apiOrder.orderDate": [
            "The orderDate field is required."
        ],
        "apiOrder.orderStatus": [
            "The orderStatus field is required."
        ],
        "apiOrder.billTo": [
            "The billTo field is required."
        ],
        "apiOrder.shipTo": [
            "The shipTo field is required."
        ]
    }
}

Post模型如下所示。我还添加了正确的授权。

{
   "order": {
      "orderNumber": "6",
      "orderDate": "06/19/2019 10:39",
      "orderStatus": "Processing",
      "billTo": {
            "Name": "John Smith",
            "Company": "Nop Solutions Ltd",
            "Phone": "12345678",
            "Email": "admin@yourStore.com"
         },
      "shipTo": {
            "Name": "John Smith",
            "Company": "Nop Solutions Ltd",
            "Address1": "21 West 52nd Street",
            "Address2": [],
            "City": "New York",
            "State": "NY",
            "PostalCode": "10021",
            "Country": "US",
            "Phone": "12345678"
         }
   }
}

现在还不清楚我缺少什么。

0 个答案:

没有答案