POST api/users/{id}/registration

POST api/users/{id:guid}/registration Records in CRM that the given user has successfully registered 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 "Registered" transition, then returns conflict with a helpful error message. If the user does not exist in the backend (so cannot be registered) returns 404 Not Found. Other CRM errors give 502 bad gateway, any other errors 500 Server Error

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

string

None.

Body Parameters

User
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

IdSource

integer

None.

Login

string

None.

FirstName

string

None.

LastName

string

None.

Email

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

Sample:
{
  "Id": "83ddb8b0-deb9-46be-9da1-290773104abc",
  "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": "5d391411-483e-48cf-8971-6d68e8866df4",
  "StatusValue": 9,
  "StatusLabel": "sample string 10",
  "JobTitle": "sample string 11",
  "JobRole": "d5734702-849f-4812-8513-18fbaf660b7e",
  "InvitationCode": "c6362c8d-fd71-4c68-891e-4d416bd14e66",
  "XrmContactId": "c45bef15-da02-4973-ac8f-c5503fc0a953"
}

application/xml, text/xml

Sample:
<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>83ddb8b0-deb9-46be-9da1-290773104abc</Id>
  <IdSource>2</IdSource>
  <InvitationCode>c6362c8d-fd71-4c68-891e-4d416bd14e66</InvitationCode>
  <JobRole>d5734702-849f-4812-8513-18fbaf660b7e</JobRole>
  <JobTitle>sample string 11</JobTitle>
  <LastName>sample string 5</LastName>
  <Login>sample string 3</Login>
  <OrgId>5d391411-483e-48cf-8971-6d68e8866df4</OrgId>
  <OrgMemberNumber>sample string 8</OrgMemberNumber>
  <StatusLabel>sample string 10</StatusLabel>
  <StatusValue>9</StatusValue>
  <Telephone>sample string 7</Telephone>
  <XrmContactId>c45bef15-da02-4973-ac8f-c5503fc0a953</XrmContactId>
</User>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'User'.

Response Information

Resource Description

UserRepresentation
NameDescriptionTypeAdditional 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

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

Sample:
{
  "Id": "b5439beb-386f-4308-af29-6684c97b3f3f",
  "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": "25ed9a02-bd83-4fa0-a30a-4c7d381ce01e",
  "StatusValue": 9,
  "StatusLabel": "sample string 10",
  "JobTitle": "sample string 11",
  "JobRole": "ee9b7043-78da-4c68-aa93-bd5cbc9c412a",
  "InvitationCode": "00397a16-a27e-4e7e-b98a-3f454b49c4d1",
  "XrmContactId": "46a8d64e-dbd3-4e23-9f32-839f5dc178ff",
  "_links": [
    {
      "Rel": "self",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f",
      "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/b5439beb-386f-4308-af29-6684c97b3f3f/roles",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "subjects",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects",
      "Title": null,
      "IsTemplated": false
    }
  ],
  "_embedded": null
}

text/json

Sample:
{
  "Id": "b5439beb-386f-4308-af29-6684c97b3f3f",
  "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": "25ed9a02-bd83-4fa0-a30a-4c7d381ce01e",
  "StatusValue": 9,
  "StatusLabel": "sample string 10",
  "JobTitle": "sample string 11",
  "JobRole": "ee9b7043-78da-4c68-aa93-bd5cbc9c412a",
  "InvitationCode": "00397a16-a27e-4e7e-b98a-3f454b49c4d1",
  "XrmContactId": "46a8d64e-dbd3-4e23-9f32-839f5dc178ff",
  "_links": [
    {
      "Rel": "self",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f",
      "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/b5439beb-386f-4308-af29-6684c97b3f3f/roles",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "subjects",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "roles",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles",
      "Title": null,
      "IsTemplated": false
    },
    {
      "Rel": "subjects",
      "Href": "~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects",
      "Title": null,
      "IsTemplated": false
    }
  ],
  "_embedded": null
}

application/xml

Sample:
<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/b5439beb-386f-4308-af29-6684c97b3f3f</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/b5439beb-386f-4308-af29-6684c97b3f3f</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/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects</Href>
      <Rel>subjects</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects</Href>
      <Rel>subjects</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/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>b5439beb-386f-4308-af29-6684c97b3f3f</Id>
  <IdSource>3</IdSource>
  <InvitationCode>00397a16-a27e-4e7e-b98a-3f454b49c4d1</InvitationCode>
  <JobRole>ee9b7043-78da-4c68-aa93-bd5cbc9c412a</JobRole>
  <JobTitle>sample string 11</JobTitle>
  <LastName>sample string 5</LastName>
  <LocalLogin>sample string 2</LocalLogin>
  <OrgId>25ed9a02-bd83-4fa0-a30a-4c7d381ce01e</OrgId>
  <OrgMemberNumber>sample string 8</OrgMemberNumber>
  <StatusLabel>sample string 10</StatusLabel>
  <StatusValue>9</StatusValue>
  <Telephone>sample string 7</Telephone>
  <XrmContactId>46a8d64e-dbd3-4e23-9f32-839f5dc178ff</XrmContactId>
</UserRepresentation>

text/xml

Sample:
<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/b5439beb-386f-4308-af29-6684c97b3f3f</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/b5439beb-386f-4308-af29-6684c97b3f3f</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/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects</Href>
      <Rel>subjects</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects</Href>
      <Rel>subjects</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects</Href>
      <Rel>subjects</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles</Href>
      <Rel>roles</Rel>
      <Title i:nil="true" />
    </Link>
    <Link>
      <Href>~/users/b5439beb-386f-4308-af29-6684c97b3f3f/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>b5439beb-386f-4308-af29-6684c97b3f3f</Id>
  <IdSource>3</IdSource>
  <InvitationCode>00397a16-a27e-4e7e-b98a-3f454b49c4d1</InvitationCode>
  <JobRole>ee9b7043-78da-4c68-aa93-bd5cbc9c412a</JobRole>
  <JobTitle>sample string 11</JobTitle>
  <LastName>sample string 5</LastName>
  <LocalLogin>sample string 2</LocalLogin>
  <OrgId>25ed9a02-bd83-4fa0-a30a-4c7d381ce01e</OrgId>
  <OrgMemberNumber>sample string 8</OrgMemberNumber>
  <StatusLabel>sample string 10</StatusLabel>
  <StatusValue>9</StatusValue>
  <Telephone>sample string 7</Telephone>
  <XrmContactId>46a8d64e-dbd3-4e23-9f32-839f5dc178ff</XrmContactId>
</UserRepresentation>

application/hal+json

Sample:
{
  "Id": "b5439beb-386f-4308-af29-6684c97b3f3f",
  "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": "25ed9a02-bd83-4fa0-a30a-4c7d381ce01e",
  "StatusValue": 9,
  "StatusLabel": "sample string 10",
  "JobTitle": "sample string 11",
  "JobRole": "ee9b7043-78da-4c68-aa93-bd5cbc9c412a",
  "InvitationCode": "00397a16-a27e-4e7e-b98a-3f454b49c4d1",
  "XrmContactId": "46a8d64e-dbd3-4e23-9f32-839f5dc178ff",
  "_links": {
    "self": {
      "href": "/users/b5439beb-386f-4308-af29-6684c97b3f3f"
    },
    "sample string 1": {
      "href": "sample string 2",
      "title": "sample string 3"
    },
    "roles": {
      "href": "/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles"
    },
    "subjects": {
      "href": "/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects"
    }
  }
}

application/hal+xml

Sample:
<resource rel="sample string 13" href="~/users/b5439beb-386f-4308-af29-6684c97b3f3f" name="sample string 15">
  <link rel="sample string 1" href="sample string 2" />
  <link rel="roles" href="~/users/b5439beb-386f-4308-af29-6684c97b3f3f/roles" />
  <link rel="subjects" href="~/users/b5439beb-386f-4308-af29-6684c97b3f3f/subjects" />
  <Id>b5439beb-386f-4308-af29-6684c97b3f3f</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>25ed9a02-bd83-4fa0-a30a-4c7d381ce01e</OrgId>
  <StatusValue>9</StatusValue>
  <StatusLabel>sample string 10</StatusLabel>
  <JobTitle>sample string 11</JobTitle>
  <JobRole>ee9b7043-78da-4c68-aa93-bd5cbc9c412a</JobRole>
  <InvitationCode>00397a16-a27e-4e7e-b98a-3f454b49c4d1</InvitationCode>
  <XrmContactId>46a8d64e-dbd3-4e23-9f32-839f5dc178ff</XrmContactId>
</resource>