# Customers ## Activate customer - [POST /CustomerService.svc/rest/ActivateCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/activatecustomer.md): Activates an inactive Customer. If the activation is made after X days, where X is the value set for ClientSetting CullCustomerDayCount, the Customer data will be lost. ## Create a customer [Obsolete("Use CreateCustomer3")] - [POST /CustomerService.svc/rest/CreateCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/createcustomer.md): See CreateCustomer3 for details. CreateCustomer calls CreateCustomer3 with an empty password and true as doSendMail. ## Create a customer (v2) [Obsolete("Use CreateCustomer3")] - [POST /CustomerService.svc/rest/CreateCustomer2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/createcustomer2.md): See CreateCustomer3 for details. CreateCustomer2 calls CreateCustomer3 with true as doSendMail. ## Create a customer (v3) - [POST /CustomerService.svc/rest/CreateCustomer3](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/createcustomer3.md): Creates a Customer in Storm. Validation is done before trying to create the Customer and the listed Exceptions might be raised if any important information is missing. Customers can be created with or without an Account. Just supply Customer.Account if an Account should be created as well. The same goes for Companies, but here existing Companies are ok. ## Get a customer - [GET /CustomerService.svc/rest/GetCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomer.md): Gets a Customer by Id. Returns null if the Customer doesn't exist. ## Get a customer by account id - [GET /CustomerService.svc/rest/GetCustomerByAccountId](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomerbyaccountid.md): Gets a Customer by Account internal id. Returns null if the Customer doesn't exist. ## Get a customer by code - [GET /CustomerService.svc/rest/GetCustomerByCode](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomerbycode.md): Gets a Customer by external code. Returns null if the customer doesn't exist. ## Get a customer by e-mail - [GET /CustomerService.svc/rest/GetCustomerByEmail](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomerbyemail.md): Gets a Customer by Email. Returns null if the Customer doesn't exist. ## Get a customer by key - [GET /CustomerService.svc/rest/GetCustomerByKey](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomerbykey.md): Gets a Customer by Key. Returns null if the Customer doesn't exist. ## Get a customer by login name - [GET /CustomerService.svc/rest/GetCustomerByLoginName](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/getcustomerbyloginname.md): Gets a Customer by Account.LoginName. Returns null if the Customer doesn't exist. ## Inactivate customer - [POST /CustomerService.svc/rest/InactivateCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/inactivatecustomer.md): Inactivates a Customer. The user account associated with this customer will no longer be able to login. Inactivated Customers can be activated again if activated before X days, where X is the value set for ClientSetting CullCustomerDayCount. ## List customers by company [Obsolete("Use ListCustomerByCompany2")] - [GET /CustomerService.svc/rest/ListCustomerByCompany](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbycompany.md): See ListCustomerByCompany2. ListCustomerByCompany2 gets called with an empty accountRoleId. ## List customers by company (v2) [Obsolete("Use ListCustomerByCompany3")] - [GET /CustomerService.svc/rest/ListCustomerByCompany2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbycompany2.md): See ListCustomerByCompany3. ListCustomerByCompany2 calls ListCustomerByCompany3 with an empty accountRoleId and showInactive as false. ## List customers by company (v3) - [GET /CustomerService.svc/rest/ListCustomerByCompany3](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbycompany3.md): Lists Customers by company and an optional account role. If accountRoleId is passed in only Customers with Accounts having that Role.Id will be returned. ## List customers by info type [Obsolete("Use ListCustomerByInfoType2")] - [GET /CustomerService.svc/rest/ListCustomerByInfoType](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbyinfotype.md): See ListCustomerByInfoType2 for details. ListCustomerByInfoType calls ListCustomerByInfoType2 with showInactive as false. ## List customers by info type (v2) - [GET /CustomerService.svc/rest/ListCustomerByInfoType2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbyinfotype2.md): Returns a list of customers by info type value. Returns an empty list if the Customer does not exist. ## List customers by social security number [Obsolete("Use ListCustomerBySSN2")] - [GET /CustomerService.svc/rest/ListCustomerBySSN](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbyssn.md): See ListCustomerBySSN2 for details. ListCustomerBySSN calls ListCustomerBySSN2 with showInactive as false. Companies are not returned. ## List customers by social security number (v2) - [GET /CustomerService.svc/rest/ListCustomerBySSN2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/listcustomerbyssn2.md): Lists Customers by social security number. Companies are not returned. ## Register a customer [Obsolete("Use RegisterCustomer3")] - [POST /CustomerService.svc/rest/RegisterCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/registercustomer.md): See RegisterCustomer3 for details. RegisterCustomer calls RegisterCustomer3 with an empty password and true as doSendMail. ## Register a customer (v2) [Obsolete("Use RegisterCustomer3")] - [POST /CustomerService.svc/rest/RegisterCustomer2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/registercustomer2.md): See RegisterCustomer3 for details. RegisterCustomer2 calls RegisterCustomer3 with true as doSendMail. ## Register a customer (v3) - [POST /CustomerService.svc/rest/RegisterCustomer3](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/registercustomer3.md): RegisterCustomer3 creates a Customer with an Account in Storm just like CreateCustomer. If the Customer already exists it gets updated. Customer is looked up by email. Validation is done before trying to update the Customer and the below Exceptions might be raised if any important information is missing. Customers can be updated with or without an Account. Just supply Customer.Account if an Account should be updated or created as well. The same goes for Companies. Any existing company will be updated as well. Just supply data about a Customer that needs to be updated. Any missing parts such as Addresses, Flags, Companies or Info fields that are not passed in will not be removed but just not updated. ## Search for customers [Obsolete("Use SearchCustomer2")] - [GET /CustomerService.svc/rest/SearchCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/searchcustomer.md): See SearchCustomer2 for details. SearchCustomer calls SearchCustomer2 with showInactive as false. ## Search for customers (v2) - [GET /CustomerService.svc/rest/SearchCustomer2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/searchcustomer2.md) ## Set default company for customer - [POST /CustomerService.svc/rest/SetDefaultCompany](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/setdefaultcompany.md): Updates the default company for this customer. If no Company is set as default, the first Company will be used as default where needed. ## Update a customer [Obsolete("Use UpdateCustomer3")] - [POST /CustomerService.svc/rest/UpdateCustomer](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/updatecustomer.md): See UpdateCustomer3 for details. UpdateCustomer calls UpdateCustomer3 with an empty password and true as doSendMail. ## Update a customer (v2) [Obsolete("Use UpdateCustomer3")] - [POST /CustomerService.svc/rest/UpdateCustomer2](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/updatecustomer2.md): See UpdateCustomer3 for details. UpdateCustomer2 calls UpdateCustomer3 with true as doSendMail. ## Update a customer (v3) - [POST /CustomerService.svc/rest/UpdateCustomer3](https://docs.norce.io/api-reference-storm/stormapi/customerservice/openapi/customers/updatecustomer3.md): UpdateCustomer3 updates a Customer in Storm. Validation is done before trying to update the Customer and the below Exceptions might be raised if any important information is missing. Customers can be updated with or without an Account. Just supply Customer.Account if an Account should be updated or created as well. The same goes for Companies. Any existing company will be updated as well. Just supply data about a Customer that needs to be updated. Any missing parts such as Addresses, Flags, Companies or Info fields that are not passed in will not be removed but just not updated. PriceLists are not affected here at all.