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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Cannot get ID from API Response

(0) ShareShare
ReportReport
Posted on by 40

Hi,

We used a great deal of api calls for our dynamics365 business central solution. However I cannot find any way of returning the ids of records for updating. 

The power automate methods for updating records require a guid/documentid, however there seems to be absolutely no way to expose this data.

When getting purchase orders by get api or creating a new purchase order by post api, the response brings back no ids, guids or anything to that description:

GET api.businesscentral.dynamics.com/.../Purchase_Order

would bring back:

"value": [
        {
            "@odata.etag""etag....",
            "Document_Type""Order",
            "No""00000",
            "Buy_from_Vendor_No""V00000",
            "Buy_from_Vendor_Name": "Name",
.........
}....]
Any ideas on how to expose the id's of records? It seems quite ludicrous that even the power automate business central features don't have any way of doing this either!
I need to get this value to create purchase order lines, it's a required field which is seemingly impossible to get dynamically.
I have the same question (0)
  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    Hello,

    If you look at page 5527 for example:

    ===

    page 5527 "Purchase Invoice Entity"

    {

       Caption = 'purchaseInvoices', Locked = true;

       ChangeTrackingAllowed = true;

       DelayedInsert = true;

       EntityName = 'purchaseInvoice';

       EntitySetName = 'purchaseInvoices';

       ODataKeyFields = Id;

       PageType = API;

       SourceTable = "Purch. Inv. Entity Aggregate";

       layout

       {

           area(content)

           {

               repeater(Group)

               {

                   field(id; Id)

                   {

                       ApplicationArea = All;

                       Caption = 'id', Locked = true;

                       Editable = false;

    ===

    Call:

    Make an API call to this page gives you both e.tag and ID:

    GET api.businesscentral.dynamics.com/.../purchaseInvoices

    Response:

    {

       "@odata.context": "api.businesscentral.dynamics.com/.../$metadata

       "value": [

           {

               "@odata.etag": "W/\"JzQ0Ozl5cERqUnUzNDB4ZnVsR3NNMGh4THNZQk9oR21oek5mTys4ekd1ZXEvWFU9MTswMDsn\"",

               "id": "85b2141f-b0fd-ea11-bb48-000d3a2fece2",

               "number": "108001",

               "invoiceDate": "2019-01-01",

               "postingDate": "2019-01-01",

               "dueDate": "2019-01-01",

    I don't know if this is the type of ID you are looking for?

  • RayFoster Profile Picture
    40 on at

    Thank you for your response.

    It's clear that I've been using a different API endpoint that doesn't expose the id data. I tested the endpoint you sent and I did receive the ids however that was for a completely different table (purchaseInvoices). I'm looking at getting the id field available from purchaseOrders. I now get this response from the api:

    {

       "error": {

           "code": "Application_DialogException",

           "message": "Data required by the API was not set up. To set up the data, invoke the action from the API Setup page.

       }

    }

    I've tried setting api up from api setup page, but still no dice unfortunately.

  • Suggested answer
    JAngle Profile Picture
    157 on at

    Just use the standard api page but with the http connector in power automate. Then you can loop through the results and use the BC connector as you wish. Similar pattern followed here: joshanglesea.wordpress.com/.../

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

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,909 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,145 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 974

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans