web
You’re offline. This is a read only version of the page.
close
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...
Suggested Answer

Get all company locations via REST API

(2) ShareShare
ReportReport
Posted on by 40
Is there a way to list all company locations using REST API?
 
I tried a few ways:
 
But both return an HTTP 400 error with the text "Resource not found for the segment"
 
That it looks strange for me, because the documentation says that navigation property "locations" should exist on the "company" resource. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_company
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,441 Super User 2025 Season 2 on at
  • Anton Kheistver Profile Picture
    40 on at
    No, this endpoint returns a single location by its ID. I'm looking for something to get all configured locations for a company.
  • Sajjad Yousuf Anjum Profile Picture
    84 on at
    Hi,
    You can add a Location List Page in Web Service, it will generate the API list which you can use.
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,640 Super User 2025 Season 2 on at
    Hi, The standard location API can get all of them, not just one.
    For example,
    https://api.businesscentral.dynamics.com/v2.0/7e47da45-7f7d-448a-bd3d-1f4aa2ec8f62/Sandbox253/api/v2.0/companies(ee335f2f-31d9-ef11-8eec-7c1e524c2aa7)/locations
     
    Thanks.
    ZHU
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at
    Please check the below link for API Endpoint, you need to skip providing the {id} and it will return all the location in the company
     
     
    GET https://{businesscentralPrefix}/api/v2.0/companies({id})/locations({id})
     
  • Suggested answer
    Anton Kheistver Profile Picture
    40 on at
    The root cause was in that that I used MS Graph API to access Business Central. Direct access via https://api.businesscentral.dynamics.com returns all locations as expected

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans