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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

JSON Batch Request using ODATA in D365 Finance

(0) ShareShare
ReportReport
Posted on by 300

How can you send multiple JSON Request to ODATA endpoint of Dynamics 365 Finance as I get the following error stating Content-Type must be multipart/mixed? Is this supported?

Note: When try to send request based on this example, it works. However I am looking at JSON Request (more than 1 record)

pastedimage1641990392376v1.png

If yes, how do we send  JSON batch request body to D365 Finance? Any pointers will be really helpful.

I have the same question (0)
  • nunomaia Profile Picture
    25 Moderator on at
    RE: JSON Batch Request using ODATA in D365 Finance

    Batch requests for Odata in Postman are not straightforward

    Check this post for a sample Insert multiple records in single request using Odata from Postman - Dynamics 365 Finance & Operations | nuxulu.com 

  • Santosh Ramamurthy Profile Picture
    300 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    The example shared is more of $batch request with multipart/mixed Content-Type. I need to understand how to parse multiple records as JSON.

    Typically example is the way output is rendered when making READ request. Similarly how can we do similar for CREATE request for pushing more than 1 records as JSON format?

  • Suggested answer
    nunomaia Profile Picture
    25 Moderator on at
    RE: JSON Batch Request using ODATA in D365 Finance

    The OData protocol for multiple records must be submitted in a batch or record by record ( multiple requets ). For batch is a mixed content between json and request header 

  • Santosh Ramamurthy Profile Picture
    300 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    Okay so we can't send the way I described? It's not supported?

  • nunomaia Profile Picture
    25 Moderator on at
    RE: JSON Batch Request using ODATA in D365 Finance

    From Odata spec : docs.oasis-open.org/.../odata-v4.01-part1-protocol.html

    "Batch requests allow grouping multiple individual requests into a single HTTP request payload. An individual request in the context of a batch request is a Metadata Request, Data Request, Data Modification Request"

    An insert is a Data Modification Request.

    So, you need to batch those requests in a single batch to join multiple requets.

  • Santosh Ramamurthy Profile Picture
    300 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    It's via batch. Don't want to perform record by record.

  • Santosh Ramamurthy Profile Picture
    300 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    Batching Microsoft Graph API Requests with JSON Batching: blog.kloud.com.au/.../

    This typically allows JSON Batching using GRAPH API; In similar lines can it be done on D365 Finance or is it the only way as per your blog is what I would like to know.

  • nunomaia Profile Picture
    25 Moderator on at
    RE: JSON Batch Request using ODATA in D365 Finance
    [quote user="Santosh Ramamurthy"]

    It's via batch. Don't want to perform record by record.

    [/quote]

    A Batch request It's a single HTTP request with all the records. You need is to group multple inserts in a single batch request.  

  • Suggested answer
    Santosh Ramamurthy Profile Picture
    300 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    We cannot work with JSON Batching as it's new to OData 4.0.1.

    Only ODATA v4.0 specification for batch messages only supports multipart/mixed requests with plain text body.

  • vinod777 Profile Picture
    35 on at
    RE: JSON Batch Request using ODATA in D365 Finance

    Hi Santosh, 

    are you able to post multiple records with json nody request instead of text as highlighted below

    pastedimage1664361377626v1.png

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 707 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 618 Super User 2025 Season 2

#3
CU05031448-0 Profile Picture

CU05031448-0 600

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans