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...
Unanswered

Business Central Automation API Rapidstart package upload and import

(0) ShareShare
ReportReport
Posted on by 10

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. 

Screen-Shot-2021_2D00_03_2D00_05-at-4.44.41-PM.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. 

I have the same question (0)
  • JAngle Profile Picture
    133 on at

    If you do a GET of the recently imported package does it have the same ID? On the patch for upload did you use a header for If-Match *?

    If you’re planning on creating exact copies of companies with base line data I would use the copy company feature. Available from the companies list. Then change the company information

  • kumar97 Profile Picture
    10 on at

    It gives me the same ID if I do a GET of recently imported package and I did use the If-Match header * for PATCH request. Following is the result when I did "GET api.businesscentral.dynamics.com/.../{environment name}/api/microsoft/automation/v2.0/companies({companyId})/configurationPackages":

    Screen-Shot-2021_2D00_03_2D00_08-at-11.07.34-AM.png

    My guess is the .rapidstart package is not being uploaded in the process.

    I can't use company copy feature as the business requirement is to use API for future references as well. 

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,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans