when using the REST API what is the exact format r...
# ask-stanley-ai
m
when using the REST API what is the exact format required for the JSON item data when transforming a transfer order into an item receipt?
c
AI generated answer (using internal Slack threads):
When transforming a transfer order into an item receipt using the REST API, the JSON item data should be formatted as follows:
Copy code
json
{
  "shipStatus": "B",
  "item": {
    "items": [
      {
        "orderLine": 1,
        "quantity": 1,
        "location": 10,
        "itemReceive": true,
        "inventoryDetail": {
          "inventoryAssignment": {
            "items": [
              {
                "issueInventoryNumber": 10189,
                "quantity": 1,
                "binNumber": 2211
              }
            ]
          },
          "quantity": 1
        }
      }
    ]
  }
}
You would send this data to the "/record/v1/salesOrder/{id}/!transform/itemFulfillment" REST API endpoint. However, please note that when you do a transformation with the REST API, the inventory detail already exists on the sale order. If you encounter an error, you may need to use the replace parameter to explicitly overwrite the old inventory details. ****** 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.850810289
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846518219
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845603883
Please provide your feedback on this answer.
m
If anyone is having the same issue, the orderLine needs to reference the "hidden" fulfillment line on the original transfer order, which in this case was original line + 2. These come up when you use SQL to look at the transaction, but the GET API only returns the original order line. Very intuitive. Much wow.