# Login a user Login tries to login a user. In order to enable Customers to login they need to be created with an Account. Endpoint: POST /LoginPost Version: 1.1 ## Request fields (application/json): - `LoginName` (string) User login name MaxLength: 255. - `Password` (string) User's password MaxLength: 4000. - `CultureCode` (string) Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application. MaxLength: 16. - `IncludeCompanies` (string) Include full company data, if any, with the customer. Otherwise only primary company, if any, is included. Default is true. MaxLength: bool. ## Response 200 fields (application/json): - `Id` (integer,null) The internal Storm Id of the Customer. When creating a new Customer leave this blank as Storm will generate the Id. - `Key` (string) 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,null) Used to tag a Customer with some external id. - `ReferUrl` (string) Used to tag a Customer with an incoming URL. MaxLength: 255. - `Account` (object) - `Account.Id` (integer,null) The internal Id of the Account. This value should be used as updatedBy/createdBy in API-Methods. When creating a new Account on a Customer leave this blank as Storm will generate the Id. - `Account.Key` (string) The system wide unique Key for the Account. - `Account.LoginName` (string) This is the login name used when logging in. Normally this is the email address. Care must be taken when user updates their emailAddress. Normally this update is just for Customer.Email. It is up to the Application to keep Customer.Email in sync with Account.LoginName if they are the same. MaxLength: 255. - `Account.Name` (string) This is the full name of the connected Customer's first and last name. MaxLength: 100. - `Account.Roles` (array) This is an integer list of Role.Ids. See Application.Roles for available roles for the Application. This can be used to authorize roles to different parts of an Application. - `Account.Authorizations` (array) This is an IdValue list of Authorizations. See Application.Authorizations for available values for the Application. This can be used to authorize users to different parts of an Application. - `Account.Authorizations.Id` (integer) The internal Id of the Entity. This Id might be different in different tiers such as Stage and Production. Use Code if hard coding is required. - `Account.Authorizations.Value` (string) The Value of the Entity. MaxLength: max. - `Account.Authorizations.Code` (string) The Code of the Entity, if existing. Use this value when hard coding is required. MaxLength: 255. - `Account.IsActive` (boolean) Indicates if the Account is Active or not. Use UpdateAccountStatus to change this value. - `Companies` (array) 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. - `Companies.Id` (integer,null) The internal Storm Id for the Company. When creating a new Company leave this blank as Storm will generate the Id. - `Companies.Key` (string) The system wide unique Key of the Company. - `Companies.Name` (string) The Name of the Company. MaxLength: 100. - `Companies.OrgNo` (string) The organizational number of the Company. Used to identify the Company for some payment methods. The combination of OrgNo and Name must be unique. MaxLength: 50. - `Companies.Phone` (string) The Phone number of the Company. MaxLength: 50. - `Companies.ReferId` (integer,null) Used to tag a Company with some external id. - `Companies.ReferUrl` (string) Used to tag a Company with an incoming URL. MaxLength: 255. - `Companies.DeliveryAddresses` (array) A list of delivery Addresses for the Company. 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. - `Companies.DeliveryAddresses.Id` (integer,null) The internal Id of the Address. When creating a new Address leave this blank as Storm will generate the Id. - `Companies.DeliveryAddresses.CareOf` (string) The CareOf of the Address. MaxLength: 100. - `Companies.DeliveryAddresses.Line1` (string) The first address line of the Address. MaxLength: 255. - `Companies.DeliveryAddresses.Line2` (string) The second address line of the Address. MaxLength: 255. - `Companies.DeliveryAddresses.Zip` (string) The zip code of the Address. MaxLength: 50. - `Companies.DeliveryAddresses.City` (string) The City of the Address. MaxLength: 50. - `Companies.DeliveryAddresses.CountryId` (integer) The internal Id for the country associated to the Address. When creating or updating Country on an Address either specify the CountryId or just the Country string. If Id is specified it will be used to resolve the Name. If none is specified the default for the Application will be used. - `Companies.DeliveryAddresses.Country` (string) The country name of the Address. When creating or updating Country on an Address either specify the CountryId or just the Country string. If Name is specified it will be used to resolve the Name and Id. Name should then be specified as Country.Code since Names are culture specific. If none is specified the default for the Application will be used. MaxLength: 50. - `Companies.DeliveryAddresses.Region` (string) The Region of the Address. MaxLength: 50. - `Companies.DeliveryAddresses.IsValidated` (boolean) Indicates if the address had been validated. It is up to the Application to validate addresses. Use normal address-methods to update this value. - `Companies.DeliveryAddresses.GlobalLocationNo` (string) The Global Location Number (GLN) is part of the GS1 systems of standards. It is a simple tool used to identify a location and can identify locations uniquely where required. This is only used for invoice addresses. MaxLength: 50. - `Companies.DeliveryAddresses.ShippingPhoneNumber` (string) Phone number for shipping address. Only applicable in shipping addresses. MaxLength: 50. - `Companies.InvoiceAddress` (object) - `Companies.UseInvoiceAddressAsDeliveryAddress` (boolean) Can be used when updating or inserting addresses on Company. 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. - `Companies.Info` (array) Contains a list of id-value pairs specific to the client for this company. Use ApplicationService.ListCompanyInfoTypes for id lookup. - `Companies.PricelistIds` (array) Contains a list of priceList ids valid for this company. It will be empty if no priceLists exist. It can be used to check products lists if they are from a company 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. - `Companies.ParentId` (integer,null) Points to an optional parent company. Used when companies are connected some how. - `Companies.DeliveryMethodIds` (array) Contains a list of delivery method ids valid for this company. It will be empty if no delivery methods exist. - `Companies.PaymentMethodIds` (array) Contains a list of payment method ids valid for this company. It will be empty if no payment methods exist. - `Companies.Email` (string) The Email address of the Company. MaxLength: 255. - `Companies.Flags` (array) A list of Flags of the Company. See Flag for information about flags. Flags can be used in Promotions or otherwise to provide custom handling of specific Companies. - `Companies.Flags.Id` (integer) The internal Id of the Flag. - `Companies.Flags.Name` (string) The Name of the Flag. MaxLength: 50. - `Companies.Flags.Group` (integer) The GroupId of the Flag. - `Companies.Flags.IsSelected` (boolean) Indicates if the Flag is selected or not. - `Companies.VatNo` (string) This is the VAT registration number for the company. MaxLength: 50. - `DeliveryAddresses` (array) 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. - `Flags` (array) 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. - `Info` (array) Contains a list of id-value pairs specific to the client for this customer. Use ApplicationService.ListCustomerInfoTypes for id lookup. - `PricelistIds` (array) 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,null) Specifies if the Customer is active or not. - `Created` (string,null) When the customer was created. - `Updated` (string,null) When the customer was last updated.