How to cancel a line with backordered status of a sales order using Rest API?
Content
I am trying to cancel the line of a sales order that remained in backordered status. But I am trying using the PATCH method of the Rest API '/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/{OrderKey}/child/lines/{FulfillLineId}'
The payload I am using is as follows:
{
"CancelReasonCode": "CANCELACION DEL CLIENTE",
"CancelReason": "Cancelación",
"CanceledFlag": true,
"OrderedQuantity": 0
}
However, I get the error:
SourceTransactionLineNumber 1, SourceScheduleNumber 1: A closed or canceled line cannot be updated
SourceTransactionLineNumber 1, SourceScheduleNumber 1: The request failed because it doesnt include a value for attribute SourceLotSerialId, or value that it does provide isnt valid.
The request failed because it includes lot serial details on an order line that isnt a return line. Include these details only on a return line.