Register a customer (v2) [Obsolete("Use RegisterCustomer3")]

See RegisterCustomer3 for details. RegisterCustomer2 calls RegisterCustomer3 with true as doSendMail.

Request
query Parameters
password
string

An application generated password used if an Account is created. If none is supplied the password will be generated. Generated passwords are 8 random alpha numeric characters mixed lower and upper case. The password is not stored in clear text in Storm. Only a hash value of the password gets stored.

updatedBy
required
integer <int32>

Account internal id of current user. Pass 1 for the default account.

cultureCode
string

Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application.

Request Body schema:

The Customer to register. If an Account is specified it will be created as well. Customers can also be registered with or without Companies. If a supplied Company does not have an Id specified it is considered new and will be created as well. Otherwise it will be updated.

Id
integer or null <int32>

The internal Storm Id of the Customer. When creating a new Customer leave this blank as Storm will generate the Id.

Key
string <guid>

The system wide unique Key of the Customer.

Code
string

The external code. Usually the id in the erp system. MaxLength: 50

Email
string

The Email address of the Customer. MaxLength: 255

SSN
string

The social security number of the Customer. Used to identify the Customer for some payment methods. MaxLength: 50

FirstName
string

The FirstName of the Customer. MaxLength: 50

LastName
string

The LastName of the Customer. MaxLength: 50

Phone
string

The PhoneNumber of the Customer. MaxLength: 50

CellPhone
string

The CellPhone number of the Customer. MaxLength: 50

ReferId
integer or null <int32>

Used to tag a Customer with some external id.

ReferUrl
string

Used to tag a Customer with an incoming URL. MaxLength: 255

object <Account> (Account)
Array of objects <Company> (Company)

A list of Companies. A Customer can have many Companies. The first will be used as default. In the Checkout process just pass in one Company if any is to be used or the first will be used as default.

Array of objects <Address> (Address)

A list of delivery Addresses for the Customer. When needed the first address in the list will be used. So it is vital in the checkout process to either sort them or just supply one delivery address. Company addresses will override Customer addresses if both exists in the Checkout process.

object <Address> (Address)
Array of objects <Flag> (Flag)

A list of Flags for the Customer. See Flag for information about flags. Flags can be used in Promotions or otherwise to provide custom handling of specific Customers.

UseInvoiceAddressAsDeliveryAddress
boolean

Can be use when updating or inserting addresses on Customer. If set to true the invoice address will be used as a delivery address as well. Then just an invoice address needs to be passed in. The deliveryAddress will be ignored. If set to false both invoice address and delivery address must be specified.

Array of objects <IdValue> (IdValue)

Contains a list of id-value pairs specific to the client for this customer. Use ApplicationService.ListCustomerInfoTypes for id lookup.

PricelistIds
Array of integers <int32>

Contains a list of priceList ids valid for this customer. It will be empty if no priceLists exist. It can be used to check products lists if they are from a customer specific priceList. No need to pass this into List-methods since they are considered any way in the methods. This property should be considered as ReadOnly as priceLists are maintained else where.

CrmId
string

Used to save the Customers external id from a crm-system MaxLength: 50

IsActive
boolean or null

Specifies if the Customer is active or not.

Created
string or null <date-time>

When the customer was created.

Updated
string or null <date-time>

When the customer was last updated.

Responses
200

Success

400

Bad Request

Key: AccountAlreadyExists. Gets raised when the account already exists, if Account is supplied.

Key: CompanyAlreadyExists. Gets raised when there already exists a company with the specified organizational number/name combination.

Key: CustomerAlreadyExists. Gets raised when there already exists a Customer with the specified email.

Key: InvalidCompanyName. Gets raised if any Company.Name is missing.

Key: InvalidEmail. Gets raised if an email is supplied and it is invalid.

Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Zip code.

Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress is supplied and it is missing a City.

Key: DeliveryAddressCountryMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Country.

Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Zip code.

Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress is supplied and it is missing a City.

Key: InvoiceAddressCountryMissing. Gets raised if any DeliveryAddress is supplied and it is missing a Country.

500

Internal Server Error

post/CustomerService.svc/rest/RegisterCustomer2
Request samples
{
  • "Id": 0,
  • "Key": "string",
  • "Code": "string",
  • "Email": "string",
  • "SSN": "string",
  • "FirstName": "string",
  • "LastName": "string",
  • "Phone": "string",
  • "CellPhone": "string",
  • "ReferId": 0,
  • "ReferUrl": "string",
  • "Account": {
    },
  • "Companies": [
    ],
  • "DeliveryAddresses": [
    ],
  • "InvoiceAddress": {
    },
  • "Flags": [
    ],
  • "UseInvoiceAddressAsDeliveryAddress": true,
  • "Info": [
    ],
  • "PricelistIds": [
    ],
  • "CrmId": "string",
  • "IsActive": true,
  • "Created": "2019-08-24T14:15:22Z",
  • "Updated": "2019-08-24T14:15:22Z"
}
Response samples
{
  • "Id": 0,
  • "Key": "string",
  • "Code": "string",
  • "Email": "string",
  • "SSN": "string",
  • "FirstName": "string",
  • "LastName": "string",
  • "Phone": "string",
  • "CellPhone": "string",
  • "ReferId": 0,
  • "ReferUrl": "string",
  • "Account": {
    },
  • "Companies": [
    ],
  • "DeliveryAddresses": [
    ],
  • "InvoiceAddress": {
    },
  • "Flags": [
    ],
  • "UseInvoiceAddressAsDeliveryAddress": true,
  • "Info": [
    ],
  • "PricelistIds": [
    ],
  • "CrmId": "string",
  • "IsActive": true,
  • "Created": "2019-08-24T14:15:22Z",
  • "Updated": "2019-08-24T14:15:22Z"
}