I’ve created 2 API pages; PO, and PO lines (including dimensions)…
When I call the purchaseOrder endpoint it only returns the fields on that page and ignores the page “part” that should bring in the corresponding lines…Any suggestions on getting this working would be appreciated!
It seems like you are experiencing an issue where the API is not returning the expected results when calling the purchaseOrder endpoint. One suggestion to address this issue is to check whether the purchaseOrder endpoint is properly linked to the PO lines page. You may want to ensure that the relationship between the two pages is established correctly in order to retrieve the corresponding lines data. You can also try checking the API documentation to see if there are any specific parameters that need to be added to the endpoint call to fetch the desired data. Additionally, you may want to consider reaching out to the API provider’s support team for further assistance in resolving this issue.
Hi @Steve_Simpson_Ipsum,
If you want that an API call returns the lines part, you must add the “$expand=[name of listpart api]” parameter to the URL.
Look at example 4: Developing a custom API - Business Central | Microsoft Learn
You can have several listparts in an API page, when you call you can add $expand parameter, with each needed listpart name separated by commas.