Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Dimension values returned by API are less

(2) ShareShare
ReportReport
Posted on by 26
Hi, we've built an integration between our product and Dynamics 365 Business Central based on the REST API v2.0.
 
Unfortunately, our customers started to report that the dimensions values imported to our product are less than the ones they have on Dynamics. As you can see below, the issue appears to be on Microsoft's API as the list returned by the following request (GET /dimensionValues) contains only 15 values as opposed to 50 and more values found on Dynamics (see screenshot below):
 
GET /dimensions(38ba57e9-d843-ed11-946f-00224800a0c9)/dimensionValues(4797f25c-5819-ed11-90eb-0022481b2bfc)
{/response/: {/value/: [{/code/: /BER/,/displayName/: /MANAGED SERVICES - The Berkeley/,/id/: /2eb79c22-fccb-ee11-9078-002248079283/},{/code/: /CAD/,/displayName/: /Cheltenham Admin/,/id/: /0c3412b0-655c-ee11-8df1-6045bdc196c9/},{/code/: /CHE/,/displayName/: /Cheltenham Premises/,/id/: /155af99d-655c-ee11-8df1-6045bdc196c9/},{/code/: /GRA/,/displayName/: /Graduate Trainees/,/id/: /0061efdd-5864-ee11-8def-7c1e5203a3bc/},{/code/: /ITC/,/displayName/: /ITEC/,/id/: /4e291a7e-20e5-ee11-904c-6045bdf19c7d/},{/code/: /PAV/,/displayName/: /Production AV/,/id/: /babff6da-655c-ee11-8df1-6045bdc196c9/},{/code/: /PEN/,/displayName/: /Managed Services - Peninsula/,/id/: /3818aa79-9270-ed11-8c34-6045bd0b3046/},{/code/: /RAD/,/displayName/: /Reading Admin/,/id/: /801307a7-655c-ee11-8df1-6045bdc196c9/},{/code/: /RDG/,/displayName/: /Reading Premises/,/id/: /0b5af99d-655c-ee11-8df1-6045bdc196c9/},{/code/: /RWH/,/displayName/: /Reading Warehouse/,/id/: /8352d93d-0f74-ee11-8def-6045bdf1a661/},{/code/: /SDH/,/displayName/: /SFL Dry Hire/,/id/: /005e8bd2-655c-ee11-8df1-6045bdc196c9/},{/code/: /SIN/,/displayName/: /SFL Installations/,/id/: /20d357cb-655c-ee11-8df1-6045bdc196c9/},{/code/: /SPR/,/displayName/: /SFL Production/,/id/: /dc8c2ebe-655c-ee11-8df1-6045bdc196c9/},{/code/: /SSA/,/displayName/: /SFL Sales/,/id/: /f17740c5-655c-ee11-8df1-6045bdc196c9/},{/code/: /WEM/,/displayName/: /Managed Services - Wembley/,/id/: /90b7da17-fccb-ee11-9078-002248079283/}]}}
 
////
 
What could be causing this issue? Are you aware of any limitation on Dynamics API or particular configurations that might reduce the number of dimension values returned by the API compared to the UI?
We already double checked the company and environment.
 
Thank You
  • Verified answer
    Community member Profile Picture
    Community member 26 on at
    Dimension values returned by API are less
    Hi All,
     
    I think we found out the issue that's causing the list of departments values retrieved from Dynamics API to contain less items than the ones that some of our customers have on Dynamics.
     
    In order to get the list of Departments values we need to query a specific Dynamics API endpoint with the dimension ID (see Microsoft doc here):
     
    GET https://api.businesscentral.dynamics.com/v2.0/production/api/v2.0/$metadata#companies({id})/dimensions({id})/dimensionValues

    Unfortunately, this endpoint returns only a small subset of Departments values; comparing them with the list shared by the customer it appears that only 23 out of 168 are returned by Dynamics API.

    After more digging, we found out that by querying the full list of dimension values, without specifying the dimension ID of the Department, we get the full list!
     

    GET https://api.businesscentral.dynamics.com/v2.0/production/api/v2.0/$metadata#companies({id})/dimensionValues

    However, all the departments that are missing from the previous call have one thing in common, the dimension_id field appears as "00000000-0000-0000-0000-000000000000".

    Missing from GET ../companies({id})/dimensions({id})/dimensionValues

    {
    "@odata.etag": "W/\"JzIwOzE1MzQwNjUxMTc5NTE3NTExMDE0MTswMDsn\"",
    "id": "8d1ba80f-7ba5-ec11-80f1-000d3a870012",
    "code": "01C",
    "dimensionId": "00000000-0000-0000-0000-000000000000",
    "displayName": "XXXXX",
    "consolidationCode": "01C",
    "lastModifiedDateTime": "2023-08-27T20:28:55.48Z"
    }

    Available from ../companies({id})/dimensions({id})/dimensionValues

    {
    "@odata.etag": "W/\"JzE5OzQ2NzAwNDA2MjgwNzA1OTI0MzgxOzAwOyc=\"",
    "id": "e8b99a37-3cb1-ee11-a56a-002248436b28",
    "code": "03D",
    "dimensionId": "e1c652f0-7aa5-ec11-80f1-000d3a870012",
    "displayName": "YYYYY",
    "consolidationCode": "",
    "lastModifiedDateTime": "2024-01-15T09:38:16.86Z"
    }

    Therefore, it appears that the issue resides on Dynamics, without the dimensionId field populated accordingly we’re not able to retrieve the full list of values for a specific dimension via GET ../companies({id})/dimensions({id})/dimensionValues API.

    Also, we can't use the GET ../companies({id})/dimensions({id})/dimensionValues API as we would not be able to identify to which dimension a value belongs to in case the dimension_id field appears as "00000000-0000-0000-0000-000000000000".

    Looking around, we found out that this issue might be related to a recent Dynamics upgrade where some data migrations were not completed successfully, please see here to find out more.

    Thanks

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 78,034 Super User 2025 Season 1 on at
    Dimension values returned by API are less
    Hi, the last time I saw this question on the forum, he got the environment and company wrong. It looks the same this time, but you said you double checked......
    The following is the standard code of this API, without adding any filtering, it just displays the value of Dimension Value table.
    I suspect it's still a problem with Endpoint. Here's what I tested. I hope it can give you some tips.
    https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox240P/api/v2.0/companies(57747d95-78d5-ee11-904e-6045bdac9fd4)/dimensions(ffb2db45-19da-ee11-904c-002248e90ed1)/dimensionValues
     
    Thanks.
    ZHU
  • Community member Profile Picture
    Community member 26 on at
    Dimension values returned by API are less
    Hi @gdrenteria, thanks for your reply. Unfortunately the post you shared is unanswered.
     
    To answer your questions, the issue we're facing is experienced on different dimensions of several different customers.
     
    Thanks
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 14,573 Most Valuable Professional on at
    Dimension values returned by API are less

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans