insert multiply records to a form, from JSON file using postman

512 Views Asked by At

How can I insert multiply records to a form using postman?

my data is in JSON file and I use POST request:

"https://jrpostest.domjr.local/odata/Priority/tabula.ini/jrdf/SUPPLIERS"

getting the error below

enter image description here

1

There are 1 best solutions below

0
AviaW On

You can use batch request in order to insert multiple records into a parent form with one server call.

POST
https://jrpostest.domjr.local/odata/Priority/tabula.ini/jrdf/$batch

{
    "requests": [
        {
            "method": "POST",
            "url": "SUPPLIERS",         
            "body": {
                "SUPNAME": "33445566",
                "SUPDES": "33445566"                                
            }
        },
        {
            "method": "POST",
            "url": "SUPPLIERS",         
            "body": {
                "SUPNAME": "33445577",
                "SUPDES": "33445577"                                
            }
        }
    ]
}

Please note that batch requests are available from Priority version 19.1. In previous versions you will need to send two POST requests to the SUPPLIERS endpoint.