Skip to main content
Answer

Can you get Purchase Order Id from Odata V4?

  • July 12, 2024
  • 2 replies
  • 117 views

I am trying to switch to using the Odatav4 endpoint instead of the REST API for fetching order data. 
One thing that I noticed that it seems to be missing is the ID of the Purchase order. 

I am using the following request: 
http://localhost:40294/AcumaticaERP/ODatav4/MYSTORE/PX_Objects_PO_POOrder?$expand=POLineCollection($expand = InventoryItemByInventoryID($select = InventoryCD,Descr,ItemStatus,BaseUnit))&$filter=OrderNbr eq '000024'

This works well but it does not seem to contain the ID of the order which I know to be dee069aa-a63a-ef11-9050-e848b8c82000 from using the REST API:  http://localhost:40294/AcumaticaERP/entity/Default/23.200.001/PurchaseOrder?$expand=Details&$filter=OrderNbr eq '000024'

Is this not possible or am I missing something. 

Best answer by RohitRattan88

@GraniteDev 

my understanding is that NoteID field is returned as ID in contact based API, did a quick test and that seems to be the case:

 

CB API return
oData

Hopefully this helps. 😊

2 replies

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • Answer
  • July 12, 2024

@GraniteDev 

my understanding is that NoteID field is returned as ID in contact based API, did a quick test and that seems to be the case:

 

CB API return
oData

Hopefully this helps. 😊


  • Author
  • Freshman I
  • July 15, 2024

Hi @RohitRattan88 

I thought that I had done my due diligence and searched the response of the Odata for the ID, but clearly not. 
Thanks for being so thorough with your response, greatly appreciated.