openapi: 3.0.1
info:
  title: Documentation CustomerService
  description: >-
    The Customers namespace has Entities and Operations concerned with Customer
    and Company management.
  version: '1.1'
servers:
  - url: https://demo.storm.io/api/1.1
paths:
  /CustomerService.svc/rest/ChangePassword:
    post:
      tags:
        - Accounts
      summary: Change password [Obsolete("Use forgot password link")]
      description: >-
        Changes the password for the Account specified by the loginName. No
        validation of the password strength is made and it is up to the
        application to enforce such validation.
      operationId: ChangePassword
      parameters:
        - name: loginName
          in: query
          description: User login name.
          required: true
          schema:
            type: string
        - name: oldPassword
          in: query
          description: Current user password, for validation purposes.
          required: true
          schema:
            type: string
        - name: newPassword1
          in: query
          description: Requested new password, must be equal to newPassword 2.
          required: true
          schema:
            type: string
        - name: newPassword2
          in: query
          description: Requested new password, must be equal to newPassword 1.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: >-
            Bad Request


            Key: AccountCustomerMissing. Gets raised when the customer is
            missing for the account.


            Key: LoginFailed. Gets raised when the login name or password is
            incorrect.


            Key: PasswordCannotBeEmpty. Gets raised when either of the supplied
            passwords are null or empty.


            Key: WrongNewPassword. Gets raised when the new password does not
            match the confirmed password.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetAgreementAccount:
    get:
      tags:
        - Accounts
      summary: Get agreement account
      description: >-
        Gets an AgreementAccount by Id. Returns null if the AgreementAccount
        doesn't exist.
      operationId: GetAgreementAccount
      parameters:
        - name: id
          in: query
          description: The internal id of the priceList connected to the AgreementAccount.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementAccount'
            application/xml:
              schema:
                $ref: '#/components/schemas/AgreementAccount'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListAccountRoles:
    get:
      tags:
        - Accounts
      summary: List account roles
      description: Lists available account roles.
      operationId: ListAccountRoles
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/Login:
    get:
      tags:
        - Accounts
      summary: Login a user [Obsolete("Use LoginPost")]
      description: >-
        Login tries to login a user. In order to enable Customers to login they
        need to be created with an Account.
      operationId: Login
      parameters:
        - name: loginName
          in: query
          description: The LoginName of the Account to login on.
          required: true
          schema:
            type: string
        - name: password
          in: query
          description: The Password of the Account.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountCustomerMissing. Gets raised when the customer is
            missing for the account.


            Key: LoginFailed. Gets raised when the login name or password is
            incorrect.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/LoginAgreementAccount:
    get:
      tags:
        - Accounts
      summary: Login an agreement account
      description: >-
        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.
      operationId: LoginAgreementAccount
      parameters:
        - name: password
          in: query
          description: 'The code of the agreement. '
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementAccount'
            application/xml:
              schema:
                $ref: '#/components/schemas/AgreementAccount'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/LoginPost:
    post:
      tags:
        - Accounts
      summary: Login a user
      description: >-
        Login tries to login a user. In order to enable Customers to login they
        need to be created with an Account.
      operationId: LoginPost
      requestBody:
        description: >-
          Must include LoginName and Password. CultureCode and IncludeCompanies
          are optional.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
          application/xml:
            schema:
              $ref: '#/components/schemas/Login'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountCustomerMissing. Gets raised when the customer is
            missing for the account.


            Key: LoginFailed. Gets raised when the login name or password is
            incorrect.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: login
  /CustomerService.svc/rest/SendPasswordReminder:
    post:
      tags:
        - Accounts
      summary: Send a forgotten password e-mail
      description: >-
        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.
      operationId: SendPasswordReminder
      parameters:
        - name: loginName
          in: query
          description: User login name. The Customer's email will be used for the email.
          required: true
          schema:
            type: string
        - name: updatedBy
          in: query
          description: >-
            Account internal id of current user. If none is supplied, the
            default will be used.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: >-
            Bad Request


            Key: AccountCustomerMissing. Gets raised when the customer is
            missing for the account.


            Key: LoginFailed. Gets raised when the account cannot be found by
            LoginName.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/UpdateAccountStatus:
    post:
      tags:
        - Accounts
      summary: Update a customer's account status
      description: >-
        Updates the account status for a customer. Accounts can be
        activated/deactivated.
      operationId: UpdateAccountStatus
      parameters:
        - name: customerId
          in: query
          description: >-
            Customer internal id of the customer who's account status should be
            changed.
          required: true
          schema:
            type: integer
            format: int32
        - name: isActive
          in: query
          description: True if the account should be activated, false otherwise.
          required: true
          schema:
            type: boolean
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/DeleteCompanyDeliveryAddress:
    post:
      tags:
        - Address
      summary: Delete delivery address for company
      description: Deletes a delivery address for the specified Company.
      operationId: DeleteCompanyDeliveryAddress
      parameters:
        - name: addressId
          in: query
          description: The internal id of the Address to delete.
          required: true
          schema:
            type: integer
            format: int32
        - name: customerId
          in: query
          description: The internal id of a Customer belonging to the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/DeleteCustomerDeliveryAddress:
    post:
      tags:
        - Address
      summary: Delete delivery address for customer
      description: Deletes a delivery address for the specified Customer.
      operationId: DeleteCustomerDeliveryAddress
      parameters:
        - name: addressId
          in: query
          description: The internal id of the Address to delete.
          required: true
          schema:
            type: integer
            format: int32
        - name: customerId
          in: query
          description: The internal id of the Customer to delete the Address for.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: CustomerMissing. Gets raised if the Customer is missing.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetExternalCustomerAddress:
    post:
      tags:
        - Address
      summary: >-
        Get external address for customer [Obsolete("Use
        GetExternalCustomerAddress2 with support for company addresses.")]
      description: >-
        Gets a Customer's Address from an external source. Support for Klarna,
        ResursBank and Avarda exists and must be configured in Storm. Moreover
        an agreement must be established with the PSP.
      operationId: GetExternalCustomerAddress
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          A Customer with SSN and an optional InvoiceAddress must be passed in.
          If no InvoiceAddress is passed the default Country.Code for the
          Application will be used.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: AddressLookupFailed. Gets raised when no address is found.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/GetExternalCustomerAddress2:
    post:
      tags:
        - Address
      summary: Get external address for customer (v2)
      description: >-
        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.
      operationId: GetExternalCustomerAddress2
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          A Customer with SSN and an optional InvoiceAddress must be passed in.
          If the search is for a Company, just pass the OrgNo in Customer.SSN.
          If no InvoiceAddress is passed the default Country.Code for the
          Application will be used.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: AddressLookupFailed. Gets raised when no address is found.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/InsertCompanyDeliveryAddress:
    post:
      tags:
        - Address
      summary: Insert delivery address for company
      description: Inserts a new delivery address for the specified Company.
      operationId: InsertCompanyDeliveryAddress
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company to insert the Address for.
          required: true
          schema:
            type: integer
            format: int32
        - name: customerId
          in: query
          description: The internal id of a Customer belonging to the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Address to insert. The Address internal id should not have an id
          specified since it will be generated by Storm.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Address'
          application/xml:
            schema:
              $ref: '#/components/schemas/Address'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: address
  /CustomerService.svc/rest/InsertCustomerDeliveryAddress:
    post:
      tags:
        - Address
      summary: Insert delivery address for customer
      description: Inserts a new delivery address for the specified Customer.
      operationId: InsertCustomerDeliveryAddress
      parameters:
        - name: customerId
          in: query
          description: The internal id of the Customer to insert the Address for.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Address to insert. The Address internal id should not have an id
          specified since it will be generated by Storm.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Address'
          application/xml:
            schema:
              $ref: '#/components/schemas/Address'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: CustomerMissing. Gets raised if the Customer is missing.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: address
  /CustomerService.svc/rest/UpdateCompanyDeliveryAddress:
    post:
      tags:
        - Address
      summary: Update delivery address for company
      description: Updates a delivery address for the specified Company.
      operationId: UpdateCompanyDeliveryAddress
      parameters:
        - name: customerId
          in: query
          description: The internal id of a Customer belonging to the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Address to update. The address internal id must have a valid id
          specified.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Address'
          application/xml:
            schema:
              $ref: '#/components/schemas/Address'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: address
  /CustomerService.svc/rest/UpdateCustomerDeliveryAddress:
    post:
      tags:
        - Address
      summary: Update delivery address for customer
      description: Updates a delivery address for the specified Customer.
      operationId: UpdateCustomerDeliveryAddress
      parameters:
        - name: customerId
          in: query
          description: The internal id of the Customer to update the Address for.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Address to update. The address must have a valid internal id
          specified.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Address'
          application/xml:
            schema:
              $ref: '#/components/schemas/Address'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: |-
            Bad Request

            Key: CustomerMissing. Gets raised if the Customer is missing.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: address
  /CustomerService.svc/rest/DeleteCompanyCustomer:
    post:
      tags:
        - Companies
      summary: Delete customer from company
      description: >-
        Deletes a Customer from the Company. It does not delete the Customer
        from Storm but just removes the relation between Company and Customer.
      operationId: DeleteCompanyCustomer
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company for which the Customer is removed.
          required: true
          schema:
            type: integer
            format: int32
        - name: customerId
          in: query
          description: The internal id of the Customer  to remove from the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content: {}
        '400':
          description: >-
            Bad Request


            Key: CannotDeleteLastCustomer. Gets raised if you try to delete the
            last customer of a company.


            Key: CustomerMissing. Gets raised if the Customer is missing.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/DeleteCompanyDeliveryMethod:
    post:
      tags:
        - Companies
      summary: Delete delivery method for company
      description: Deletes a DeliveryMethod for the specified Company.
      operationId: DeleteCompanyDeliveryMethod
      parameters:
        - name: methodId
          in: query
          description: The internal id of the DeliveryMethod to delete.
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the Company for which the DeliveryMethod gets
            deleted.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/DeleteCompanyDiscount:
    post:
      tags:
        - Companies
      summary: Delete company discount
      description: Deletes the discount.
      operationId: DeleteCompanyDiscount
      parameters:
        - name: companyId
          in: query
          description: The company internal id for the discount.
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: The discount to delete. See CompanyDiscount entity for details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyDiscount'
          application/xml:
            schema:
              $ref: '#/components/schemas/CompanyDiscount'
        required: true
      responses:
        '200':
          description: Success
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: discount
  /CustomerService.svc/rest/DeleteCompanyPaymentMethod:
    post:
      tags:
        - Companies
      summary: Delete payment method for company
      description: Deletes a PaymentMethod for the specified Company.
      operationId: DeleteCompanyPaymentMethod
      parameters:
        - name: methodId
          in: query
          description: The internal id of the PaymentMethod to delete.
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the Company for which the PaymentMethod gets
            deleted.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompany:
    get:
      tags:
        - Companies
      summary: Get a company
      description: >-
        Gets a Company by internal id. Returns null if the Company does not
        exist.
      operationId: GetCompany
      parameters:
        - name: id
          in: query
          description: The internal Id of the Company to fetch.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompanyByCode:
    get:
      tags:
        - Companies
      summary: Get company by code
      description: >-
        Gets a Company by external code. Returns null if the Company does not
        exist.
      operationId: GetCompanyByCode
      parameters:
        - name: code
          in: query
          description: The external code. Usually the id in the erp system.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompanyByOrgNo:
    get:
      tags:
        - Companies
      summary: Get company by organization number
      description: >-
        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.
      operationId: GetCompanyByOrgNo
      parameters:
        - name: orgNo
          in: query
          description: >-
            The organization number of the Company to fetch. All non-numerical
            characters will be removed in the string before the search.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompanyByOrgNoAndStoreId:
    get:
      tags:
        - Companies
      summary: Get company by organization number and store id
      description: >-
        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.
      operationId: GetCompanyByOrgNoAndStoreId
      parameters:
        - name: orgNo
          in: query
          description: >-
            The organization number of the Company to fetch. All non-numerical
            characters will be removed in the string before the search.
          required: true
          schema:
            type: string
        - name: storeId
          in: query
          description: The internal Id of the Store.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompanyPaymentMethod:
    get:
      tags:
        - Companies
      summary: Get payment method for company
      description: Gets a company payment method.
      operationId: GetCompanyPaymentMethod
      parameters:
        - name: paymentMethodId
          in: query
          description: >-
            The internal id of the payment method for which to get the company
            payment method
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the company for which to get the company payment
            method
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyPaymentMethod'
            application/xml:
              schema:
                $ref: '#/components/schemas/CompanyPaymentMethod'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InactivateCompany:
    post:
      tags:
        - Companies
      summary: Inactivate company
      description: Inactivates a Company. Inactivated Companies cannot be activated again.
      operationId: InactivateCompany
      parameters:
        - name: companyId
          in: query
          description: The internal Id of the Company to inactivate.
          required: true
          schema:
            type: integer
            format: int32
        - name: inactivatedBy
          in: query
          description: Account internal id of current user. Do not use default value.
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InsertCompanyCustomer:
    post:
      tags:
        - Companies
      summary: Insert customer in company [Obsolete("Use InsertCompanyCustomer2")]
      description: >-
        See InsertCompanyCustomer2 for details. InsertCompanyCustomer calls
        InsertCompanyCustomer2 with an empty password.
      operationId: InsertCompanyCustomer
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company to insert the Customer for.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to add to the Company. If the Customer already exists, it
          will get an Account, if missing, and the Company will be added to the
          list of Companies for the Customer. Then the Customer will be updated.
          If the Customer does not exist, it will be created. See UpdateCustomer
          and CreateCustomer for details. Note that Customer.Companies will be
          ignored so there's no meaning in passing in Companies there.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/InsertCompanyCustomer2:
    post:
      tags:
        - Companies
      summary: Insert customer in company (v2)
      description: Inserts a customer into a company.
      operationId: InsertCompanyCustomer2
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case.
            The password is not stored in clear text in Storm. Only a hash value
            of the password gets stored.
          schema:
            type: string
        - name: companyId
          in: query
          description: The internal id of the Company to insert the Customer for.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to add to the Company. If the Customer already exists, it
          will get an Account, if missing, and the Company will be added to the
          list of Companies for the Customer. Then the Customer will be updated.
          If the Customer does not exist, it will be created. See UpdateCustomer
          and CreateCustomer for details. Note that Customer.Companies will be
          ignored so there's no meaning in passing in Companies there.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/InsertCompanyDeliveryMethod:
    post:
      tags:
        - Companies
      summary: Insert delivery method for company
      description: Inserts a DeliveryMethod for the specified Company.
      operationId: InsertCompanyDeliveryMethod
      parameters:
        - name: methodId
          in: query
          description: The internal id of the DeliveryMethod to insert.
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the Company for which the DeliveryMethod gets
            inserted.
          required: true
          schema:
            type: integer
            format: int32
        - name: createdBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InsertCompanyPaymentMethod:
    post:
      tags:
        - Companies
      summary: Insert payment method for company
      description: >-
        Inserts a PaymentMethod for the specified Company. Legacy method. Use
        InserCompanyPaymentMethod2 when possible.
      operationId: InsertCompanyPaymentMethod
      parameters:
        - name: methodId
          in: query
          description: The internal id of the PaymentMethod to insert.
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the Company for which the PaymentMethod gets
            inserted.
          required: true
          schema:
            type: integer
            format: int32
        - name: createdBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InsertCompanyPaymentMethod2:
    post:
      tags:
        - Companies
      summary: Insert payment method for company (v2)
      description: >-
        Inserts a PaymentMethod for the specified Company. Version 2 of this
        method which also takes a invoiceCaptureSettingsCode
      operationId: InsertCompanyPaymentMethod2
      parameters:
        - name: methodId
          in: query
          description: The internal id of the PaymentMethod to insert.
          required: true
          schema:
            type: integer
            format: int32
        - name: companyId
          in: query
          description: >-
            The internal id of the Company for which the PaymentMethod gets
            inserted.
          required: true
          schema:
            type: integer
            format: int32
        - name: createdBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: invoiceCaptureSettingsCode
          in: query
          description: >-
            Specifies the invoice capture settings code that should be used by
            the company payment method.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                $ref: '#/components/schemas/Company'
        '400':
          description: |-
            Bad Request

            Key: CompanyMissing. Gets raised if the company does not exist.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCompaniesByOrgNo:
    get:
      tags:
        - Companies
      summary: List companies by organization number
      description: >-
        Lists Companies by organization number. Note that OrgNo need not be
        unique within storm, only the combination of OrgNo and Name must be
        unique.
      operationId: ListCompaniesByOrgNo
      parameters:
        - name: orgNo
          in: query
          description: >-
            The organization number of the Companies to fetch. All non-numerical
            characters will be removed in the string before the search.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCompaniesByParent:
    get:
      tags:
        - Companies
      summary: List companies by parent
      description: Lists Companies by parent company.
      operationId: ListCompaniesByParent
      parameters:
        - name: parentId
          in: query
          description: The internal Id of the parent Company to fetch children for.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCompanyByInfoType:
    get:
      tags:
        - Companies
      summary: List company by info type
      description: >-
        Returns a list of Companies by info type value. Returns an empty list if
        the Companies does not exist.
      operationId: ListCompanyByInfoType
      parameters:
        - name: code
          in: query
          description: >-
            The info type code. Note that the info type to get must have its
            Code property set or null will be returned.
          required: true
          schema:
            type: string
        - name: value
          in: query
          description: The info type value.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Company'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCompanyDiscounts:
    get:
      tags:
        - Companies
      summary: List company discounts
      description: Lists Company discounts.
      operationId: ListCompanyDiscounts
      parameters:
        - name: companyId
          in: query
          description: The company internal id for which to get discounts.
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CompanyDiscount'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CompanyDiscount'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/UpdateCompany:
    post:
      tags:
        - Companies
      summary: Update a company
      description: >-
        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.
      operationId: UpdateCompany
      parameters:
        - name: customerId
          in: query
          description: The internal id of the Customer.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Company to update. If a supplied Company does not have an Id
          specified it is considered new and will be created as well. Otherwise
          it will be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Company'
          application/xml:
            schema:
              $ref: '#/components/schemas/Company'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerMissing. Gets raised if the Customer is missing.


            Key: InvalidCompanyName. Gets raised if the Company.Name is missing.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: company
  /CustomerService.svc/rest/UpsertCompanyDiscounts:
    post:
      tags:
        - Companies
      summary: Insert or update company discounts
      description: >-
        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.
      operationId: UpsertCompanyDiscounts
      parameters:
        - name: companyId
          in: query
          description: The internal company id for the discounts.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: The account internal id of the user performing the upsert.
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          A list of discounts to update or insert. See CompanyDiscount entity
          for details.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CompanyDiscount'
          application/xml:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CompanyDiscount'
        required: true
      responses:
        '200':
          description: Success
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: discounts
  /CustomerService.svc/rest/ListContactByCompany:
    get:
      tags:
        - Contacts
      summary: >-
        List contact by company [Obsolete("Will be removed in a future
        version.")]
      description: Lists Contacts by Company.Id and an optional responsibilityId.
      operationId: ListContactByCompany
      parameters:
        - name: id
          in: query
          description: The internal Id of the Company to fetch Contacts for.
          required: true
          schema:
            type: integer
            format: int32
        - name: responsibilityId
          in: query
          description: >-
            Contact responsibility. Lookup references in
            ListContactResponsibilities.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListContactResponsibilities:
    get:
      tags:
        - Contacts
      summary: >-
        List contact responsibilities [Obsolete("will be removed in a future
        version.")]
      description: Reference list of Contact Responsibilities.
      operationId: ListContactResponsibilities
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ActivateCustomer:
    post:
      tags:
        - Customers
      summary: Activate customer
      description: >-
        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.
      operationId: ActivateCustomer
      parameters:
        - name: customerId
          in: query
          description: The internal Id of the Customer to activate.
          required: true
          schema:
            type: integer
            format: int32
        - name: activatedBy
          in: query
          description: Account internal id of current user. Do not use default value.
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/CreateCustomer:
    post:
      tags:
        - Customers
      summary: Create a customer [Obsolete("Use CreateCustomer3")]
      description: >-
        See CreateCustomer3 for details. CreateCustomer calls CreateCustomer3
        with an empty password and true as doSendMail.
      operationId: CreateCustomer
      parameters:
        - name: createdBy
          in: query
          description: >-
            Account internal id of current user. If none is supplied the default
            will be used.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to create. If an Account is specified it will be created
          as well. Customers can also be created with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/CreateCustomer2:
    post:
      tags:
        - Customers
      summary: Create a customer (v2) [Obsolete("Use CreateCustomer3")]
      description: >-
        See CreateCustomer3 for details. CreateCustomer2 calls CreateCustomer3
        with true as doSendMail.
      operationId: CreateCustomer2
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied it will be generated.
          schema:
            type: string
        - name: createdBy
          in: query
          description: >-
            Account internal id of current user. If none is supplied the default
            will be used.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to create. If an Account is specified it will be created
          as well. Customers can also be created with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/CreateCustomer3:
    post:
      tags:
        - Customers
      summary: Create a customer (v3)
      description: >-
        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.
      operationId: CreateCustomer3
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case.
            The password is not stored in clear text in Storm. Only a hash value
            of the password gets stored.
          schema:
            type: string
        - name: doSendMail
          in: query
          description: >-
            Set this to true if Storm should send a registration email. Set it
            to false otherwise. Default is true.
          schema:
            type: string
        - name: createdBy
          in: query
          description: >-
            Internal account id of current user. If none is supplied the default
            will be used.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to create. If an Account is specified it will be created
          as well. Customers can also be created with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/GetCustomer:
    get:
      tags:
        - Customers
      summary: Get a customer
      description: Gets a Customer by Id. Returns null if the Customer doesn't exist.
      operationId: GetCustomer
      parameters:
        - name: id
          in: query
          description: The internal Id of the Customer to fetch.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCustomerByAccountId:
    get:
      tags:
        - Customers
      summary: Get a customer by account id
      description: >-
        Gets a Customer by Account internal id. Returns null if the Customer
        doesn't exist.
      operationId: GetCustomerByAccountId
      parameters:
        - name: accountId
          in: query
          description: The account internal Id of the Customer to fetch.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCustomerByCode:
    get:
      tags:
        - Customers
      summary: Get a customer by code
      description: >-
        Gets a Customer by external code. Returns null if the customer doesn't
        exist.
      operationId: GetCustomerByCode
      parameters:
        - name: code
          in: query
          description: The external code. Usually the id in the erp system.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCustomerByEmail:
    get:
      tags:
        - Customers
      summary: Get a customer by e-mail
      description: Gets a Customer by Email. Returns null if the Customer doesn't exist.
      operationId: GetCustomerByEmail
      parameters:
        - name: email
          in: query
          description: The Email of the Customer to fetch.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCustomerByKey:
    get:
      tags:
        - Customers
      summary: Get a customer by key
      description: Gets a Customer by Key. Returns null if the Customer doesn't exist.
      operationId: GetCustomerByKey
      parameters:
        - name: key
          in: query
          description: The Key of the Customer to fetch.
          required: true
          schema:
            type: string
            format: guid
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCustomerByLoginName:
    get:
      tags:
        - Customers
      summary: Get a customer by login name
      description: >-
        Gets a Customer by Account.LoginName. Returns null if the Customer
        doesn't exist.
      operationId: GetCustomerByLoginName
      parameters:
        - name: loginName
          in: query
          description: The Account.LoginName of the Customer to fetch.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InactivateCustomer:
    post:
      tags:
        - Customers
      summary: Inactivate customer
      description: >-
        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.
      operationId: InactivateCustomer
      parameters:
        - name: customerId
          in: query
          description: The internal Id of the Customer to inactivate.
          required: true
          schema:
            type: integer
            format: int32
        - name: inactivatedBy
          in: query
          description: Account internal id of current user. Do not use default value.
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content: {}
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerByCompany:
    get:
      tags:
        - Customers
      summary: List customers by company [Obsolete("Use ListCustomerByCompany2")]
      description: >-
        See ListCustomerByCompany2. ListCustomerByCompany2 gets called with an
        empty accountRoleId.
      operationId: ListCustomerByCompany
      parameters:
        - name: id
          in: query
          description: The internal Id of the Company to fetch Customers for.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerByCompany2:
    get:
      tags:
        - Customers
      summary: List customers by company (v2) [Obsolete("Use ListCustomerByCompany3")]
      description: >-
        See ListCustomerByCompany3. ListCustomerByCompany2 calls
        ListCustomerByCompany3 with an empty accountRoleId and showInactive as
        false.
      operationId: ListCustomerByCompany2
      parameters:
        - name: id
          in: query
          description: The internal Id of the Company to fetch Customers for.
          required: true
          schema:
            type: integer
            format: int32
        - name: accountRoleId
          in: query
          description: >-
            An optional account role internal id of the customer account to
            search for. Use ListAccountRoles for valid ids.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerByCompany3:
    get:
      tags:
        - Customers
      summary: List customers by company (v3)
      description: >-
        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.
      operationId: ListCustomerByCompany3
      parameters:
        - name: id
          in: query
          description: The internal Id of the Company to fetch Customers for.
          required: true
          schema:
            type: integer
            format: int32
        - name: accountRoleId
          in: query
          description: >-
            An optional account role internal id of the customer account to
            search for. Use ListAccountRoles for valid ids.
          schema:
            type: string
        - name: showInactive
          in: query
          description: >-
            An option to show inactive customers in the result. Default value is
            false.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerByInfoType:
    get:
      tags:
        - Customers
      summary: List customers by info type [Obsolete("Use ListCustomerByInfoType2")]
      description: >-
        See ListCustomerByInfoType2 for details. ListCustomerByInfoType calls
        ListCustomerByInfoType2 with showInactive as false.
      operationId: ListCustomerByInfoType
      parameters:
        - name: code
          in: query
          description: >-
            The info type code. Note that the info type to get must have its
            Code property set or null will be returned.
          required: true
          schema:
            type: string
        - name: value
          in: query
          description: The info type value.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerByInfoType2:
    get:
      tags:
        - Customers
      summary: List customers by info type (v2)
      description: >-
        Returns a list of customers by info type value. Returns an empty list if
        the Customer does not exist.
      operationId: ListCustomerByInfoType2
      parameters:
        - name: code
          in: query
          description: >-
            The info type code. Note that the info type to get must have its
            Code property set or null will be returned.
          required: true
          schema:
            type: string
        - name: value
          in: query
          description: The info type value.
          required: true
          schema:
            type: string
        - name: showInactive
          in: query
          description: >-
            An option to show inactive customers in the result. Default value is
            false.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerBySSN:
    get:
      tags:
        - Customers
      summary: >-
        List customers by social security number [Obsolete("Use
        ListCustomerBySSN2")]
      description: >-
        See ListCustomerBySSN2 for details. ListCustomerBySSN calls
        ListCustomerBySSN2 with showInactive as false. Companies are not
        returned.
      operationId: ListCustomerBySSN
      parameters:
        - name: ssn
          in: query
          description: >-
            The social security number to search for. All non-numerical
            characters will be removed in the string before the search.
          required: true
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerBySSN2:
    get:
      tags:
        - Customers
      summary: List customers by social security number (v2)
      description: Lists Customers by social security number. Companies are not returned.
      operationId: ListCustomerBySSN2
      parameters:
        - name: ssn
          in: query
          description: >-
            The social security number to search for. All non-numerical
            characters will be removed in the string before the search.
          required: true
          schema:
            type: string
        - name: showInactive
          in: query
          description: >-
            An option to show inactive customers in the result. Default value is
            false.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/RegisterCustomer:
    post:
      tags:
        - Customers
      summary: Register a customer [Obsolete("Use RegisterCustomer3")]
      description: >-
        See RegisterCustomer3 for details. RegisterCustomer calls
        RegisterCustomer3 with an empty password and true as doSendMail.
      operationId: RegisterCustomer
      parameters:
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to register. If an Account is specified it will be
          created as well. Customers can also be registered with or without
          Companies. If a supplied Company does not have an Id specified it is
          considered new and will be created as well. Otherwise it will be
          updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/RegisterCustomer2:
    post:
      tags:
        - Customers
      summary: Register a customer (v2) [Obsolete("Use RegisterCustomer3")]
      description: >-
        See RegisterCustomer3 for details. RegisterCustomer2 calls
        RegisterCustomer3 with true as doSendMail.
      operationId: RegisterCustomer2
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case.
            The password is not stored in clear text in Storm. Only a hash value
            of the password gets stored.
          schema:
            type: string
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to register. If an Account is specified it will be
          created as well. Customers can also be registered with or without
          Companies. If a supplied Company does not have an Id specified it is
          considered new and will be created as well. Otherwise it will be
          updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/RegisterCustomer3:
    post:
      tags:
        - Customers
      summary: Register a customer (v3)
      description: >-
        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.
      operationId: RegisterCustomer3
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case. To
            update a password, also supply the account object with its root data
            set (Id, Key, LoginName, Name, IsActive). The password is not stored
            in clear text in Storm. Only a hash value of the password gets
            stored.
          schema:
            type: string
        - name: doSendMail
          in: query
          description: >-
            Set this to true if Storm should send a registration email. Set it
            to false otherwise. Default is true.
          schema:
            type: string
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to register. If an Account is specified it will be
          created as well. Customers can also be registered with or without
          Companies. If a supplied Company does not have an Id specified it is
          considered new and will be created as well. Otherwise it will be
          updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists and it is not the same as the supplied one.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/SearchCustomer:
    get:
      tags:
        - Customers
      summary: Search for customers [Obsolete("Use SearchCustomer2")]
      description: >-
        See SearchCustomer2 for details. SearchCustomer calls SearchCustomer2
        with showInactive as false.
      operationId: SearchCustomer
      parameters:
        - name: searchString
          in: query
          description: The actual search string. Must be at least 2 characters.
          required: true
          schema:
            type: string
        - name: companyId
          in: query
          description: If supplied, only customers for that company are returned.
          schema:
            type: string
        - name: sort
          in: query
          description: >-
            Sort order as formatted [Property] [Asc/Desc] with comma as
            separator. Sample: LastName, FirstName, which is the default.
          schema:
            type: string
        - name: size
          in: query
          description: Number of items to display. Default is 50.
          schema:
            type: string
        - name: expand
          in: query
          description: >-
            An expand option that specifies what expansions should be made on
            the Customer entity. Valid values are: None, Account, Flags, Info,
            Addresses and PriceLists. These can be comma separated. Use Full for
            all but PriceLists. Default is Full. None will return just the
            Customer without expansions.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/SearchCustomer2:
    get:
      tags:
        - Customers
      summary: Search for customers (v2)
      operationId: SearchCustomer2
      parameters:
        - name: searchString
          in: query
          description: The actual search string. Must be at least 2 characters.
          required: true
          schema:
            type: string
        - name: companyId
          in: query
          description: If supplied, only customers for that company are returned.
          schema:
            type: string
        - name: sort
          in: query
          description: >-
            Sort order as formatted [Property] [Asc/Desc] with comma as
            separator. Sample: LastName, FirstName, which is the default.
          schema:
            type: string
        - name: size
          in: query
          description: Number of items to display. Default is 50.
          schema:
            type: string
        - name: expand
          in: query
          description: >-
            An expand option that specifies what expansions should be made on
            the Customer entity. Valid values are: None, Account, Flags, Info,
            Addresses and PriceLists. These can be comma separated. Use Full for
            all but PriceLists. Default is Full. None will return just the
            Customer without expansions.
          schema:
            type: string
        - name: showInactive
          in: query
          description: >-
            An option to show inactive customers in the result. Default value is
            false.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/SetDefaultCompany:
    post:
      tags:
        - Customers
      summary: Set default company for customer
      description: >-
        Updates the default company for this customer. If no Company is set as
        default, the first Company will be used as default where needed.
      operationId: SetDefaultCompany
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company to set as default.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: The Customer for which the default Company is set.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/UpdateCustomer:
    post:
      tags:
        - Customers
      summary: Update a customer [Obsolete("Use UpdateCustomer3")]
      description: >-
        See UpdateCustomer3 for details. UpdateCustomer calls UpdateCustomer3
        with an empty password and true as doSendMail.
      operationId: UpdateCustomer
      parameters:
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to update. If an Account is specified it will be created
          as well. Customers can also be updated with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well. Otherwise it will be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: CustomerMissing. Gets raised if the Customer is missing.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/UpdateCustomer2:
    post:
      tags:
        - Customers
      summary: Update a customer (v2) [Obsolete("Use UpdateCustomer3")]
      description: >-
        See UpdateCustomer3 for details. UpdateCustomer2 calls UpdateCustomer3
        with true as doSendMail.
      operationId: UpdateCustomer2
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case.
            The password is not stored in clear text in Storm. Only a hash value
            of the password gets stored.
          schema:
            type: string
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to update. If an Account is specified it will be created
          as well. Customers can also be updated with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well. Otherwise it will be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists, if Account is supplied.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: CustomerMissing. Gets raised if the Customer is missing.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/UpdateCustomer3:
    post:
      tags:
        - Customers
      summary: Update a customer (v3)
      description: >-
        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.
      operationId: UpdateCustomer3
      parameters:
        - name: password
          in: query
          description: >-
            An application generated password used if an Account is created. If
            none is supplied the password will be generated. Generated passwords
            are 8 random alpha numeric characters mixed lower and upper case.
            The password is not stored in clear text in Storm. Only a hash value
            of the password gets stored.
          schema:
            type: string
        - name: doSendMail
          in: query
          description: >-
            Set this to true if Storm should send a registration email. Set it
            to false otherwise. Default is true.
          schema:
            type: string
        - name: updatedBy
          in: query
          description: Account internal id of current user. Pass 1 for the default account.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
        - name: includeCompanies
          in: query
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true.
          schema:
            type: string
      requestBody:
        description: >-
          The Customer to update. If an Account is specified it will be created
          as well. Customers can also be updated with or without Companies. If a
          supplied Company does not have an Id specified it is considered new
          and will be created as well. Otherwise it will be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/xml:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
            application/xml:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: >-
            Bad Request


            Key: AccountAlreadyExists. Gets raised when the account already
            exists and it is not the same as the supplied one.


            Key: CompanyAlreadyExists. Gets raised when there already exists a
            company with the specified organizational number/name combination.


            Key: CustomerAlreadyExists. Gets raised when there already exists a
            Customer with the specified email.


            Key: CustomerMissing. Gets raised if the Customer is missing.


            Key: InvalidCompanyName. Gets raised if any Company.Name is missing.


            Key: InvalidEmail. Gets raised if an email is supplied and it is
            invalid.


            Key: DeliveryAddressZipMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a Zip code.


            Key: DeliveryAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: DeliveryAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.


            Key: InvoiceAddressZipMissing. Gets raised if any DeliveryAddress is
            supplied and it is missing a Zip code.


            Key: InvoiceAddressCityMissing. Gets raised if any DeliveryAddress
            is supplied and it is missing a City.


            Key: InvoiceAddressCountryMissing. Gets raised if any
            DeliveryAddress is supplied and it is missing a Country.
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: customer
  /CustomerService.svc/rest/ListCompanyFlags:
    get:
      tags:
        - Flags
      summary: List company flags
      description: Lists the available company flags.
      operationId: ListCompanyFlags
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFlag'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFlag'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerFlags:
    get:
      tags:
        - Flags
      summary: List customer flags
      description: Lists the available customer flags.
      operationId: ListCustomerFlags
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFlag'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerFlag'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCompanyInfoTypes:
    get:
      tags:
        - InfoTypes
      summary: List company info types
      description: Lists the info type ids used in Company.Info.
      operationId: ListCompanyInfoTypes
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListCustomerInfoTypes:
    get:
      tags:
        - InfoTypes
      summary: List customer info types
      description: Lists the info type ids used in Customer.Info.
      operationId: ListCustomerInfoTypes
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdValue'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/DeleteCompanyPricelist:
    post:
      tags:
        - PriceLists
      summary: Delete pricelist from company
      description: >-
        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.
      operationId: DeleteCompanyPricelist
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: pricelistId
          in: query
          description: The internal id of the priceList to delete for the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetCompanyPricelist:
    get:
      tags:
        - PriceLists
      summary: Get a pricelist for company
      description: >-
        Gets a CompanyPriceList for the specified Company. Returns null if the
        PriceList does not exist.
      operationId: GetCompanyPricelist
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company for which the PriceList is fetched.
          required: true
          schema:
            type: integer
            format: int32
        - name: pricelistId
          in: query
          description: The internal id of the PriceList to fetch.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/GetPricelistItem:
    get:
      tags:
        - PriceLists
      summary: Get a pricelist item
      description: >-
        Gets a priceList item. Returns null if the PriceListItem does not exist.
        Prices are in the currency of the PriceList.
      operationId: GetPricelistItem
      parameters:
        - name: partNo
          in: query
          description: The PartNo of the PriceListItem to fetch.
          required: true
          schema:
            type: string
        - name: pricelistId
          in: query
          description: >-
            The internal Id of the current PriceList for which the PriceListItem
            is fetched.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricelistItem'
            application/xml:
              schema:
                $ref: '#/components/schemas/PricelistItem'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/InsertCompanyPricelist:
    post:
      tags:
        - PriceLists
      summary: >-
        Insert pricelist for company [Obsolete("Use InsertCompanyPricelist2 and
        set correct value on PriceList.IsExclusive.")]
      description: >-
        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. Will set IsExclusive to true as default. Use
        InsertCompanyPricelist2 and set PriceList.IsExclusive to false if this
        is not wanted.
      operationId: InsertCompanyPricelist
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: createdBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The priceList to insert for the Company. The PriceRule for new
          PriceLists will be 'Use standard price (pct discount)' (id:7) if none
          is supplied.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricelist'
          application/xml:
            schema:
              $ref: '#/components/schemas/Pricelist'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelist
  /CustomerService.svc/rest/InsertCompanyPricelist2:
    post:
      tags:
        - PriceLists
      summary: Insert pricelist for company (v2)
      description: >-
        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.
      operationId: InsertCompanyPricelist2
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: createdBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The priceList to insert for the Company. The PriceRule for new
          PriceLists will be 'Use standard price (pct discount)' (id:7) if none
          is supplied.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricelist'
          application/xml:
            schema:
              $ref: '#/components/schemas/Pricelist'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelist
  /CustomerService.svc/rest/InsertPricelistItem:
    post:
      tags:
        - PriceLists
      summary: Insert a pricelist item
      description: >-
        Inserts a new priceList item. If the PriceListItem already exists, an
        update is made.
      operationId: InsertPricelistItem
      parameters:
        - name: createdBy
          in: query
          description: >-
            The internal id of the current customer's account. If none is
            supplied, value is resolved from Application.
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          The PriceListItem to insert. Prices should be in the currency of the
          PriceList.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricelistItem'
          application/xml:
            schema:
              $ref: '#/components/schemas/PricelistItem'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricelistItem'
            application/xml:
              schema:
                $ref: '#/components/schemas/PricelistItem'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelistItem
  /CustomerService.svc/rest/ListCompanyPricelists:
    get:
      tags:
        - PriceLists
      summary: List all pricelists for a company
      description: Returns a list of PriceLists for the specified Company.
      operationId: ListCompanyPricelists
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company for which the PriceLists are fetched.
          required: true
          schema:
            type: integer
            format: int32
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/ListPriceRules:
    get:
      tags:
        - PriceLists
      summary: List price rules
      description: Lists the available price rules.
      operationId: ListPriceRules
      parameters:
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdNameDescription'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IdNameDescription'
        '500':
          description: Internal Server Error
          content: {}
  /CustomerService.svc/rest/UpdateCompanyPricelist:
    post:
      tags:
        - PriceLists
      summary: >-
        Update pricelist for company [Obsolete("Use UpdateCompanyPricelist2 and
        set correct value on PriceList.IsExclusive.")]
      description: >-
        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.
        Will set IsExclusive to true as default. Use UpdateCompanyPricelist2 and
        set PriceList.IsExclusive to false if this is not wanted.
      operationId: UpdateCompanyPricelist
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The priceList to update for the Company. The PriceRule for updated
          PriceLists will be 'Use standard price (pct discount)' (id:7) if none
          is supplied.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricelist'
          application/xml:
            schema:
              $ref: '#/components/schemas/Pricelist'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelist
  /CustomerService.svc/rest/UpdateCompanyPricelist2:
    post:
      tags:
        - PriceLists
      summary: Update pricelist for company (v2)
      description: >-
        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.
      operationId: UpdateCompanyPricelist2
      parameters:
        - name: companyId
          in: query
          description: The internal id of the Company.
          required: true
          schema:
            type: integer
            format: int32
        - name: updatedBy
          in: query
          description: Account internal id of current user.
          schema:
            type: string
        - name: cultureCode
          in: query
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application.
          schema:
            type: string
      requestBody:
        description: >-
          The priceList to update for the Company. The PriceRule for updated
          PriceLists will be 'Use standard price (pct discount)' (id:7) if none
          is supplied.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pricelist'
          application/xml:
            schema:
              $ref: '#/components/schemas/Pricelist'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pricelist'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelist
  /CustomerService.svc/rest/UpdatePricelistItem:
    post:
      tags:
        - PriceLists
      summary: Update a pricelist item
      description: Updates a priceList item.
      operationId: UpdatePricelistItem
      parameters:
        - name: updatedBy
          in: query
          description: >-
            The internal id of the current customer's account. If none is
            supplied, value is resolved from Application.
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          The PriceListItem to update. Prices should be in the currency of the
          PriceList.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricelistItem'
          application/xml:
            schema:
              $ref: '#/components/schemas/PricelistItem'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricelistItem'
            application/xml:
              schema:
                $ref: '#/components/schemas/PricelistItem'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: pricelistItem
components:
  schemas:
    Account:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            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.
          format: int32
          nullable: true
        Key:
          type: string
          description: The system wide unique Key for the Account.
          format: guid
        LoginName:
          type: string
          description: >-
            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.
        Name:
          type: string
          description: >-
            This is the full name of the connected Customer's first and last
            name. MaxLength: 100.
        Roles:
          type: array
          description: >-
            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.
          items:
            type: integer
            format: int32
        Authorizations:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/IdValue'
        IsActive:
          type: boolean
          description: >-
            Indicates if the Account is Active or not. Use UpdateAccountStatus
            to change this value.
      format: Account
    Address:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            The internal Id of the Address. When creating a new Address leave
            this blank as Storm will generate the Id.
          format: int32
          nullable: true
        CareOf:
          type: string
          description: 'The CareOf of the Address. MaxLength: 100.'
        Line1:
          type: string
          description: 'The first address line of the Address. MaxLength: 255.'
        Line2:
          type: string
          description: 'The second address line of the Address. MaxLength: 255.'
        Zip:
          type: string
          description: 'The zip code of the Address. MaxLength: 50.'
        City:
          type: string
          description: 'The City of the Address. MaxLength: 50.'
        CountryId:
          type: integer
          description: >-
            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.
          format: int32
        Country:
          type: string
          description: >-
            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.
        Region:
          type: string
          description: 'The Region of the Address. MaxLength: 50.'
        IsValidated:
          type: boolean
          description: >-
            Indicates if the address had been validated. It is up to the
            Application to validate addresses. Use normal address-methods to
            update this value.
        GlobalLocationNo:
          type: string
          description: >-
            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.
        ShippingPhoneNumber:
          type: string
          description: >-
            Phone number for shipping address. Only applicable in shipping
            addresses. MaxLength: 50.
      format: Address
    AgreementAccount:
      type: object
      properties:
        PricelistId:
          type: integer
          description: The PriceListId of the PriceList logged in to.
          format: int32
        Name:
          type: string
          description: 'The Name of the AgreementAccount/PriceList. MaxLength: 50.'
        StartDate:
          type: string
          description: The StartDate of the AgreementAccount/PriceList.
          format: date-time
          nullable: true
        EndDate:
          type: string
          description: The EndDate of the AgreementAccount/PriceList.
          format: date-time
          nullable: true
        ImageKey:
          type: string
          description: >-
            A unique id for the image at our image server. Url for images are
            formed like http://[client specific CDN]/{ImageKey}. Preset, height
            and width can be sent as parameters.
          format: guid
          nullable: true
        ShowPricesIncVat:
          type: boolean
          description: Indicates if prices should be shown inc or ex VAT.
          nullable: true
      format: AgreementAccount
    Company:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            The internal Storm Id for the Company. When creating a new Company
            leave this blank as Storm will generate the Id.
          format: int32
          nullable: true
        Key:
          type: string
          description: The system wide unique Key of the Company.
          format: guid
        Code:
          type: string
          description: 'The external code. Usually the id in the erp system. MaxLength: 50.'
        Name:
          type: string
          description: 'The Name of the Company. MaxLength: 100.'
        OrgNo:
          type: string
          description: >-
            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.
        Phone:
          type: string
          description: 'The Phone number of the Company. MaxLength: 50.'
        ReferId:
          type: integer
          description: Used to tag a Company with some external id.
          format: int32
          nullable: true
        ReferUrl:
          type: string
          description: 'Used to tag a Company with an incoming URL. MaxLength: 255.'
        DeliveryAddresses:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/Address'
        InvoiceAddress:
          $ref: '#/components/schemas/Address'
        UseInvoiceAddressAsDeliveryAddress:
          type: boolean
          description: >-
            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.
        Info:
          type: array
          description: >-
            Contains a list of id-value pairs specific to the client for this
            company. Use ApplicationService.ListCompanyInfoTypes for id lookup.
          items:
            $ref: '#/components/schemas/IdValue'
        PricelistIds:
          type: array
          description: >-
            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.
          items:
            type: integer
            format: int32
        ParentId:
          type: integer
          description: >-
            Points to an optional parent company. Used when companies are
            connected some how.
          format: int32
          nullable: true
        DeliveryMethodIds:
          type: array
          description: >-
            Contains a list of delivery method ids valid for this company. It
            will be empty if no delivery methods exist.
          items:
            type: integer
            format: int32
        PaymentMethodIds:
          type: array
          description: >-
            Contains a list of payment method ids valid for this company. It
            will be empty if no payment methods exist.
          items:
            type: integer
            format: int32
        Email:
          type: string
          description: 'The Email address of the Company. MaxLength: 255.'
        Flags:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/Flag'
        VatNo:
          type: string
          description: 'This is the VAT registration number for the company.  MaxLength: 50.'
      format: Company
    CompanyDiscount:
      type: object
      properties:
        TypeId:
          type: integer
          description: >-
            The TypeId defines the rule for how Value is interpreted. 1 =
            Category discount, 2 = DiscountCode on product. Cannot be changed.
          format: int32
        Value:
          type: string
          description: >-
            The value to check for on products. If TypeID = 1 then discounts are
            valid for all products belonging to Category with Category.Code =
            Value. If TypeId = 2 then the product's discount code is checked.
            Cannot be changed. MaxLength: 50.
        Discount:
          type: number
          description: 'The actual discount percentage. Ex: 15.00 equals 15% discount.'
          format: decimal
        PriceListTypeSeed:
          type: string
          description: >-
            An optional comma-separated list of priceList type-ids for which the
            discount is valid. MaxLength: 50.
      format: CompanyDiscount
    CompanyPaymentMethod:
      type: object
      properties:
        CompanyCode:
          type: string
          description: 'The external code of the company. MaxLength: 50.'
        PaymentMethodCode:
          type: string
          description: 'The external code of the payment method. MaxLength: 50.'
        InvoiceCaptureSettingsCode:
          type: string
          description: 'The invoice capture settings code (if any is set). MaxLength: 50.'
        IsActive:
          type: boolean
          description: Whether or not the company payment method is active.
      format: CompanyPaymentMethod
    Contact:
      type: object
      properties:
        Id:
          type: integer
          description: The internal Id of the Contact.
          format: int32
          nullable: true
        Key:
          type: string
          description: The system wide unique Key for the Contact.
          format: guid
        Code:
          type: string
          description: 'The external code. Usually the id in the erp system. MaxLength: 50.'
        ResponsibilityId:
          type: integer
          description: The ResponsibilityId of the Contact.
          format: int32
        Email:
          type: string
          description: 'The Email of the Contact. MaxLength: 255.'
        FirstName:
          type: string
          description: 'The FirstName of the Contact. MaxLength: 50.'
        LastName:
          type: string
          description: 'The LastName of the Contact. MaxLength: 50.'
        Phone:
          type: string
          description: 'The Phone number of the Contact. MaxLength: 50.'
        CellPhone:
          type: string
          description: 'The CellPhone number of the Contact. MaxLength: 50.'
        ImagePath:
          type: string
          description: 'MaxLength: 255. Obsolete! - Use ImageKey'
        ImageKey:
          type: string
          description: >-
            A unique id for the image at our image server. Url for images are
            formed like http://[client specific CDN]/{ImageKey}. Preset, height
            and width can be sent as parameters.
          format: guid
          nullable: true
      format: Contact
    Customer:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            The internal Storm Id of the Customer. When creating a new Customer
            leave this blank as Storm will generate the Id.
          format: int32
          nullable: true
        Key:
          type: string
          description: The system wide unique Key of the Customer.
          format: guid
        Code:
          type: string
          description: 'The external code. Usually the id in the erp system. MaxLength: 50.'
        Email:
          type: string
          description: 'The Email address of the Customer. MaxLength: 255.'
        SSN:
          type: string
          description: >-
            The social security number of the Customer. Used to identify the
            Customer for some payment methods. MaxLength: 50.
        FirstName:
          type: string
          description: 'The FirstName of the Customer. MaxLength: 50.'
        LastName:
          type: string
          description: 'The LastName of the Customer. MaxLength: 50.'
        Phone:
          type: string
          description: 'The PhoneNumber of the Customer. MaxLength: 50.'
        CellPhone:
          type: string
          description: 'The CellPhone number of the Customer. MaxLength: 50.'
        ReferId:
          type: integer
          description: Used to tag a Customer with some external id.
          format: int32
          nullable: true
        ReferUrl:
          type: string
          description: 'Used to tag a Customer with an incoming URL. MaxLength: 255.'
        Account:
          $ref: '#/components/schemas/Account'
        Companies:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/Company'
        DeliveryAddresses:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/Address'
        InvoiceAddress:
          $ref: '#/components/schemas/Address'
        Flags:
          type: array
          description: >-
            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.
          items:
            $ref: '#/components/schemas/Flag'
        UseInvoiceAddressAsDeliveryAddress:
          type: boolean
          description: >-
            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:
          type: array
          description: >-
            Contains a list of id-value pairs specific to the client for this
            customer. Use ApplicationService.ListCustomerInfoTypes for id
            lookup.
          items:
            $ref: '#/components/schemas/IdValue'
        PricelistIds:
          type: array
          description: >-
            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.
          items:
            type: integer
            format: int32
        CrmId:
          type: string
          description: >-
            Used to save the Customers external id from a crm-system MaxLength:
            50.
        IsActive:
          type: boolean
          description: Specifies if the Customer is active or not.
          nullable: true
        Created:
          type: string
          description: When the customer was created.
          format: date-time
          nullable: true
        Updated:
          type: string
          description: When the customer was last updated.
          format: date-time
          nullable: true
      format: Customer
    CustomerFlag:
      type: object
      properties:
        Id:
          type: integer
          description: The internal Id of the CustomerFlag.
          format: int32
        Name:
          type: string
          description: 'The name of the CustomerFlag. MaxLength: 50.'
        Description:
          type: string
          description: 'The description of the CustomerFlag. MaxLength: max.'
        SortOrder:
          type: integer
          description: The sort order of the CustomerFlag.
          format: int32
        Group:
          $ref: '#/components/schemas/IdNameDescription'
      format: CustomerFlag
    Flag:
      type: object
      properties:
        Id:
          type: integer
          description: The internal Id of the Flag.
          format: int32
        Name:
          type: string
          description: 'The Name of the Flag. MaxLength: 50.'
        Group:
          type: integer
          description: The GroupId of the Flag.
          format: int32
        IsSelected:
          type: boolean
          description: Indicates if the Flag is selected or not.
      format: Flag
    Login:
      type: object
      properties:
        LoginName:
          type: string
          description: 'User login name MaxLength: 255.'
        Password:
          type: string
          description: 'User''s password MaxLength: 4000.'
        CultureCode:
          type: string
          description: >-
            Specifies in which language to display culture specific information.
            If none is supplied, value is resolved from Application. MaxLength:
            16.
        IncludeCompanies:
          type: string
          description: >-
            Include full company data, if any, with the customer. Otherwise only
            primary company, if any, is included. Default is true. MaxLength:
            bool.
      format: Login
    Pricelist:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            The internal pricelist id. Set to null when creating a new
            pricelist.
          format: int32
          nullable: true
        ParentId:
          type: integer
          description: The parent internal pricelist id. If any.
          format: int32
          nullable: true
        Name:
          type: string
          description: 'The name of the pricelist. MaxLength: 50.'
        Description:
          type: string
          description: 'The description of the pricelist. MaxLength: max.'
        Agreement:
          type: string
          description: >-
            The agreement code of the pricelist. Can be an external id of the
            priceList. MaxLength: 50.
        Type:
          type: integer
          description: >-
            The type of the pricelist. 0 is default. Other values are
            application specific.
          format: int32
        IsActive:
          type: boolean
          description: >-
            Specifies if the pricelist is active or not. Set this to false
            before update if you want to delete the pricelist.
        PriceRule:
          $ref: '#/components/schemas/PricelistPriceRule'
        PopulationRules:
          type: array
          description: A list of population rules for this pricelist.
          items:
            $ref: '#/components/schemas/PricelistPopulationRule'
        CurrencyId:
          type: integer
          description: The currencyId for this pricelist.
          format: int32
        IsExclusive:
          type: boolean
          description: >-
            Indicates if the pricelist should be used exclusively for this
            Company, or not. Exclusive pricelists are not used with any standard
            pricelists and only exclusive pricelists will be in scope if the
            Company has any.
      format: Pricelist
    PricelistItem:
      type: object
      properties:
        PartNo:
          type: string
          description: 'PartNo of the SKU for this price item. MaxLength: 50.'
        PricelistId:
          type: integer
          description: The internal pricelist id.
          format: int32
        Price:
          type: number
          description: The price. Read only. Currency is from the pricelist.
          format: decimal
        PriceRecommended:
          type: number
          description: The price from inherited pricelist, if any.
          format: decimal
          nullable: true
        IsActive:
          type: boolean
          description: >-
            Specifies if the pricelist item is active or not. Ignored when
            inserting new pricelist items.
        PriceRule:
          $ref: '#/components/schemas/PricelistPriceRule'
      format: PricelistItem
    PricelistPopulationRule:
      type: object
      properties:
        RuleId:
          type: integer
          description: >-
            An internal id for a specific rule. Set to null when creating a
            rule.
          format: int32
          nullable: true
        ManufacturerId:
          type: integer
          description: >-
            An optional internal manufacturer id. Used if the priceList is
            restricted to a specific manufacturer.
          format: int32
          nullable: true
        CategoryId:
          type: integer
          description: >-
            An optional internal category id. Used if the priceList is
            restricted to a specific category.
          format: int32
          nullable: true
        IsSupplierRequired:
          type: boolean
          description: Specifies if the populations is from a supplier.
        IsInclusive:
          type: boolean
          description: Specifies if the population rule is inclusive or exclusive.
      format: PricelistPopulationRule
    PricelistPriceRule:
      type: object
      properties:
        RuleId:
          type: integer
          description: >-
            An internal id for a specific rule. Consult Norce for a list of
            valid ids and what they mean.
          format: int32
          nullable: true
        Value:
          type: number
          description: >-
            The value associated with the rule. The ruleId specifies how this
            value is used.
          format: decimal
          nullable: true
      format: PricelistPriceRule
    IdNameDescription:
      type: object
      properties:
        Id:
          type: integer
          description: The internal Id of the Entity.
          format: int32
        Name:
          type: string
          description: 'The Name of the Entity. MaxLength: 50.'
        Description:
          type: string
          description: 'The Description of the Entity. MaxLength: 500.'
        ImageKey:
          type: string
          description: >-
            A unique id for the image at our image server. Url for images are
            formed like http://[client specific CDN]/{ImageKey}. Preset, height
            and width can be sent as parameters.
          format: guid
          nullable: true
        Code:
          type: string
          description: 'The Code of the Entity. MaxLength: 50.'
      format: IdNameDescription
    IdValue:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            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.
          format: int32
        Value:
          type: string
          description: 'The Value of the Entity. MaxLength: max.'
        Code:
          type: string
          description: >-
            The Code of the Entity, if existing. Use this value when hard coding
            is required. MaxLength: 255.
      format: IdValue
x-original-swagger-version: '2.0'
