Мы получаем ошибку ниже, когда пытаемся создать заказ.Мы используем реальную учетную запись корабля.
{
"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"
}
}
}
Не совсем понятно, чего мне не хватает.