Solved

HTTP PUT to Update Drop Ship PO on SO line of Sales Order

  • 11 August 2021
  • 1 reply
  • 367 views

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"

   },

}

icon

Best answer by Troy Vars 12 August 2021, 17:58

View original

1 reply

Userlevel 4
Badge +2

I know that there are issues when linking these directly into the field thru the ui. ie Just entering the Sales Order or PO number into the reference field does not actually create the necessary links for the system to recognize the PO is Linked to the SO.

You have to use the PO Link to SO action and select from the list of PO’s. I would imagine populating this direct via the API would cause the same issues.

We have a client who has had to back out many PO’s and recreate them due to this issue.

Best bet is to look at the actions POSupplyOK, POSupplyDialogInitializer, LinkSupplyDemand and its associated functions to see if you can extend the endpoint with the necessary fields to create the true link.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved