This API call is used to create both an Account and its first User.
[BaseURL]/Account
POST
dece:Account-type
@UserClass
Must be set to urn:dece:role:user:class:full
Name
ContactInfo
Credentials
/Account/UserList/User/Languages/Language
If not provided, language will be selected based on the Account’s country.
/Account/UserList/User/Credentials/Password
If not provided, a random password will be generated.
HTTP 201 Created
Location: [BaseURL]/Account/{AccountID}/User/{UserID}
A reference to the newly created User
urn:dece:role:user:class:full
The following example creates a new Account and the first full access User. Here we also set the Users Password (/Account/UserList/User/Credentials/Password
) and Language preference (/Account/UserList/User/Languages/Language
).
POST /rest/2015/02/Account HTTP/1.1
Host: api.uvvu.com
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Account xmlns="http://www.decellc.org/schema/2015/03/coordinator">
<DisplayName>John's Account</DisplayName>
<Country>US</Country>
<UserList>
<User UserClass="urn:dece:role:user:class:full">
<Name>
<GivenName>John</GivenName>
<SurName>Smith</SurName>
</Name>
<ContactInfo>
<PrimaryEmail>
<Value>JohnK@anymail.com</Value>
</PrimaryEmail>
</ContactInfo>
<Languages>
<Language>en-US</Language>
</Languages>
<Credentials>
<Username>john_the_user</Username>
<Password>Secret.123</Password>
</Credentials>
</User>
</UserList>
</Account>
HTTP/1.1 200
Date: [Date]
Location: https://api.uvvu.com/rest/2015/02/Account/urn:dece:accountid:org:dece:98C61D79D9644410751EAF34C13BADA8/User/urn:dece:userid:org:dece:A8C61D79D9644410751EAF34C13BADA8
X-transaction-info: [TransactionInfo]