POST api/account

V1 - Adds a new user to the system.
An empty profile is created which can be updated using the /api/profile methods on the public API.
NOTE: Before the account can be used, it needs to be validated by the user through the ConfirmationCode. The vendor needs to send this code to the user and the user needs to present this code proving the validity of the users e-mail address. Once the vendor presents the ConfirmationCode to the API, the account will be unlocked.

Request Information

URI Parameters

None.

Body Parameters

UserRegistration
NameDescriptionTypeAdditional information
Email

The users email address.

string

Required

Data type: EmailAddress

Username

The requested username.

string

Required

Data type: Text

Password

The users password. This needs to meet complexity criteria.

  • At least one lowercase letter
  • At least one uppercase letter
  • At least one digit
  • At least one non-alphanumeric character
  • A minimum of six characters

string

Required

Data type: Password

String length: inclusive between 6 and 100

Firstname

The users firstname.

string

Required

Data type: Text

Lastname

The users lastname.

string

Required

Data type: Text

Request Formats

application/json, text/json

Sample:
{
  "Email": "sample string 1",
  "Username": "sample string 2",
  "Password": "sample string 3",
  "Firstname": "sample string 4",
  "Lastname": "sample string 5"
}

text/javascript

Sample:
{"Email":"sample string 1","Username":"sample string 2","Password":"sample string 3","Firstname":"sample string 4","Lastname":"sample string 5"}

application/xml, text/xml

Sample:
<UserRegistration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VersionedVendorApi.Models">
  <Email>sample string 1</Email>
  <Firstname>sample string 4</Firstname>
  <Lastname>sample string 5</Lastname>
  <Password>sample string 3</Password>
  <Username>sample string 2</Username>
</UserRegistration>

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 'UserRegistration'.

Response Information

Resource Description

RegistrationResult
NameDescriptionTypeAdditional information
UserID

The UserID is created when the registration is completed.

string

None.

Email

The registered email address.

string

Data type: EmailAddress

Username

The registered username.

string

Data type: Text

ConfirmationCode

A generated code that needs to be provided to confirm the newly created user account.

string

Data type: Text

Status

YindoApiStatus defines statuscodes.

YindoApiStatus

None.

Response Formats

application/json, text/json

Sample:
{
  "UserID": "sample string 1",
  "Email": "sample string 2",
  "Username": "sample string 3",
  "ConfirmationCode": "sample string 4",
  "Status": {
    "Code": 0,
    "Text": "sample string 1"
  }
}

text/javascript

Sample:
{"UserID":"sample string 1","Email":"sample string 2","Username":"sample string 3","ConfirmationCode":"sample string 4","Status":{"Code":0,"Text":"sample string 1"}}

application/xml, text/xml

Sample:
<RegistrationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VersionedVendorApi.Models">
  <Status xmlns="http://schemas.datacontract.org/2004/07/Yindo.BLL.API">
    <Code>Success</Code>
    <Text>sample string 1</Text>
  </Status>
  <ConfirmationCode>sample string 4</ConfirmationCode>
  <Email>sample string 2</Email>
  <UserID>sample string 1</UserID>
  <Username>sample string 3</Username>
</RegistrationResult>