Set default company for customer

Updates the default company for this customer. If no Company is set as default, the first Company will be used as default where needed.

Request
query Parameters
companyId
required
integer <int32>

The internal id of the Company to set as default.

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.

includeCompanies
string

Include full company data, if any, with the customer. Otherwise only primary company, if any, is included. Default is true.

Request Body schema:

The Customer for which the default Company is set.

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

500

Internal Server Error

post/CustomerService.svc/rest/SetDefaultCompany
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"
}