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

Community site session details

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

How can you implement multiple $expand in an API but not multilevel/cascading?

(0) ShareShare
ReportReport
Posted on by

Hello, I've built a customer API with two SubPageLinks to both the Bank Accounts and the Ship-To Addresses. Now i am trying to GET the customer and $expand both the bankAccount and the shipToAddress in one request.

in two requests it works:

{{BC-Instance}}/{{API-Suffix}}/{{Company}}/customers('10000')?$expand=shipToAddresses

{{BC-Instance}}/{{API-Suffix}}/{{Company}}/customers('10000')?$expand=bankAccounts

 How is it possible to combine both expands in just one request?

I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    93,874 Super User 2025 Season 2 on at
    RE: How can you implement multiple $expand in an API but not multilevel/cascading?

    Hi, Sorry I haven't tested it, hope the following helps.

    https://stackoverflow.com/questions/54560223/expand-multiple-fields-in-acumatica-rest-api-endpoint

    Thanks.

    ZHU

  • Nitin Verma Profile Picture
    21,696 Moderator on at
    RE: How can you implement multiple $expand in an API but not multilevel/cascading?

    Hi,

    you can try like this

    GET /companies({{companyId}})/salesOrders?$filter=orderDate ge 2019-05-01&$expand=paymentTerm,salesOrderLines($expand=account,item($expand=itemCategory))

    Please refer the below link,

    learn.microsoft.com/.../dynamics-rate-limits

  • kenyo Profile Picture
    on at
    RE: How can you implement multiple $expand in an API but not multilevel/cascading?

    Thank you , yes that works after hours of looking for documentation i found the same answer in docs.oasis-open.org/.../odata-v4.01-csprd05-part1-protocol.html    

    and the expanded navigation properties are just comma separated

    so in my case it is {{BC-Instance}}/{{API-Suffix}}/{{Company}}/contacts('KT000001')?$expand=bankAccounts,shipToAddresses,contactBlocks

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,214

#2
Sumit Singh Profile Picture

Sumit Singh 2,145

#3
YUN ZHU Profile Picture

YUN ZHU 1,887 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans