Skip to main content
Solved

REST API: how do I set Subaccount on a Sales Order Details line?

  • September 20, 2024
  • 2 replies
  • 94 views

Forum|alt.badge.img+2

I use $expand to examine an existing Sales Order:

https://sandbox.com/entity/Default/22.200.001/SalesOrder/WB/WB00162584?$expand=FinancialSettings,BillToContact,BillToAddress,ShippingSettings,ShipToAddress,ShipToContact,Details,Totals

However, the Details JSON doesn’t include Subaccount.  Do I need to expand something else to see it?  I want to be able to create another details line and include the Subaccount but I’m not sure what to use.

Best answer by hdussa

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.

2 replies

hdussa
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • Answer
  • September 24, 2024

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • October 2, 2024

Hello @bpgraves ,

 

It appears to be the Endpoint does not expose the “SubID” field. You will need to customize [extend] the SalesOrder endpoint and add the SubID.

After I extended the SalesOrder endpoint, I added the Subaccount (not SubID) field to the Details (SalesOrderDetail[]) and then I was able to set the Subaccount for each Details line in the SalesOrder.