Discussions

Ask a Question
Back to All

How to pass multiple records in REST API POST method?

Hi team,

I would like to create multiple records in my JSON object to insert multiples records at the same time using REST API POST. Is that possible? Please see the example below, which changes I should do in order to add more records (example diff PartyIds)?

Thanks in advance, Chris.

{
"$type":"Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName":"My_Table_Transactions",
"PrimaryParentEntityTypeName":"Party",
"Properties":{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values":[
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"Card_Number",
"Value":"1111 1111 1111 1125"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"PartyId",
"Value":"232323"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"Import_Filename",
"Value":"testFile.csv"
}
]
}
}