POST api/users/{id}/disassociation
POST api/users/{id:guid}/disassociation Records in CRM that the given user has successfully been disassociated as a member of any organisation on the website If successful returns 200 OK with the updated user in the body If backend user record exists but is not in a state from which there is a valid "disassociation" transition, then returns conflict with a helpful error message. the backend (so cannot be disassociated) returns 404 Not Found. Other CRM errors give 502 bad gateway, any other errors 500 Server Error
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | string |
None. |
Body Parameters
User| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | globally unique identifier |
None. |
|
| IdSource | integer |
None. |
|
| Login | string |
None. |
|
| FirstName | string |
None. |
|
| LastName | string |
None. |
|
| string |
None. |
||
| Telephone | string |
None. |
|
| OrgMemberNumber | string |
None. |
|
| OrgId | globally unique identifier |
None. |
|
| StatusValue | integer |
None. |
|
| StatusLabel | string |
None. |
|
| JobTitle | string |
None. |
|
| JobRole | globally unique identifier |
None. |
|
| InvitationCode | globally unique identifier |
None. |
|
| XrmContactId | globally unique identifier |
None. |
Request Formats
application/json, text/json
{
"Id": "b7efc07e-0d1d-48f4-9c22-9f0b707477f8",
"IdSource": 2,
"Login": "sample string 3",
"FirstName": "sample string 4",
"LastName": "sample string 5",
"Email": "sample string 6",
"Telephone": "sample string 7",
"OrgMemberNumber": "sample string 8",
"OrgId": "7eda9a80-eefb-4169-bffa-15d399607f5c",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "d291408a-a908-4a9b-8440-cf7d2433e01a",
"InvitationCode": "13fb0a1f-6612-4016-9b28-63d48d3c9f5f",
"XrmContactId": "bafbd9c4-f0c0-4650-ac8f-64343c67e867"
}
application/xml, text/xml
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.Webservices.Domain"> <Email>sample string 6</Email> <FirstName>sample string 4</FirstName> <Id>b7efc07e-0d1d-48f4-9c22-9f0b707477f8</Id> <IdSource>2</IdSource> <InvitationCode>13fb0a1f-6612-4016-9b28-63d48d3c9f5f</InvitationCode> <JobRole>d291408a-a908-4a9b-8440-cf7d2433e01a</JobRole> <JobTitle>sample string 11</JobTitle> <LastName>sample string 5</LastName> <Login>sample string 3</Login> <OrgId>7eda9a80-eefb-4169-bffa-15d399607f5c</OrgId> <OrgMemberNumber>sample string 8</OrgMemberNumber> <StatusLabel>sample string 10</StatusLabel> <StatusValue>9</StatusValue> <Telephone>sample string 7</Telephone> <XrmContactId>bafbd9c4-f0c0-4650-ac8f-64343c67e867</XrmContactId> </User>
application/x-www-form-urlencoded
Response Information
Resource Description
UserRepresentation| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
Unique identifier - same as in CRM |
globally unique identifier |
None. |
| LocalLogin |
Login for this system |
string |
None. |
| IdSource |
The source of identity for this user. Defined values are: 0 = reserved for test suites; 1 = SSAT website |
integer |
None. |
| FirstName |
First name |
string |
None. |
| LastName |
last name |
string |
None. |
|
Email address |
string |
None. |
|
| Telephone |
Main telephone number |
string |
None. |
| OrgMemberNumber |
Organisation membership number |
string |
None. |
| OrgId |
Organisation ID |
globally unique identifier |
None. |
| StatusValue |
User status |
integer |
None. |
| StatusLabel |
User status label |
string |
None. |
| JobTitle |
Free text job title |
string |
None. |
| JobRole |
Reference to job role from pre-set list |
globally unique identifier |
None. |
| InvitationCode |
Most recent invitation code generated by CRM |
globally unique identifier |
None. |
| XrmContactId |
Unique XRM Id for the associated contact (NB N:1 User:Contact) |
globally unique identifier |
None. |
| Links | Collection of Link |
None. |
Response Formats
application/json
{
"Id": "f497b69c-e43c-4c7a-8374-80131a4164b8",
"LocalLogin": "sample string 2",
"IdSource": 3,
"FirstName": "sample string 4",
"LastName": "sample string 5",
"Email": "sample string 6",
"Telephone": "sample string 7",
"OrgMemberNumber": "sample string 8",
"OrgId": "adf6b185-4b21-4077-b967-a19c34e27e2a",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "3a52a17f-8820-499e-8065-feb8ab8c519f",
"InvitationCode": "e586a1be-1c94-4989-b801-5698fc41349f",
"XrmContactId": "8aa109c4-9823-4a37-bbeb-0b7725ac3c82",
"_links": [
{
"Rel": "self",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8",
"Title": null,
"IsTemplated": false
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": false
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": false
},
{
"Rel": "roles",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects",
"Title": null,
"IsTemplated": false
}
],
"_embedded": null
}
text/json
{
"Id": "f497b69c-e43c-4c7a-8374-80131a4164b8",
"LocalLogin": "sample string 2",
"IdSource": 3,
"FirstName": "sample string 4",
"LastName": "sample string 5",
"Email": "sample string 6",
"Telephone": "sample string 7",
"OrgMemberNumber": "sample string 8",
"OrgId": "adf6b185-4b21-4077-b967-a19c34e27e2a",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "3a52a17f-8820-499e-8065-feb8ab8c519f",
"InvitationCode": "e586a1be-1c94-4989-b801-5698fc41349f",
"XrmContactId": "8aa109c4-9823-4a37-bbeb-0b7725ac3c82",
"_links": [
{
"Rel": "self",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8",
"Title": null,
"IsTemplated": false
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": false
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": false
},
{
"Rel": "roles",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects",
"Title": null,
"IsTemplated": false
},
{
"Rel": "roles",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects",
"Title": null,
"IsTemplated": false
}
],
"_embedded": null
}
application/xml
<UserRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1">
<Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/users/f497b69c-e43c-4c7a-8374-80131a4164b8</Href>
<LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 15</LinkName>
<Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8</Href>
<Rel>self</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>sample string 2</Href>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>sample string 2</Href>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
</Links>
<Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 13</Rel>
<Email>sample string 6</Email>
<FirstName>sample string 4</FirstName>
<Id>f497b69c-e43c-4c7a-8374-80131a4164b8</Id>
<IdSource>3</IdSource>
<InvitationCode>e586a1be-1c94-4989-b801-5698fc41349f</InvitationCode>
<JobRole>3a52a17f-8820-499e-8065-feb8ab8c519f</JobRole>
<JobTitle>sample string 11</JobTitle>
<LastName>sample string 5</LastName>
<LocalLogin>sample string 2</LocalLogin>
<OrgId>adf6b185-4b21-4077-b967-a19c34e27e2a</OrgId>
<OrgMemberNumber>sample string 8</OrgMemberNumber>
<StatusLabel>sample string 10</StatusLabel>
<StatusValue>9</StatusValue>
<Telephone>sample string 7</Telephone>
<XrmContactId>8aa109c4-9823-4a37-bbeb-0b7725ac3c82</XrmContactId>
</UserRepresentation>
text/xml
<UserRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1">
<Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/users/f497b69c-e43c-4c7a-8374-80131a4164b8</Href>
<LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 15</LinkName>
<Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8</Href>
<Rel>self</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>sample string 2</Href>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>sample string 2</Href>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
</Links>
<Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 13</Rel>
<Email>sample string 6</Email>
<FirstName>sample string 4</FirstName>
<Id>f497b69c-e43c-4c7a-8374-80131a4164b8</Id>
<IdSource>3</IdSource>
<InvitationCode>e586a1be-1c94-4989-b801-5698fc41349f</InvitationCode>
<JobRole>3a52a17f-8820-499e-8065-feb8ab8c519f</JobRole>
<JobTitle>sample string 11</JobTitle>
<LastName>sample string 5</LastName>
<LocalLogin>sample string 2</LocalLogin>
<OrgId>adf6b185-4b21-4077-b967-a19c34e27e2a</OrgId>
<OrgMemberNumber>sample string 8</OrgMemberNumber>
<StatusLabel>sample string 10</StatusLabel>
<StatusValue>9</StatusValue>
<Telephone>sample string 7</Telephone>
<XrmContactId>8aa109c4-9823-4a37-bbeb-0b7725ac3c82</XrmContactId>
</UserRepresentation>
application/hal+json
{
"Id": "f497b69c-e43c-4c7a-8374-80131a4164b8",
"LocalLogin": "sample string 2",
"IdSource": 3,
"FirstName": "sample string 4",
"LastName": "sample string 5",
"Email": "sample string 6",
"Telephone": "sample string 7",
"OrgMemberNumber": "sample string 8",
"OrgId": "adf6b185-4b21-4077-b967-a19c34e27e2a",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "3a52a17f-8820-499e-8065-feb8ab8c519f",
"InvitationCode": "e586a1be-1c94-4989-b801-5698fc41349f",
"XrmContactId": "8aa109c4-9823-4a37-bbeb-0b7725ac3c82",
"_links": {
"self": {
"href": "/users/f497b69c-e43c-4c7a-8374-80131a4164b8"
},
"sample string 1": {
"href": "sample string 2",
"title": "sample string 3"
},
"roles": {
"href": "/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles"
},
"subjects": {
"href": "/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects"
}
}
}
application/hal+xml
<resource rel="sample string 13" href="~/users/f497b69c-e43c-4c7a-8374-80131a4164b8" name="sample string 15"> <link rel="sample string 1" href="sample string 2" /> <link rel="roles" href="~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/roles" /> <link rel="subjects" href="~/users/f497b69c-e43c-4c7a-8374-80131a4164b8/subjects" /> <Id>f497b69c-e43c-4c7a-8374-80131a4164b8</Id> <LocalLogin>sample string 2</LocalLogin> <IdSource>3</IdSource> <FirstName>sample string 4</FirstName> <LastName>sample string 5</LastName> <Email>sample string 6</Email> <Telephone>sample string 7</Telephone> <OrgMemberNumber>sample string 8</OrgMemberNumber> <OrgId>adf6b185-4b21-4077-b967-a19c34e27e2a</OrgId> <StatusValue>9</StatusValue> <StatusLabel>sample string 10</StatusLabel> <JobTitle>sample string 11</JobTitle> <JobRole>3a52a17f-8820-499e-8065-feb8ab8c519f</JobRole> <InvitationCode>e586a1be-1c94-4989-b801-5698fc41349f</InvitationCode> <XrmContactId>8aa109c4-9823-4a37-bbeb-0b7725ac3c82</XrmContactId> </resource>