500 error while trying to add orderLines to Order
Hi,
I am trying to create Order from custom application. I am able to create Order successfully. But when I am trying to update order with Orderlines. It is always giving me 500 error. I am not sure what is wrong I am doing in this.
my Url to create Orderline is this:
"https://api.lightspeedapp.com/API/Account/{AccountID}/OrderLine.json"
request sending to API
{
"Quantity":8,
"Price":4.0,
"OriginalPrice":4.0,
"numRecieved":1,
"OrderID":19797,
"ItemID":"28828"}
Response getting from API:
{
"httpCode": "500",
"httpMessage": "Internal Server Error",
"message": "An error has occurred and we've been notified. Please try again and if this problem continues please contact support.",
"errorClass": "InternalServerErrorHttpException"
}
Apricate for the help here.
Thank you.
1 comment
Looking at the API documentation (https://developers.lightspeedhq.com/retail/endpoints/OrderLine/#post-create-an-order-line) perhaps try verifying the OrderID and ItemID are valid. And then try placing quotes around the OrderID. At least their documentation appears to require this. Other than that, the example POST request they provide also includes a total field...