I'm building an integration that creates Sales Orders and Drop-Ship Purchase Orders via the Acumatica REST API (endpoint version 24.200.001 / a custom endpoint based on it). Once the SO and PO are created, the integration then links the PO and SO line via the API. Everything works correctly when the PO vendor matches the item's default vendor in Acumatica, but fails when using a non-default vendor.
What works: After creating the SO and Drop-Ship PO, I release the SO from Hold, then send:
PUT /SalesOrder?$expand=Details,Details/PurchasingDetails
{
"OrderType": { "value": "SO" },
"OrderNbr": { "value": "SO-000123" },
"Details": [{
"id": "<soLineId>",
"PurchasingDetails": [{
"POOrderType": { "value": "Drop-Ship" },
"POOrderNbr": { "value": "PO-000456" },
"POOrderLineNbr": { "value": 1 },
"Selected": { "value": true }
}]
}]
}
When the PO vendor is the item's default vendor, SOLineSplit records are auto-created by Acumatica when the PO is saved, and this call successfully selects/links them.
What fails: When the PO vendor is not the item's default vendor, PurchasingDetails on the SO line is empty — no SOLineSplit records were auto-created when the PO was saved. The linking PUT call above returns 200 but the link does not appear to materialize in Acumatica.
What I've tried:
- Setting
SOOrderType,SOOrderNbr,SOLineNbron the PO Detail line at PO creation time → causes aPXLockViolationException. - Setting those same fields via a separate PUT to /PurchaseOrder after PO creation → call succeeds (HTTP 200), but no
SOLineSplitrecords appear on the SO line. - The Acumatica Web UI "PO Link" dialog (SO → Details → highlight line → PO Link toolbar) works for any vendor, including non-default, though I need to explicitly search for the vendor since it’s initially populated by open POs for the default vendor. The equivalent action does not appear to be exposed as a REST action in our endpoint, and I don't see anything relevant in the standard Default/24.200.001 SalesOrder actions list either.
Question: Is there a way to trigger SO↔PO linking via REST when the PO vendor is not the item's Acumatica default vendor? Specifically, is there a REST action or sequencing approach that causes SOLineSplit records to be created for a non-default vendor PO?