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

Discussions

Ask a Question
Back to All

How to get and post data to https://reinz.imiscloud.com/api/CsRelationship/ endpoint?

Hi,

I need some help on this.

I am trying to post data to https://reinz.imiscloud.com/api/CsRelationship/ endpoint and before posting I can't get the data through an id using above endpoint.

I am getting 400 bad request when I try to get data through id.

This is the URL I used to get data- https://reinz.imiscloud.com/api/CsRelationship/411609

Error message:

{"$type":"Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts","Errors":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[{"$type":"Asi.Soa.Core.DataContracts.ValidationResultData, Asi.Contracts","Message":"The identity did not match expected number of elements."}]},"Warnings":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[]}}

Also, if I try to post data, I am getting "Do not have permission". I followed the example shared on this post https://developer.imis.com/discuss/5f45283c22311e044a92fcb8 but doesn't worked for me.

Here is the json, I am trying to post

{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "CsRelationship",
"PrimaryParentEntityTypeName": "Party",
"PrimaryParentIdentity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "Party",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
"$values": [
"411609"
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "BeginDate",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "EndDate",
"Value": "0001-01-01T00:00:00"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "FunctionalTitle",
"Value": ""
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "GroupCode",
"Value": ""
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "411609"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Note",
"Value": ""
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "RelatedToID",
"Value": "411613"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "RelatedToName",
"Value": ""
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Relationship",
"Value": "INCHARGE"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Status",
"Value": ""
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Title",
"Value": ""
}
]
}
}
I hope to hear soon with some reply that works for this endpoint.

Many thanks