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

API Batch and Deep insert

(0) ShareShare
ReportReport
Posted on by 3,062

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,397 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,062 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

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 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans