Skip to main content
Answer

How do you access Purchasing Details via API?

  • January 30, 2024
  • 2 replies
  • 168 views

I’m trying to view the details of a PO that’s linked to a SO line. My API call, {{api_base_uri}}/SalesOrder/SO|SO00000051?$expand=Details, works just fine. However, when I try {{api_base_uri}}/SalesOrder/SO|SO00000051?$expand=Details,Details/PurchasingDetails, I get an error stating “the given key was not present in the dictionary”. 

 

I may have been misinformed on this being the correct key, but there’s nothing online covering this topic. 

Can I please get some help? 

 

Context: I’m trying to create a collection run in Postman that creates an SO + PO, then PO links their lines. I’m on 2023 R1. 

Best answer by dcomerford

That error is telling you thst it cannot find the Object PurchasingDetails which version of the End Point are you using as the Default 22.200.001 has this in it 

The older version dont have this object

 

2 replies

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • Answer
  • January 30, 2024

That error is telling you thst it cannot find the Object PurchasingDetails which version of the End Point are you using as the Default 22.200.001 has this in it 

The older version dont have this object

 


  • Author
  • Freshman I
  • January 30, 2024

@dcomerford Thanks for the reply. That was it. My api_base_uri was 17.200.001. Changing it to 22.200.001 fixed the issue.