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

Business Central API - copy a company issue

(0) ShareShare
ReportReport
Posted on by 5

I'm currently setting up company by automation API by following the setups at Introduction to automation APIs - Business Central | Microsoft Docs. I have created a company in Business Central but need to create 5 similar copies with same data like items, customers, COA, etc using API. I exported a configuration package from the base company but having trouble when I upload the package using API and try to import it. I'm currently using postman to test things out. 

pastedimage1615587033034v1.png

I have added the .rapidstart file as form data with content type application/octet-stream. Using "PATCH api.businesscentral.dynamics.com/v2.0/{environment name}/api/microsoft/automation/v2.0/companies({companyId})/configurationPackages({packageId})/file('{packageName}')/content" , it gives the expected response "204 No Content".

When I import using "POST api.businesscentral.dynamics.com/v2.0/{environment name}/api/microsoft/automation/v2.0/companies({companyId})/configurationPackages({packageId})/Microsoft.NAV.apply ",  it returns "200 OK".

It returns an error while applying the package using "POST api.businesscentral.dynamics.com/v2.0/{environmentname}/api/microsoft/automation/v2.0/companies({companyId})/configurationPackages({packageId})/Microsoft.NAV.apply" .

{
"error": {
"code": "Application_DialogException",
"message": "Import Status is not completed. You must import the package before you apply it. CorrelationId: a8ade702-ecaf-4ae4-a1f2-ebc5495c9a21."
}
}

Not sure what is causing the error. I tried giving it extra minutes after upload and import requests to facilitate any backend processing. Any help is appreciated. 

  • Hernandez421 Profile Picture
    5 on at

    Developing a custom API in AL for Business Central. Add any necessary fields for a car brand as shown below: AL Copy Make sure to have a field for Brand Id and that TableRelation is set to "Car Brand". name>/api/<API publisher>/<API group>/<API version>/companies(<company id>)/carModel.

    MyGiftCardSite

  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 452 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 371 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans