HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

REST API - adding ExpirationDate to Relationship - POST to /GroupMember

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

Contact us
Copyright © Advanced Solutions International, All rights reserved.