Mike Casey
11/19/2024, 7:50 PMCeligo AI
11/19/2024, 7:50 PMAI generated answer (using internal Slack threads):To remove a line item from a Sales Order using the REST API, you would need to perform a PATCH request on the Sales Order record. The line item to be removed should be included in the request body with the
_operation
property set to remove
.
Here is a sample JSON body for the PATCH request:
json
{
"line": [
{
"_operation": "remove",
"line": 1
}
]
}
In this example, the line item at index 1 will be removed from the Sales Order. Please note that the line index starts from 0.
However, please be aware that you cannot remove a line item from a Sales Order if there are any related records, such as Item Fulfillments or Invoices. Those related records would need to be modified or removed first.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
11/19/2024, 7:51 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839267492
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830726564
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830202341
Celigo AI
11/19/2024, 7:51 PM