These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

REST API POST into Multi-instance data source does always return ordinal = 0

Hi
this is a rather annoying issue for multi-instance tables because one cannot get the actual reference from the response. I am not sure if I am missing something obvious.

If one post something through the REST API into a multi-instance data source, the ID is returned but not the Ordinal with the actual seqn number.

For instance, if I post the below

POST /api/ZenGoCardless_BankAccounts HTTP/1.1
Host: imistour832.imiscloud.com
Content-Type: application/json
Authorization: bearer xxxx
cache-control: no-cache
Host: imistour832.imiscloud.com

{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "ZenGoCardless_BankAccounts",
"PrimaryParentEntityTypeName": "Party",
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "23197000"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Enabled",
"Value": {
"$type": "System.Boolean",
"$value": true
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Currency",
"Value": "GBP"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedAt",
"Value": "2019-03-04T12:46:56"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CountryCode",
"Value": "GB"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BankName",
"Value": "HSBC BANK PLC (RFB)"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AccountNumberEnding",
"Value": "90"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AccountHolderName",
"Value": "A KOPETZKY"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CuId",
"Value": "CU0005R16SG151"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BaId",
"Value": "BA0005ESE8H5B9"
}
]
}
}

This is returned
{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "ZenGoCardless_BankAccounts",
"PrimaryParentEntityTypeName": "Party",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "ZenGoCardless_BankAccounts",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib", "$values": [ "23197000", "0" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": [
"23197000"
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "23197000"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Enabled",
"Value": {
"$type": "System.Boolean",
"$value": true
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Currency",
"Value": "GBP"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CreatedAt",
"Value": "2019-03-04T12:46:56"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CountryCode",
"Value": "GB"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BankName",
"Value": "HSBC BANK PLC (RFB)"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AccountNumberEnding",
"Value": "90"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AccountHolderName",
"Value": "A KOPETZKY"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "CuId",
"Value": "CU0005R16SG151"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BaId",
"Value": "BA0005ESE8H5B9"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Ordinal",
"Value": {
"$type": "System.Int32",
"$value": 0
}
}
]
}
}

As you can see the value of the Ordinal is 0.

I am working on iMIS Cloud 20.3.46.8757 but this is also an issue in iMIS 2017.

Thanks!
Alex