web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Business Central forum

Need to get the Purchase order Header and Details in a single API call

(1) ShareShare
ReportReport
Posted on by

I would like to get the Purchase order Header and Details in a single API call based on the record creation date for  the Integration with other system but I am not able to use the ($expand=purchaseDocumentLines) as the API says "Could not find a property named 'purchaseDocumentLines' on type 'NAV.purchaseDocuments'." Below the URL

https://api.businesscentral.dynamics.com/v1.0/5818bd20-bf25-47b1-b996-d419d7e6e8ba/sandbox/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/purchaseDocuments?$expand=purchaseDocumentLines

where as I am able to Get the Header and Details in the separate calls. below the URLS

PO Header: https://api.businesscentral.dynamics.com/v1.0/5818bd20-bf25-47b1-b996-d419d7e6e8ba/sandbox/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/purchaseDocuments

PO LineItems:https://api.businesscentral.dynamics.com/v1.0/5818bd20-bf25-47b1-b996-d419d7e6e8ba/sandbox/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/purchaseDocumentLines

One more How to filter the records based on the creation date time as I am not able to find the creationdate attribute to filter?  like ($filter= creationdate / LastModified  gt "2018-09-07 12:00:00"

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans