API - json body with nested nodes

Hi all,

I tried to create a web API extension in Dynamic 365 BC (Spring 2019 version) that accept a json body with nested nodes. To do this I created three API pages with this structure:

  • The "page 2" as part of "page 1"
  • The "page 3" as part of the "page 2" 

During the test with Postman I had the follow results:

  • I don’t have problem with the GET method, in fact the all json is displayed correctly (with data and the nested nodes)
  • When I try to send a POST I don't have error but only the sourcetables of the "page 1" and "page 2" are written. It is like that the last node array is ignored. This is the problem that I have.

Someone tried to create API that accept a json body with more nested nodes (3,4 o more)? Someone have some idea about my issue?

Thanks!

PS: This is the body that my "mock" API should accept:

{

    "no": "TEST001",

    "description": "this is test 001",

    "lines": [

        {

            "lineNo": 10000,

            "lineDescription": "this is test 001 line",

            "sublines": [

                {

                    "sublineNo": 10000,

                    "subLineDescription": "this is test 001 subline"

                }

            ]

        }

    ]

}

Related
Recommended