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

API Batch and Deep insert

(0) ShareShare
ReportReport
Posted on by 3,094

Hi Folks,

I have one of the scenario where I am creating a header and lines in one shot using business central custom API.

I tried to refer couple of blogs example:

https://www.kauffmann.nl/2021/01/06/batch-calls-with-business-central-apis-3-tips-and-tricks/

https://www.kauffmann.nl/2020/05/05/deep-insert-with-business-central-apis/

https://www.kauffmann.nl/2020/12/18/batch-calls-with-business-central-apis-1-basic-operation/

But I am unable to get correct response.

This is the body I am passing

pastedimage1672653026527v1.png

Below is the response I am receiving 

pastedimage1672653060166v2.png

Kindly advise what is the correct step to use batch and deep insert together.

I followed same steps using business central standard API but still receiving same response.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    Hi

    I'll give you an example using the standard salesInvoices API

    GET:

    pastedimage1672669360549v1.png

    this is the response

    pastedimage1672669442517v2.png

    POST:

    insert in the body request this for example:

    {
        "externalDocumentNumber""",
        "postingDate""2021-01-19",
        "customerNumber""20000",
         "salesInvoiceLines": [
            {
                "lineType""Item",
                "lineObjectNumber""1928-S",
                 "quantity"3
     
            }
        ]
    }
    DANiele
  • Vaishnavi J Profile Picture
    3,094 on at

    Hi

    The example which you  gave is for the Deep insert.

    I want to use batch and deep insert together in one single request.

    I want to create a Purchase Header and multiple lines together in one shot how would I be able to achieve this?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,021 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,083 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 731 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans