using the rest api for an item receipt, create the...
# ask-stanley-ai
m
using the rest api for an item receipt, create the object for me to update the location of the receipt and the location of each line item
c
AI generated answer (using internal Slack threads):
Based on the conversations, to update the location of the receipt and the location of each line item using the REST API for an item receipt, you would need to include the
location
field in your request body for both the item receipt and each line item. Here is an example of how you can structure your request body:
Copy code
json
{
    "location": {
        "id": "location_id"
    },
    "item": {
        "items": [
            {
                "orderLine": 1,
                "itemreceive": true,
                "location": {
                    "id": "location_id_for_item_1"
                }
            },
            {
                "orderLine": 2,
                "itemreceive": true,
                "location": {
                    "id": "location_id_for_item_2"
                }
            }
        ]
    },
    "shipStatus": {
        "id": "C"
    }
}
In this example, replace
location_id
,
location_id_for_item_1
, and
location_id_for_item_2
with the actual IDs of the locations you want to set for the receipt and each line item respectively. Please note that the
orderLine
field should match the line number from the sales order details. Also, the
itemreceive
field should be set to
true
for the items you want to receive. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842565536
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834388733
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834213436
Please provide your feedback on this answer.