pem.addAccount

This method is supported by Operations starting from version 2.3.

This method creates an Account for Reseller or Customer in Operations. Note that this method does not create an Account’s Staff Member; use pem.addAccountMember method for this purpose.

The request must contain either the set of Account information parameters such as person, address, phone, fax, email or the external_info that uniquely identifies External System where Operations should get appropriate data.

Important: You should always call pem.addAccountMember just after pem.addAccount. Otherwise, the deployment will be considered incorrect and, in general, subsequent call of pem.activateSubscription will lead to the unpredictable result.

The method has the following input parameters:

Name

Type

Short Description

[account_id]

int

The ID of the Account to create. This ID is generated by External System. Optional parameter. If this parameter is not specified, Operations will generate it according its internal sequence of IDs.

[account_type]

string

Indicates the type of the Account to create. It can take the following values:

  • C Indicates that the Account is created for Customer. Default value.
  • R Indicates that the Account is created for Reseller.

[subscription_id]

int

The ID of Subscription that provides resource Client accounts or Reseller accounts depending on Account type. If subscription_id parameter is specified, then the Operations searches that concrete Subscription for appropriate resource. Method would fail if no resource found. If subscription_id is not specified, then the method will look at all owner's Subscriptions and search least loaded resource of the needed type.

[parent_account_id]

int

Account ID of a parent Account. Operations Provider's Account is the default value.

[branded_domain_name]

string

The domain, brand is created on. If such domain is specified, the created account is bound to this brand. If parameter is omitted, the brand is selected in the following way:

  • The 'Inherit branding configuration' System Property is disabled. If a vendor’s account has a default brand, a new account is bound to this brand. Otherwise, a new account is not bound to any brand (system-wide service names are used for accessing hosting services).
  • The 'Inherit branding configuration' System Property is enabled. There are the following scenarios:
    • If a vendor’s account has a default brand, a new account is bound to this brand.
    • Vendor’s account has no default brand, but vendor’s account is bound to a brand of parent vendor’s account. In this scenario a new account is bound to a brand of parent vendor’s account.
    • Vendor’s account has no default brand and it is not bound to a brand of parent vendor’s account. In this scenario Operations looks up for a brand in the hierarchy of accounts: a default brand of parent vendor’s account (if such default brand exists) or brand to which parent vendor’s account is bound (if such brand exists), right up to the Provider’s account. If Operations finds the required brand, a new account is bound to this brand. Otherwise, a new account is not bound to any brand (system-wide service names are used for accessing hosting services).
Send the following info, if Operations uses external account info storage:
[external_info]

struct

 
  • system_id

string

The reference ID to External System that stores Account info

  • external_account_id

string

Some Account identifier that will be passed to the External System for identification of this Account.

Send the following info, if Operations stores account info in its own database:
[person]

struct

Contains general information about person/company represented by the Account being created.

  • [title]

string

This is salutation like “Mr.” or “Mrs.”, etc.

  • first_name

string

The first name of the person represented by the Account.

  • [middle_name]

string

The middle name of the person represented by the Account.

  • last_name

string

The last name of the person represented by the Account.

  • [company_name]

string

The name of the company represented by the Account. If the company is not specified, first name, middle name and last name will be used instead.

[address]

struct

Contains address information for the person/company represented by the Account being created.

  • street_name

string

Name of the street.

  • [house_num]

string

The number of the house.

  • [address2]

string

Second address.

  • zipcode

string

Postal code.

  • city

string

Name of the city.

  • country

string

This is the code of the country represented by two lowercased letters, like us, uk, etc.

  • state

string

Name of the state/province.

[phone]

struct

Contains phone information for the person/company represented by the Account being created.

  • country_code

string

Country code part of the phone number.

  • area_code

string

Area code part of the phone number.

  • phone_num

string

The phone number itself.

  • ext_num

string

Extension to the phone number, if present.

[fax]

struct

Contains fax information for the person/company represented by the Account being created.

  • country_code

string

Country code part of the fax number.

  • area_code

string

Area code part of the fax number.

  • phone_num

string

The fax number itself.

  • ext_num

string

Extension to the fax number, if present.

[email]

string

The e-mail address of the person/company represented by the Account being created.

[locale]

struct

Locale of Account.

  • language_code

string

Language code (two-letter code system), for example: en, de, etc.

  • country_code

string

Country code (two-letter code system), for example: US, DE, etc.

  • variant

string

Variant code. It contains a customization of Locale (this field can be empty).

[note]

string

A note that contains some additional information about the customer (or about the reseller). The note maximum length is 255 symbols.

The method has the following output parameters:

Name

Type

Short Description

account_id

int

ID of the created Account.

For XML-RPC sample of using this method see pem.addAccount Sample section in XML-RPC Samples appendix.

See also:

pem.addAccountMember method.