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": "0ffa563a-7253-46e6-9d1e-24384ab8517d",
"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": "800d4b5e-c8ba-41e8-9c8f-d9312ca24aa2",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "b4ce0a14-9ddd-4899-bbbd-caabcf0718d6",
"InvitationCode": "4a12bf7f-e97b-461e-bb6f-9a576e63020a",
"XrmContactId": "6df288c9-ff28-4af2-a04c-edda3bc6ffc7"
}
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>0ffa563a-7253-46e6-9d1e-24384ab8517d</Id> <IdSource>2</IdSource> <InvitationCode>4a12bf7f-e97b-461e-bb6f-9a576e63020a</InvitationCode> <JobRole>b4ce0a14-9ddd-4899-bbbd-caabcf0718d6</JobRole> <JobTitle>sample string 11</JobTitle> <LastName>sample string 5</LastName> <Login>sample string 3</Login> <OrgId>800d4b5e-c8ba-41e8-9c8f-d9312ca24aa2</OrgId> <OrgMemberNumber>sample string 8</OrgMemberNumber> <StatusLabel>sample string 10</StatusLabel> <StatusValue>9</StatusValue> <Telephone>sample string 7</Telephone> <XrmContactId>6df288c9-ff28-4af2-a04c-edda3bc6ffc7</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": "0cde27ed-27da-494c-883d-b666fdceea74",
"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": "b4a8223c-3832-431e-a00e-1a3d6f0c87bc",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "2b49b127-e9f7-4778-8183-f28c244f88c3",
"InvitationCode": "1f1a306c-034d-4a33-a9aa-33b7e998fb78",
"XrmContactId": "b39f263c-85a5-41bc-87c6-dad58872931f",
"_links": [
{
"Rel": "self",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74",
"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/0cde27ed-27da-494c-883d-b666fdceea74/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects",
"Title": null,
"IsTemplated": false
}
],
"_embedded": null
}
text/json
{
"Id": "0cde27ed-27da-494c-883d-b666fdceea74",
"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": "b4a8223c-3832-431e-a00e-1a3d6f0c87bc",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "2b49b127-e9f7-4778-8183-f28c244f88c3",
"InvitationCode": "1f1a306c-034d-4a33-a9aa-33b7e998fb78",
"XrmContactId": "b39f263c-85a5-41bc-87c6-dad58872931f",
"_links": [
{
"Rel": "self",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74",
"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/0cde27ed-27da-494c-883d-b666fdceea74/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects",
"Title": null,
"IsTemplated": false
},
{
"Rel": "roles",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles",
"Title": null,
"IsTemplated": false
},
{
"Rel": "subjects",
"Href": "~/users/0cde27ed-27da-494c-883d-b666fdceea74/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/0cde27ed-27da-494c-883d-b666fdceea74</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/0cde27ed-27da-494c-883d-b666fdceea74</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/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/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>0cde27ed-27da-494c-883d-b666fdceea74</Id>
<IdSource>3</IdSource>
<InvitationCode>1f1a306c-034d-4a33-a9aa-33b7e998fb78</InvitationCode>
<JobRole>2b49b127-e9f7-4778-8183-f28c244f88c3</JobRole>
<JobTitle>sample string 11</JobTitle>
<LastName>sample string 5</LastName>
<LocalLogin>sample string 2</LocalLogin>
<OrgId>b4a8223c-3832-431e-a00e-1a3d6f0c87bc</OrgId>
<OrgMemberNumber>sample string 8</OrgMemberNumber>
<StatusLabel>sample string 10</StatusLabel>
<StatusValue>9</StatusValue>
<Telephone>sample string 7</Telephone>
<XrmContactId>b39f263c-85a5-41bc-87c6-dad58872931f</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/0cde27ed-27da-494c-883d-b666fdceea74</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/0cde27ed-27da-494c-883d-b666fdceea74</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/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects</Href>
<Rel>subjects</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles</Href>
<Rel>roles</Rel>
<Title i:nil="true" />
</Link>
<Link>
<Href>~/users/0cde27ed-27da-494c-883d-b666fdceea74/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>0cde27ed-27da-494c-883d-b666fdceea74</Id>
<IdSource>3</IdSource>
<InvitationCode>1f1a306c-034d-4a33-a9aa-33b7e998fb78</InvitationCode>
<JobRole>2b49b127-e9f7-4778-8183-f28c244f88c3</JobRole>
<JobTitle>sample string 11</JobTitle>
<LastName>sample string 5</LastName>
<LocalLogin>sample string 2</LocalLogin>
<OrgId>b4a8223c-3832-431e-a00e-1a3d6f0c87bc</OrgId>
<OrgMemberNumber>sample string 8</OrgMemberNumber>
<StatusLabel>sample string 10</StatusLabel>
<StatusValue>9</StatusValue>
<Telephone>sample string 7</Telephone>
<XrmContactId>b39f263c-85a5-41bc-87c6-dad58872931f</XrmContactId>
</UserRepresentation>
application/hal+json
{
"Id": "0cde27ed-27da-494c-883d-b666fdceea74",
"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": "b4a8223c-3832-431e-a00e-1a3d6f0c87bc",
"StatusValue": 9,
"StatusLabel": "sample string 10",
"JobTitle": "sample string 11",
"JobRole": "2b49b127-e9f7-4778-8183-f28c244f88c3",
"InvitationCode": "1f1a306c-034d-4a33-a9aa-33b7e998fb78",
"XrmContactId": "b39f263c-85a5-41bc-87c6-dad58872931f",
"_links": {
"self": {
"href": "/users/0cde27ed-27da-494c-883d-b666fdceea74"
},
"sample string 1": {
"href": "sample string 2",
"title": "sample string 3"
},
"roles": {
"href": "/users/0cde27ed-27da-494c-883d-b666fdceea74/roles"
},
"subjects": {
"href": "/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects"
}
}
}
application/hal+xml
<resource rel="sample string 13" href="~/users/0cde27ed-27da-494c-883d-b666fdceea74" name="sample string 15"> <link rel="sample string 1" href="sample string 2" /> <link rel="roles" href="~/users/0cde27ed-27da-494c-883d-b666fdceea74/roles" /> <link rel="subjects" href="~/users/0cde27ed-27da-494c-883d-b666fdceea74/subjects" /> <Id>0cde27ed-27da-494c-883d-b666fdceea74</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>b4a8223c-3832-431e-a00e-1a3d6f0c87bc</OrgId> <StatusValue>9</StatusValue> <StatusLabel>sample string 10</StatusLabel> <JobTitle>sample string 11</JobTitle> <JobRole>2b49b127-e9f7-4778-8183-f28c244f88c3</JobRole> <InvitationCode>1f1a306c-034d-4a33-a9aa-33b7e998fb78</InvitationCode> <XrmContactId>b39f263c-85a5-41bc-87c6-dad58872931f</XrmContactId> </resource>