# Documentation CustomerService The Customers namespace has Entities and Operations concerned with Customer and Company management. Version: 1.1 ## Servers ``` https://customer-slug.api-se.norce.tech/commerce/customer/1.1 ``` ## Download OpenAPI description [Documentation CustomerService](https://docs.norce.io/_spec/api-reference/services/customerservice/openapi.yaml) ## Accounts ### Get agreement account - [GET /GetAgreementAccount](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/getagreementaccount.md): Gets an AgreementAccount by Id. Returns null if the AgreementAccount doesn't exist. ### List account roles - [GET /ListAccountRoles](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/listaccountroles.md): Lists available account roles. ### Login an agreement account - [GET /LoginAgreementAccount](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/loginagreementaccount.md): LoginAgreementAccount tries to login a user on an agreement. Users trying to login need to know the agreement code in order to be logged in. Returns null if the attempt to login fails. ### Login a user - [POST /LoginPost](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/loginpost.md): Login tries to login a user. In order to enable Customers to login they need to be created with an Account. ### Send a forgotten password e-mail - [POST /SendPasswordReminder](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/sendpasswordreminder.md): An forgotten password email will be sent to the customer's email address. This has to be configured in Storm Application - Mail or no mail will be sent. ### Update a customer's account status - [POST /UpdateAccountStatus](https://docs.norce.io/api-reference/services/customerservice/openapi/accounts/updateaccountstatus.md): Updates the account status for a customer. Accounts can be activated/deactivated. ## Address ### Delete delivery address for company - [POST /DeleteCompanyDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/deletecompanydeliveryaddress.md): Deletes a delivery address for the specified Company. ### Delete delivery address for customer - [POST /DeleteCustomerDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/deletecustomerdeliveryaddress.md): Deletes a delivery address for the specified Customer. ### Get external address for customer (v2) - [POST /GetExternalCustomerAddress2](https://docs.norce.io/api-reference/services/customerservice/openapi/address/getexternalcustomeraddress2.md): Gets a Customer's Address from an external source. Support for Klarna, ResursBank and Avarda exists and must be configured in Storm. Moreover an aggreement must be established with the PSP. Returns the customer with addresses populated according to customer type. Companies will have their addresses in Customer.DefaultCompany. ### Insert delivery address for company - [POST /InsertCompanyDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/insertcompanydeliveryaddress.md): Inserts a new delivery address for the specified Company. ### Insert delivery address for customer - [POST /InsertCustomerDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/insertcustomerdeliveryaddress.md): Inserts a new delivery address for the specified Customer. ### Update delivery address for company - [POST /UpdateCompanyDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/updatecompanydeliveryaddress.md): Updates a delivery address for the specified Company. ### Update delivery address for customer - [POST /UpdateCustomerDeliveryAddress](https://docs.norce.io/api-reference/services/customerservice/openapi/address/updatecustomerdeliveryaddress.md): Updates a delivery address for the specified Customer. ## Companies ### Delete customer from company - [POST /DeleteCompanyCustomer](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/deletecompanycustomer.md): Deletes a Customer from the Company. It does not delete the Customer from Storm but just removes the relation between Company and Customer. ### Delete delivery method for company - [POST /DeleteCompanyDeliveryMethod](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/deletecompanydeliverymethod.md): Deletes a DeliveryMethod for the specified Company. ### Delete company discount - [POST /DeleteCompanyDiscount](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/deletecompanydiscount.md): Deletes the discount. ### Delete payment method for company - [POST /DeleteCompanyPaymentMethod](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/deletecompanypaymentmethod.md): Deletes a PaymentMethod for the specified Company. ### Get a company - [GET /GetCompany](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/getcompany.md): Gets a Company by internal id. Returns null if the Company does not exist. ### Get company by code - [GET /GetCompanyByCode](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/getcompanybycode.md): Gets a Company by external code. Returns null if the Company does not exist. ### Get company by organization number - [GET /GetCompanyByOrgNo](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/getcompanybyorgno.md): Gets a Company by org no. Since Companies are not unique on OrgNo only just the last Company with the specified OrgNo will be returned. Returns null if the Company does not exist. ### Get company by organization number and store id - [GET /GetCompanyByOrgNoAndStoreId](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/getcompanybyorgnoandstoreid.md): Gets a Company by org no and store id. Used when Company is connected to a specific store. Since Companies are not unique on OrgNo only just the last Company with the specified OrgNo will be returned. Returns null if the Company does not exist. ### Get payment method for company - [GET /GetCompanyPaymentMethod](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/getcompanypaymentmethod.md): Gets a company payment method. ### Inactivate company - [POST /InactivateCompany](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/inactivatecompany.md): Inactivates a Company. Inactivated Companies cannot be activated again. ### Insert customer in company (v2) - [POST /InsertCompanyCustomer2](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/insertcompanycustomer2.md): Inserts a customer into a company. ### Insert delivery method for company - [POST /InsertCompanyDeliveryMethod](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/insertcompanydeliverymethod.md): Inserts a DeliveryMethod for the specified Company. ### Insert payment method for company - [POST /InsertCompanyPaymentMethod](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/insertcompanypaymentmethod.md): Inserts a PaymentMethod for the specified Company. Legacy method. Use InserCompanyPaymentMethod2 when possible. ### Insert payment method for company (v2) - [POST /InsertCompanyPaymentMethod2](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/insertcompanypaymentmethod2.md): Inserts a PaymentMethod for the specified Company. Version 2 of this method which also takes a invoiceCaptureSettingsCode ### List companies by organization number - [GET /ListCompaniesByOrgNo](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/listcompaniesbyorgno.md): Lists Companies by organization number. Note that OrgNo need not be unique within storm, only the combination of OrgNo and Name must be unique. ### List companies by parent - [GET /ListCompaniesByParent](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/listcompaniesbyparent.md): Lists Companies by parent company. ### List company by info type - [GET /ListCompanyByInfoType](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/listcompanybyinfotype.md): Returns a list of Companies by info type value. Returns an empty list if the Companies does not exist. ### List company discounts - [GET /ListCompanyDiscounts](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/listcompanydiscounts.md): Lists Company discounts. ### Update a company - [POST /UpdateCompany](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/updatecompany.md): UpdateCompany updates or creates a Company in Storm for the specified customer. Validation is done before trying to update or create the Company and the below Exceptions might be raised if any important information is missing. Any existing Company will be updated as well. Supply all root data (Code, Name, OrgNo, Phone, ReferUrl, Email, VatNo) about the Company - empty or missing input fields will be emptied. Note though that any missing lists or objects (Addresses, Flags, Info, DeliveryMethodIds, PaymentMethodIds) fields that are not passed in will not be removed but just not updated. PriceLists are not affected here at all. ### Insert or update company discounts - [POST /UpsertCompanyDiscounts](https://docs.norce.io/api-reference/services/customerservice/openapi/companies/upsertcompanydiscounts.md): Inserts or updates a list of CompanyDiscounts in Storm. Any non-existing discount will be inserted. Existing discounts will be updated. Note that it is only the discount field that can be updated. In order to update the value field, the entity must first be deleted and then re-inserted. ## Customers ### Activate customer - [POST /ActivateCustomer](https://docs.norce.io/api-reference/services/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 (v3) - [POST /CreateCustomer3](https://docs.norce.io/api-reference/services/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 /GetCustomer](https://docs.norce.io/api-reference/services/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 /GetCustomerByAccountId](https://docs.norce.io/api-reference/services/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 /GetCustomerByCode](https://docs.norce.io/api-reference/services/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 /GetCustomerByEmail](https://docs.norce.io/api-reference/services/customerservice/openapi/customers/getcustomerbyemail.md): Gets a Customer by Email. Returns null if the Customer doesn't exist. ### Get a customer by key - [GET /GetCustomerByKey](https://docs.norce.io/api-reference/services/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 /GetCustomerByLoginName](https://docs.norce.io/api-reference/services/customerservice/openapi/customers/getcustomerbyloginname.md): Gets a Customer by Account.LoginName. Returns null if the Customer doesn't exist. ### Inactivate customer - [POST /InactivateCustomer](https://docs.norce.io/api-reference/services/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 (v3) - [GET /ListCustomerByCompany3](https://docs.norce.io/api-reference/services/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 (v2) - [GET /ListCustomerByInfoType2](https://docs.norce.io/api-reference/services/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 (v2) - [GET /ListCustomerBySSN2](https://docs.norce.io/api-reference/services/customerservice/openapi/customers/listcustomerbyssn2.md): Lists Customers by social security number. Companies are not returned. ### Register a customer (v3) - [POST /RegisterCustomer3](https://docs.norce.io/api-reference/services/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 (v2) - [GET /SearchCustomer2](https://docs.norce.io/api-reference/services/customerservice/openapi/customers/searchcustomer2.md) ### Set default company for customer - [POST /SetDefaultCompany](https://docs.norce.io/api-reference/services/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 (v3) - [POST /UpdateCustomer3](https://docs.norce.io/api-reference/services/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. ## Flags ### List company flags - [GET /ListCompanyFlags](https://docs.norce.io/api-reference/services/customerservice/openapi/flags/listcompanyflags.md): Lists the available company flags. ### List customer flags - [GET /ListCustomerFlags](https://docs.norce.io/api-reference/services/customerservice/openapi/flags/listcustomerflags.md): Lists the available customer flags. ## InfoTypes ### List company info types - [GET /ListCompanyInfoTypes](https://docs.norce.io/api-reference/services/customerservice/openapi/infotypes/listcompanyinfotypes.md): Lists the info type ids used in Company.Info. ### List customer info types - [GET /ListCustomerInfoTypes](https://docs.norce.io/api-reference/services/customerservice/openapi/infotypes/listcustomerinfotypes.md): Lists the info type ids used in Customer.Info. ## PriceLists ### Delete pricelist from company - [POST /DeleteCompanyPricelist](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/deletecompanypricelist.md): Deletes a PriceList for the specified Company. If the PriceList is the last one on any company it will be inactivated. Note that only Reseller priceLists can be deleted. Any attempt to delete an other priceList type will render an Internal Server Error. ### Get a pricelist for company - [GET /GetCompanyPricelist](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/getcompanypricelist.md): Gets a CompanyPriceList for the specified Company. Returns null if the PriceList does not exist. ### Get a pricelist item - [GET /GetPricelistItem](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/getpricelistitem.md): Gets a priceList item. Returns null if the PriceListItem does not exist. Prices are in the currency of the PriceList. ### Insert pricelist for company (v2) - [POST /InsertCompanyPricelist2](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/insertcompanypricelist2.md): Inserts a new PriceList for the specified Company. If the PriceList is an existing PriceList it will be connected to the Company. Otherwise it will be created. ### Insert a pricelist item - [POST /InsertPricelistItem](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/insertpricelistitem.md): Inserts a new priceList item. If the PriceListItem already exists, an update is made. ### List all pricelists for a company - [GET /ListCompanyPricelists](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/listcompanypricelists.md): Returns a list of PriceLists for the specified Company. ### List price rules - [GET /ListPriceRules](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/listpricerules.md): Lists the available price rules. ### Update pricelist for company (v2) - [POST /UpdateCompanyPricelist2](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/updatecompanypricelist2.md): Updates a PriceList for the specified Company. If the PriceList is not an existingPriceList it will be created. Otherwise it will be updated. Note that only Reseller and Application specific priceLists can be updated. Any attempt to update an other priceList type will be ignored. If no PriceRule is specified, PriceRule 7, use standard price, with no discount will be used. To delete a Company PriceList use DeleteCompanyPricelist. ### Update a pricelist item - [POST /UpdatePricelistItem](https://docs.norce.io/api-reference/services/customerservice/openapi/pricelists/updatepricelistitem.md): Updates a priceList item.