Discussions
REST API - adding ExpirationDate to Relationship - POST to /GroupMember
over 1 year ago by Max
Hi - I'm trying to add an expiration to a relationship. So I'm doing GET /api/GroupMember?EntityId=RELATIONSHIP-473180:477346
{
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberData, Asi.Contracts",
"MembershipDetails": {
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberDetailDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberDetailData, Asi.Contracts",
"GroupMemberDetailId": "RELATIONSHIP-473180:477346:95478",
"IsActive": true
...
}
]
},
"GroupMemberId": "RELATIONSHIP-473180:477346",
...
},
"Party": {
"$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts",
...
},
"IsActive": true
}
Then I add the expiration date and PUT to the same endpoint:
{
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberData, Asi.Contracts",
"MembershipDetails": {
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberDetailDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Membership.DataContracts.GroupMemberDetailData, Asi.Contracts",
"GroupMemberDetailId": "RELATIONSHIP-473180:477346:95478",
"ExpirationDate": "2023-05-31T00:00:00",
"IsActive": true
...
}
]
},
"GroupMemberId": "RELATIONSHIP-473180:477346",
...
},
"Party": {
"$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts",
...
},
"IsActive": true
}
Then the response to the POST does show the expiration date, but when I GET the same entity again, the expiration date is missing.
Can you let me know what the requirements are to add an expiration date to a relationship so it sticks? Thanks