I am trying to create a quote using /api/order (“Create Order / Quote”) with Swagger and I get the following message error returned:
“Message”: “{"Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","StackTrace":" at PSI.WebTrack.Core.Objects.WebServices.WebApiModels.WebAPIOrderLine.MapFromCore(ProductBasketLine productBasketLine)\r\n at Epicor.WebTrack.WebServices.WebStoreApi.Services.LineConversionService.d__2.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Epicor.WebTrack.WebServices.WebStoreApi.Controllers.EDIController.d__4.MoveNext()"}”
The syntax all looks correct to me. Any Idea?
Here are the parameters:
{
"checkoutparameters":
{
"CustomerID": "",
"UserID":"169252",
"OrderNumber": 248940,
"OrderReference": "40113",
"DateRequired": "2023-10-24T10:00:00-00:00",
"RecalcShoppingCart": false,
"TaxCalculatedAtSource": true,
"SaleType": "CollectLater",
"TransactionType": "Quote",
"TradingBranchId": 6,
"WebTrackInstanceID": 1,
"AutoProcess": true,
"AutoApplySO": 0,
"ContactFirstName": "Donald",
"ContactLastName": "Barnett",
"ContactTelephone": "509-777-8888",
"BuyerAddress":
{
"Address1": "999 S BLANCHARD DR",
"Address2": "",
"Address3": "",
"City": "SPOKANE VALLEY",
"County": "WA",
"Province": null,
"PostCode": "99212",
"Country": "USA",
"Telephone1": "509-777-8888",
"Email": "donb@gmail.com",
"ContactName": "Donald",
"ContactPhone": "Barnett"
},
"SpecialInstructions": "",
"NotificationEmailAddress": "donb@gmail.com",
"WebTrackPayment":
{
},
"SettlementCardDetails":
{
},
"CurrencyCode": "USD"
},
"detaillines":
[
{
"Quantity": 3,
"QuantityTally": null,
"UnitCost": 0,
"UnitSellPrice": 26.28,
"TotalSellPrice": 78.84,
"SellPerCode": "ea",
"SellPerID": 1,
"SellPer":
{
"PerId": 1,
"PerCode": "ea",
"Name": "Each",
"PerType": 1,
"BasePer": 1,
"ConversionToBase": 1
},
"TotalTax": 9.10,
"LeadTime": 1,
"CustomerRef": "323120",
"ProductId": 5481,
"AvailableStock": 98,
"Product":
{
"ProductId": 5481,
"Description": "12 ft. x 1 in. x 5 in. Raw Umber Composite Decking",
"ProductCode": "323120",
"ProductGroupId": 3,
"SellPer":
{
"PerId": 1,
"PerCode": "ea",
"Name": "Each",
"PerType": 1,
"BasePer": 1,
"ConversionToBase": 1
},
"FullDescription": "12 ft. x 1 in. x 5 in. Raw Umber Composite Decking",
"LineTaxes":
[
{
"Code": "3210",
"Rate": 7.00,
"Value": 5.52
}
]
}
}
]
}