Web Service Documentation / Categories / Basic Account Services / Create Account

Create Account

Updated on June 25, 2018

Description

This web service creates an account for the purposes of offering data exchange web services. An account is created based on the information provided in the XML request. It returns the unique identifier to the newly created account and a link to the corresponding web service to retrieve it.

Version

11.0

HTTP Method

POST

Resource URL

/account

Header

Field Name Value Comments
Content-Type application/xml

Authorization Required

No

Parameters

None

XML Schemas

Request/Response Schema Name
Request account.xsd
Response response.xsd

Example Requests

The following example creates a new account.

POST  /account

<account> <username>acme_dx_user</username> <password>PA$sw0r6</password> <webserviceUser>true</webserviceUser> <searchable>true</searchable> <contact> <firstName>John</firstName> <lastName>Doe</lastName> <address address1="123 Main St" city="Arlington" state="VA" postalCode="22201" country="US"/> <email>john_doe@acme.com</email> <jobTitle>Building Administrator Data Exchange User</jobTitle> <phone>703-555-2121</phone> </contact> <organization name="ACME Corporation"> <primaryBusiness>Other</primaryBusiness> <otherBusinessDescription>other</otherBusinessDescription> <energyStarPartner>true</energyStarPartner> <energyStarPartnerType>Service and Product Providers</energyStarPartnerType> </organization> </account>

The following example creates a new account. If the account belongs to Canada, an email preference setting (emailPreferenceCanadianAccount) can also be included which indicates whether the account can receive ENERGY STAR information from the Natural Resources of Canada (NRCAN).

POST  /account

<account> <username>acme_dx_user</username> <password>PA$sw0r6</password> <webserviceUser>true</webserviceUser> <searchable>true</searchable> <contact> <firstName>John</firstName> <lastName>Doe</lastName> <address address1="123 Main St" city="Edmonton" state="AB" postalCode="T5G 2S7" country="CA"/> <email>john_doe@acme.com</email> <jobTitle>Building Administrator Data Exchange User</jobTitle> <phone>703-555-2121</phone> </contact> <organization name="ACME Corporation"> <primaryBusiness>Other</primaryBusiness> <otherBusinessDescription>other</otherBusinessDescription> <energyStarPartner>true</energyStarPartner> <energyStarPartnerType>Service and Product Providers</energyStarPartnerType> </organization> <emailPreferenceCanadianAccount>true</emailPreferenceCanadianAccount> </account>

Example Response

The following example indicates that the account was successfully created. It also returns the new account id of 68001 and a link to web service to retrieve the account.

<response status="Ok">
    <id>68001</id>
    <links>
        <link httpMethod="GET" link="/account"
              linkDescription="This is the GET url for this Account."/>
    </links>
</response>
TEST