{"info":{"version":"4.0","title":"Documentation Norce [Storm] Connect Customer Service","description":"The Customer Service has Entities and Operations concerned with Customers and Companies in Norce Commerce."},"paths":{"/Customer/ImportCompanies":{"post":{"tags":["Customers"],"summary":"Import companies","description":"Insert or update company information as well as attach or disconnect customers to the company.<br/>Read more about the method <a href='/companyintegration/#importing-companies'>here</a>.","operationId":"ImportCompanies","parameters":[{"schema":{"$ref":"#/components/schemas/CustomerHeader"},"name":"X-StormConnect-Header","in":"header","required":true,"description":"JSON or XML serialized string of the CustomerHeader object.<br/>Note that the enums must be of integer values when using application/xml encoding and can be both string or integer for application/json."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Company"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Company"}}}},"required":true}}},"/Customer/ImportCustomers":{"post":{"tags":["Customers"],"summary":"Import customers","description":"Insert or update customer information, create accounts on the customer or create, attach or disconnect companies to the customer.<br/>Read more about the method <a href='/customerintegration/#importing-customers'>here</a>.","operationId":"ImportCustomers","parameters":[{"schema":{"$ref":"#/components/schemas/CustomerHeader"},"name":"x-stormconnect-header","in":"header","required":true,"description":"JSON or XML serialized string of the CustomerHeader object.<br/>Note that the enums must be of integer values when using application/xml encoding and can be both string or integer for application/json."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}}},"required":true}}}},"openapi":"3.0.4","servers":[{"url":"https://customer-slug.api-se.norce.tech/commerce/connect/4.0"}],"components":{"schemas":{"CustomerHeader":{"properties":{"AccountId":{"description":"Account which initiated the import. Learn about system accounts <a href='/connectintegration/#using-system-accounts'>here</a>.","type":"integer","format":"int32"},"CompanyFieldsThatAreSet":{"description":"Array of strings representing company fields to be processed.<br/>(Use the integer instead of the name for the xml content type)<br/>Not required for ImportCustomers<br/><br/>0 = ApplicationKey<br>1 = Id<br>2 = Code<br>3 = OrganizationNo<br>4 = Name<br>5 = EmailAddress<br>6 = PhoneNumber<br>7 = LogoImage<br>8 = ParentCompanyCode<br>9 = IsActive<br>10 = InvoiceAddress<br>11 = DeliveryAddresses<br>12 = AdditionalInfo<br>13 = Contacts<br>14 = Customers (set values in CustomerFieldsThatAreSet)<br>15 = DeliveryMethods<br>16 = Discounts<br>17 = Flags<br>18 = PaymentMethods<br>19 = PriceLists<br>20 = SearchOnlyByCode (matches the customer only on the value on the code field, allows for duplicated OrganizationNo)<br>21 = VatNo<br>22 = PreserveFlags (Flags not passed in, will be left on the entity, otherwise they will be removed and replaced with the ones imported)","type":"array","items":{"type":"string","enum":["ApplicationKey","Id","Code","OrganizationNo","Name","EmailAddress","PhoneNumber","LogoImage","ParentCompanyCode","IsActive","InvoiceAddress","DeliveryAddresses","AdditionalInfo","Contacts","Customers","DeliveryMethods","Discounts","Flags","PaymentMethods","PriceLists","SearchOnlyByCode","VatNo","PreserveFlags"]}},"CustomerFieldsThatAreSet":{"description":"Array of strings representing customer fields to be processed.<br/>(Use the integer instead of the name for the xml content type)<br/>Not required for ImportCompanies, but if used there, 'Customers' must be set in CompanyFieldsThatAreSet<br/><br/>0 = ApplicationKey<br>1 = Id<br>2 = Code<br>3 = EmailAddress<br>4 = SocialSecurityNumber<br>5 = Title<br>6 = FirstName<br>7 = MiddleName<br>8 = LastName<br>9 = PhoneNumber<br>10 = CellPhoneNumber<br>11 = IsActive<br>12 = InvoiceAddress<br>13 = DeliveryAddresses<br>14 = Accounts (set values in AccountFieldsThatAreSet)<br>15 = AdditionalInfo<br>16 = Flags<br>17 = PriceLists<br>18 = SearchOnlyByCode (matches the customer only on the value on the code field, alows for duplicated email addresses)<br>19 = Companies (set values in CompanyFieldsThatAreSet)<br>20 = CrmId<br>21 = PreserveFlags (Flags not passed in, will be left on the entity, otherwise they will be removed and replaced with the ones imported)","type":"array","items":{"type":"string","enum":["ApplicationKey","Code","EmailAddress","SocialSecurityNumber","Title","FirstName","MiddleName","LastName","PhoneNumber","CellPhoneNumber","IsActive","InvoiceAddress","DeliveryAddresses","Accounts","AdditionalInfo","Flags","PriceLists","SearchOnlyByCode","Companies","CrmId","PreserveFlags"]}},"AccountFieldsThatAreSet":{"description":"Array of strings representing account fields to be processed.<br/>(Use the integer instead of the name for the xml content type)<br/>Not required for ImportCompanies<br/>Required settings: Accounts (in CustomerFieldsThatAreSet)<br/><br/>0 = PasswordCreateOnly (Value is only set if the entity is created by the import)<br>1 = Status<br>2 = StatusCreateOnly (Value is only set if the entity is created by the import)<br>3 = Roles<br>4 = RolesCreateOnly (Value is only set if the entity is created by the import)","type":"array","items":{"type":"string","enum":["PasswordCreateOnly","Status","StatusCreateOnly","Roles","RolesCreateOnly"]}},"JobId":{"description":"Norce Commerce Connect job id. Only exists in import logs. Should be omitted in the import request.","type":"string","format":"int32"},"SerializationType":{"description":"Request serialization type.(Use the integer instead of the name for the xml content type)<br/><br/>0 = JSON, 1 = XML","type":"array","items":{"type":"string","enum":["JSON","XML"]}},"StorageName":{"description":"Location of the import file on Norce's file area. Can be used instead of sending data directly in payload.","type":"string","format":"uri"},"SupplierId":{"description":"Derived from base header. Ignored in this import.","type":"string","format":"int32"}},"type":"object","format":"CustomerHeader","required":["AccountId","CompanyFieldsThatAreSet","CustomerFieldsThatAreSet"]},"Account":{"description":"Customer account information","properties":{"ApplicationKey":{"description":"Application identifier. Determines which application the account belongs to.","type":"string","format":"uuid"},"LoginName":{"description":"Account login name","type":"string"},"Password":{"description":"Account password","type":"string"},"Roles":{"description":"List of account roles to assign","type":"array","items":{"$ref":"#/components/schemas/AccountRole"}},"Status":{"description":"Account status: 1 = Active, 2 = Inactive (Use integers if import format is XML)","type":"integer","enum":["Active","Inactive"],"format":"int32"}},"type":"object","format":"Account","required":["ApplicationKey","LoginName"]},"AccountRole":{"description":"Determines what actions account can perform","properties":{"Code":{"description":"Unique code of account role (e.g. Administrator, User). The role needs to exist in Norce Commerce.","type":"string"},"IsActive":{"description":"Sets account role to active or inactive. Default is true.","type":"boolean"}},"type":"object","format":"AccountRole","required":["Code"]},"Address":{"description":"Company or customer address information","properties":{"AddressLine1":{"description":"First line of address","type":"string"},"AddressLine2":{"description":"Second line of address","type":"string"},"CareOf":{"description":"Care of","type":"string"},"City":{"description":"City","type":"string"},"Code":{"description":"System agnostic identifier for the company or customer. Max length: 50","type":"string"},"CountryCode":{"description":"ISO country code (e.g. SE, BY). Max length: 2","type":"string"},"Gln":{"description":"Global Location Number. Max length: 50","type":"string"},"IsPrimary":{"description":"Set to true to indicate primary delivery address. Null will not change anything. Only one address can be marked primary.","type":"boolean"},"IsValidated":{"description":"Set to true to indicate that the address has been validated. Null will not change anything.","type":"boolean"},"Region":{"description":"Region","type":"string"},"ShippingPhoneNumber":{"description":"Phone number for shipping notifications (if used as delivery address). Max length: 50","type":"string"},"ZipCode":{"description":"Zip code","type":"string"}},"type":"object","format":"Address"},"Company":{"description":"Company information","properties":{"ApplicationKey":{"description":"Application identifier. Determines which application company belongs to.","type":"string","format":"uuid"},"AdditionalInfo":{"description":"List of additional information fields","type":"array","items":{"$ref":"#/components/schemas/Info"}},"Code":{"description":"Company code. Used for company matching if Norce Commerce company id is omitted.","type":"string"},"Contacts":{"description":"List of company contacts","type":"array","items":{"$ref":"#/components/schemas/Contact"}},"Customers":{"description":"List of customers belonging to company. Customers must exist already in Norce Commerce to be added as a relation to this Company. Any identifier can be used and they are ordered as Id, Code, EmailAddress. The first that is given will be used.","type":"array","items":{"$ref":"#/components/schemas/Customer"}},"DeliveryAddresses":{"description":"List of delivery addresses","type":"array","items":{"$ref":"#/components/schemas/Address"}},"DeliveryMethods":{"description":"List of delivery methods applicable to company","type":"array","items":{"$ref":"#/components/schemas/DeliveryMethod"}},"Discounts":{"description":"List of company discounts","type":"array","items":{"$ref":"#/components/schemas/Discount"}},"EmailAddress":{"description":"Contact email address","type":"string"},"Flags":{"description":"List of company flags","type":"array","items":{"$ref":"#/components/schemas/Flag"}},"Id":{"description":"Norce Commerce's internal company id","type":"integer","format":"int32"},"InvoiceAddress":{"description":"Invoice address information","$ref":"#/components/schemas/Address"},"IsActive":{"description":"Sets company to active or inactive. Default is true.","type":"boolean"},"IsCustomerListDelta":{"description":"If false customers that are not provided for this company in request will be deactivated from the relation to this Company. Default is false.","type":"boolean"},"LogoImage":{"description":"Company logo","$ref":"#/components/schemas/Image"},"Name":{"description":"Company name","type":"string"},"OrganizationNo":{"description":"Organization number. Used for company matching if Norce Commerce's internal company id and company code are omitted and `SearchOnlyByCode` is false in header.","type":"string"},"ParentCompanyCode":{"description":"Can be used for setting parent company (if exists)","type":"string"},"PaymentMethods":{"description":"List of company payment methods","type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"PhoneNumber":{"description":"Contact phone number","type":"string"},"PriceLists":{"description":"List of company price lists","type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"VatNo":{"description":"Vat Number","type":"string"},"UseInvoiceAddressAsDeliveryAddress":{"description":"Use in conjunction with an invoice address to set the delivery address to the same as the invoice address. Both must be active for the import.","type":"boolean"}},"type":"object","format":"Company","required":["ApplicationKey"]},"CompanyIdentifier":{"description":"Company identifier to connect customers to companies","properties":{"Code":{"description":"Company code. Used for company matching if Norce Storm company id is omitted.","type":"string"},"Id":{"description":"Norce [Storm]'s internal company id","type":"integer","format":"int32"},"IsPrimary":{"description":"Sets company as primary for the customer. Default is false.","type":"boolean"},"Name":{"description":"Company name","type":"string"},"OrganizationNo":{"description":"Organization number. Used for company matching if Norce [Storm]'s internal company id and company code are omitted and `SearchOnlyByCode` is false in header.","type":"string"}},"type":"object","format":"CompanyIdentifier"},"Contact":{"description":"Company contact information.","properties":{"Code":{"description":"Contact code. Used for contact matching.","type":"string"},"IsActive":{"description":"Sets contact to active or inactive. Default true.","type":"boolean"}},"type":"object","format":"Contact","required":["Code"]},"Customer":{"description":"Customer information","properties":{"Accounts":{"description":"List of registered customer accounts","type":"array","items":{"$ref":"#/components/schemas/Account"}},"AdditionalInfo":{"description":"List of additional information fields","type":"array","items":{"$ref":"#/components/schemas/Info"}},"ApplicationKey":{"description":"Application identifier. Determines which application company belongs to.","type":"string","format":"uuid"},"CellPhoneNumber":{"description":"Mobile phone number","type":"string"},"Code":{"description":"Customer code. Used for customer matching if Norce Commerce's internal customer id is omitted.","type":"string"},"Companies":{"description":"List of companies belonging to this customer. Companies must exist already in Norce Commerce to be added as a relation to this Customer. Any identifier can be used and they are ordered as Id, Code, OrganizationNo. The first that is given will be used. If more than one is marked IsPrimary then only the first will be marked as primary.","type":"array","items":{"$ref":"#/components/schemas/CompanyIdentifier"}},"CrmId":{"description":"Used to save the customer external id from a crm-system","type":"string"},"DeliveryAddresses":{"description":"Delivery address","type":"array","items":{"$ref":"#/components/schemas/Address"}},"EmailAddress":{"description":"Customer email address. Used for customer matching if Norce Commerce customer id and code is omitted and SearchOnlyByCode is false in header.","type":"string"},"FirstName":{"description":"First name","type":"string"},"Flags":{"description":"Customer flags","type":"array","items":{"$ref":"#/components/schemas/Flag"}},"Id":{"description":"Norce Commerce's internal customer id","type":"integer","format":"int32"},"InvoiceAddress":{"description":"Invoice address","$ref":"#/components/schemas/Address"},"IsActive":{"description":"Sets customer to active or inactive. Default is true.","type":"boolean"},"IsCompanyListDelta":{"description":"If false companies that are not provided for this customer in request will be deactivated from the relation to this Company. Default is false.","type":"boolean"},"LastName":{"description":"Last name","type":"string"},"MiddleName":{"description":"Middle name","type":"string"},"PhoneNumber":{"description":"Phone number","type":"string"},"PriceLists":{"description":"Customer price lists","type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"SocialSecurityNumber":{"description":"Social security number","type":"string"},"Title":{"description":"Title","type":"string"},"Type":{"description":"Customer type: 1 = Customer, 2 = Company contact","type":"integer","format":"int32"}},"type":"object","format":"Customer"},"DeliveryMethod":{"description":"Company delivery method information","properties":{"Code":{"description":"Delivery method code","type":"string"},"IsActive":{"description":"Sets delivery method to active or inactive. Default is true.","type":"boolean"}},"type":"object","format":"DeliveryMethod","required":["Code"]},"Discount":{"description":"Discount rules applied to a specific company","properties":{"DiscountPercentage":{"description":"Value of the discount (in percent)","type":"number"},"PriceListTypeIdSeed":{"description":"Comma separated list of price list types","type":"string"},"Type":{"description":"Type of discount: 1 = Category, 2 = Product Discount Class, 3 = Product Flag","type":"string","format":"int32"},"ValueCode":{"description":"Value code, for Category type this is the category code. For Discount class its the class identifier used in Norce Commerce.","type":"string"}},"type":"object","format":"Discount"},"Flag":{"description":"Company flag","properties":{"Code":{"description":"Flag code. Used for flag matching.","type":"string"},"IsActive":{"description":"Sets flag to active or inactive. Default is true.","type":"boolean"},"IsCreateOnly":{"description":"If true, data is only saved if flag record is new. Default is false.","type":"boolean"},"IsLimitedUpdate":{"description":"If true, data is only saved if flag record is new or last updated by the same account as the one initiating the update. Default is false.","type":"boolean"},"StopDate":{"description":"Sets the stop date explicitly for inactivated flags. Time of process is used as default.","type":"string","format":"DateTime"}},"type":"object","format":"Flag","required":["Code"]},"Image":{"description":"Image information","properties":{"ExternalCode":{"description":"Code for image matching","type":"string"},"FileTypeName":{"description":"File type. Should match file info set up in Norce Commerce, e.g. MainImage, Additional, Embedded.","type":"string"},"Url":{"description":"URL where image should be taken from","type":"string","format":"uri"},"Filename":{"description":"Image file name. If omitted will be parsed form URL.","type":"string"},"LastModified":{"description":"Time when image was changed. Should be set to synchronize image updates.","type":"string","format":"DateTime"}},"type":"object","format":"Image","required":["ExternalCode","FileTypeName","Url"]},"Info":{"description":"Additional information field","properties":{"Code":{"description":"Information field code. Used for info matching.","type":"string"},"Value":{"description":"Value to set","type":"string"}},"type":"object","format":"Info","required":["Code","Value"]},"JobResponse":{"description":"General response for async Connect jobs","properties":{"StatusCode":{"description":"Status of the job","type":"string"},"Description":{"description":"Short message describing the job","type":"string"},"JobId":{"description":"Norce Commerce's interal id created for this job. Refer to this for future requests.","type":"string","format":"int32"},"ValidationSummary":{"description":"Short validation of request data","$ref":"#/components/schemas/ValidationSummary"}},"type":"object","format":"JobResponse"},"PaymentMethod":{"description":"Payment method applied to company","properties":{"Code":{"description":"Payment method code. Used for payment method matching.","type":"string"},"InvoiceCaptureSettingsCode":{"description":"Used for specifying the invoice capture setting to use.","type":"string"},"IsActive":{"description":"Sets payment method relation to active or inactive. Default true.","type":"boolean"}},"type":"object","format":"PaymentMethod","required":["Code"]},"PriceList":{"description":"Customer or company specific price list","properties":{"Code":{"description":"Price list code. Used for price list matching.","type":"string"},"IsExclusive":{"description":"Determines if price list is exclusive, an exclusive price list overrides best price calculation in Norce Commerce Shopping API.","type":"boolean"}},"type":"object","format":"PriceList","required":["Code"]},"ValidationSummary":{"description":"Validation data for accepted payload","properties":{"NrOfItemsInTotal":{"description":"Total number of items in payload.","type":"integer","format":"int32"},"NrOfValidationFailures":{"description":"Number of items that failed initial validation.","type":"integer","format":"int32"},"Messages":{"description":"Messages concerning the validation.","type":"array","items":{"type":"string"}}},"type":"object","format":"ValidationSummary"}}}}