Lorenzo
10/15/2024, 10:58 PMCeligo AI
10/15/2024, 10:58 PMAI generated answer (using internal Slack threads):To replace all line items of a sales order with a new list using the REST API, you would need to perform a PUT request on the sales order endpoint with the new line items in the request body. Here is a general example of how the request body might look:
json
{
"recordType": "salesOrder",
"id": "your_sales_order_id",
"fields": {
"entity": {
"id": "your_customer_id"
},
"item": {
"items": [
{
"item": {
"id": "new_item_id_1"
},
"quantity": "new_quantity_1"
},
{
"item": {
"id": "new_item_id_2"
},
"quantity": "new_quantity_2"
}
// Add more items as needed
]
}
}
}
Please replace "your_sales_order_id", "your_customer_id", "new_item_id_1", "new_quantity_1", etc. with your actual data.
Remember to set the Content-Type
header to application/json
in your request.
******
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
10/15/2024, 10:58 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811982214
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810439289
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809579849
Celigo AI
10/15/2024, 10:58 PM