POST api/useraccount/create

Adds a new user with the username provided. The user will be non- activated and have a generated password applied. The Register service should be used to complete the on-boarding process.

Request Information

URI Parameters

None.

Body Parameters

The credentials. In this service, the password field is not expected.

ERP.Domain.Common.Auth.NamedAccountCredentials
NameDescriptionTypeAdditional information
Name

string

None.

Username

string

None.

Password

string

None.

Source

string

None.

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "username": "sample string 2",
  "password": "********",
  "source": "sample string 4"
}

application/xml, text/xml

Sample:
<NamedAccountCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ERP.Domain.Common.Auth">
  <Password>sample string 3</Password>
  <Source>sample string 4</Source>
  <Username>sample string 2</Username>
  <Name>sample string 1</Name>
</NamedAccountCredentials>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'ERP.Domain.Common.Auth.NamedAccountCredentials'.

Response Information

Resource Description

ERP.Api.Models.CustomerPortal.PortalUserBasicModel
NameDescriptionTypeAdditional information
Username

Gets or sets the username.

string

None.

CustomerId

Gets or sets the customer id which for now is the contact id.

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "username": "sample string 1",
  "customerId": 2
}

application/xml, text/xml

Sample:
<PortalUserBasicModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ERP.Api.Models.CustomerPortal">
  <CustomerId>2</CustomerId>
  <Username>sample string 1</Username>
</PortalUserBasicModel>