Wondering if anyone has tried the following before:
Step 1) Web service call (REST) to create a Drop Ship Purchase Order
Step. 2) Web service call (REST) to create Sales Order, including Drop Ship PO information at the SO Line level in the PUT request.
Has anyone tried to update the PO information on the SO Line via REST API call?
Below are my two API calls – first for creating the PO, second for creating the SO. I am trying to populate the “POOrderNbr” on the Detail record directly (which is essentially what it looks like the PO Link functionality does). Assuming that the PO Link has some extra logic baked in that allows this field to be written to as needed.
Purchase Order API call:
{
"Details":[
{
"InventoryId":{
"value":"ITS-002687"
},
"LineNbr":{
"value":1
},
"OrderNbr":{
"value":"400080001"
},
"OrderQty":{
"value":1.0
},
"UOM":{
"value":"EA"
},
"WarehouseId":{
"value":"100"
}
}
],
"Hold":{
"value":false
},
"Location":{
"VALUE":"MAIN"
},
"OrderNbr":{
"value":"400080001"
},
"ShippingInstructions":{
"ShippingDestinationType":{
"value":"Customer"
},
"ShippingLocation":{
"value":"MAIN"
},
"ShipTo":{
"value":"640737"
},
"ShipToContact":{
"BusinessName":{
"value":"JMS TEST 2. 25"
},
"Phone1":{
"value":"123-123-1234"
}
}
},
"Status":{
"value":"Awaiting Link"
},
"Terms":{
"value":"03"
},
"Type":{
"Value":"Drop Ship"
},
"VendorID":{
"value":"000115"
},
"custom":{
"CurrentDocument":{
"DontEmail":{
"type":"CustomBooleanField",
"value":true
},
"DontPrint":{
"type":"CustomBooleanField",
"value":true
}
}
}
}
Sales Order API call:
{
"CustomerID":{
"value":"640737"
},
"Description":{
"value":"640737 - 4000794"
},
"Details":[
{
"InventoryID":{
"value":"ITS-002687"
},
"LineNbr":{
"value":1
},
"MarkForPO":{
"value":true
},
"OrderQty":{
"value":1.0
},
"POSource":{
"value":"Drop-Ship"
},
"WarehouseId":{
"value":"100"
},
"custom": {
"Transactions": {
"POOrderNbr": {
"type": "CustomStringField",
"value": "400080001"
}
}
}
}
],
"OrderNbr":{
"value":"4000800"
},
"OrderType":{
"value":"SO"
},
}