swagger: '2.0'
basePath: /v3
paths:
  /accounts/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Account successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new account
      operationId: post_account_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateAccount'
      tags:
        - accounts
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of accounts'
      summary: Returns a paginated list of accounts
      operationId: get_account_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: userid
          in: query
          type: integer
          description: id property of the user owning the account
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: accountnumber
          in: query
          type: string
          description: number property of the account whith which the account takes place
        - name: typeid
          in: query
          type: integer
          description: id property of the accountType
        - name: typeids
          in: query
          type: integer
          description: comma separated list of typeids
        - name: active
          in: query
          type: integer
          description: >-
            get active or inactive accounts, use the value 2 for both active and
            inactive
          default: 1
          enum:
            - 0
            - 1
            - 2
          collectionFormat: multi
        - name: name
          in: query
          type: string
          description: use \% as a wildcard
        - name: nearto
          in: query
          type: string
          description: >-
            will filter accounts based on proximty to supplied location
            {latitude, longitude}
        - name: distance
          in: query
          type: string
          description: >-
            determines the proximity treshold for the nearto filter, treshold is
            in kilometers
        - name: postal_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: postal_street
          in: query
          type: string
          description: use \% as a wildcard
        - name: visitingaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: deliveryaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: invoiceaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: phone
          in: query
          type: string
          description: use \% as a wildcard
        - name: cellphone
          in: query
          type: string
          description: use \% as a wildcard
        - name: vatno
          in: query
          type: string
          description: use \% as a wildcard
        - name: externalkey
          in: query
          type: string
        - name: followedby
          in: query
          type: integer
          description: id property of the user whose followed accounts are queried
        - name: missionid
          in: query
          type: integer
        - name: missionresult
          in: query
          type: integer
          description: only shows accounts connected to missionid with result 1/0
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: activity
          in: query
          type: integer
          description: >-
            Show accounts with at least one activity. use activity_* for more
            activity predicates
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: activity_user
          in: query
          type: integer
          description: >-
            Show accounts with at least one activity where this user is
            responsible.

            Only in effect when activity=1.
        - name: activity_closed
          in: query
          type: integer
          description: >-
            Show accounts with at least one (non-)closed activity if set to
            true.

            Only in effect when activity=1.
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: activity_type
          in: query
          type: integer
          description: |-
            Show accounts with at least one activity of this type.
            Only in effect when activity=1.
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in name, alt_name, number,
            phone, cellphone, email, vatno, postal_street, postal_city,
            postal_zip, visitingaddress_careof, visitingaddress_street,
            visitingaddress_zip, visitingaddress_city, deliveryaddress_name,
            deliveryaddress_street, deliveryaddress_zip, deliveryaddress_city,
            invoiceaddress_name, invoiceaddress_street, invoiceaddress_zip,
            invoiceaddress_city
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - number_asc
            - number_desc
            - userid_asc
            - userid_desc
            - postaladdress_number_asc
            - postaladdress_number_desc
            - postaladdress_odd_asc
            - postaladdress_odd_desc
            - postaladdress_even_asc
            - postaladdress_even_desc
          collectionFormat: multi
      tags:
        - accounts
  /accounts/accountcoordinates/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of accountcoordinates'
      summary: Returns a paginated list of account coordinates
      operationId: get_account_coordinates_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}
          default: 10
        - name: userid
          in: query
          type: integer
          description: id property of the user owning the account
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: accountnumber
          in: query
          type: string
          description: number property of the account whith which the account takes place
        - name: typeid
          in: query
          type: integer
          description: id property of the accountType
        - name: typeids
          in: query
          type: integer
          description: comma separated list of typeids
        - name: active
          in: query
          type: integer
          description: get active or inactive accounts
          default: 1
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: name
          in: query
          type: string
          description: use \% as a wildcard
        - name: nearto
          in: query
          type: string
          description: >-
            will filter accounts based on proximty to supplied location
            {latitude, longitude}
        - name: distance
          in: query
          type: string
          description: >-
            determines the proximity treshold for the nearto filter, treshold is
            in kilometers
        - name: postal_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: visitingaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: deliveryaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: invoiceaddress_city
          in: query
          type: string
          description: use \% as a wildcard
        - name: phone
          in: query
          type: string
          description: use \% as a wildcard
        - name: cellphone
          in: query
          type: string
          description: use \% as a wildcard
        - name: vatno
          in: query
          type: string
          description: use \% as a wildcard
        - name: externalkey
          in: query
          type: string
        - name: followedby
          in: query
          type: integer
          description: id property of the user whose followed accounts are queried
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in name, alt_name, number,
            phone, cellphone, email, vatno, postal_street, postal_city,
            postal_zip, visitingaddress_careof, visitingaddress_street,
            visitingaddress_zip, visitingaddress_city, deliveryaddress_name,
            deliveryaddress_street, deliveryaddress_zip, deliveryaddress_city,
            invoiceaddress_name, invoiceaddress_street, invoiceaddress_zip,
            invoiceaddress_city
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - number_asc
            - number_desc
            - userid_asc
            - userid_desc
          collectionFormat: multi
      tags:
        - accounts
  /accounts/accountgroups/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: AccountGroup successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new accountgroup
      operationId: post_account_group_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/AccountGroup'
      tags:
        - accounts
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of accountgroups'
      summary: Returns a paginated list of accountgroups
      operationId: get_account_group_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: accountid
          in: query
          type: integer
          description: this property will filter all accountgroups by accountid
        - name: fulltext
          in: query
          type: string
          description: this property will be used in a search in name
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - accounts
  /accounts/accountgroups/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: AccountGroup successfully updated.
        '404':
          description: AccountGroup not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates an accountgroup
      description: Use this method to change root level properties of an accountgroup.
      operationId: put_account_group_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/AccountGroup'
      tags:
        - accounts
    delete:
      responses:
        '204':
          description: AccountGroup successfully inactivated.
        '404':
          description: AccountGroup not found.
      summary: Deletes an accountgroup
      operationId: delete_account_group_item
      tags:
        - accounts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/AccountGroup'
        '404':
          description: AccountGroup not found.
      summary: Returns an accountgroup
      operationId: get_account_group_item
      tags:
        - accounts
  /accounts/accounttypes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/AccountType'
      summary: DEPRECATED, Returns a list of accounttypes
      operationId: get_account_type_collection
      tags:
        - accounts
  /accounts/follow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Account successfully followed.
        '404':
          description: Account not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Follows an account
      operationId: post_account_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - accounts
  /accounts/unfollow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Account successfully unfollowed.
        '404':
          description: Account not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Unfollows an account
      operationId: post_account_un_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - accounts
  /accounts/{accountid}/budget/{year}/{month}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: accountid
        in: path
        required: true
        type: integer
      - name: year
        in: path
        required: true
        type: integer
      - name: month
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: User budget successfully updated.
        '402':
          description: Invalid arguments.
        '404':
          description: Account not found.
      operationId: put_budget_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateAccountBudget'
      tags:
        - accounts
    delete:
      responses:
        '204':
          description: User budget successfully deleted.
        '402':
          description: Invalid arguments.
        '404':
          description: Account not found.
      operationId: delete_budget_item
      tags:
        - accounts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/AccountBudget'
        '402':
          description: Invalid arguments.
        '404':
          description: Account not found.
      operationId: get_budget_item
      tags:
        - accounts
  /accounts/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Account successfully updated.
        '404':
          description: Account not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates an account
      description: Use this method to change root level properties of an account.
      operationId: put_account_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateAccount'
      tags:
        - accounts
    delete:
      responses:
        '204':
          description: Account successfully inactivated.
        '404':
          description: Account not found.
      summary: Deletes an account
      operationId: delete_account_item
      tags:
        - accounts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Account'
        '404':
          description: Account not found.
      summary: Returns an account
      operationId: get_account_item
      tags:
        - accounts
  /accounts/{target}/merge/{source}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: target
        in: path
        required: true
        type: integer
      - name: source
        in: path
        required: true
        type: integer
    post:
      responses:
        '204':
          description: Account successfully merged.
        '404':
          description: Account not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Merges two account
      operationId: post_account_merge_item
      tags:
        - accounts
  /activities/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Activity successfully created.
        '422':
          description: One or more data structure is invalid.
      summary: Creates a new activity
      operationId: post_activity_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Activity'
      tags:
        - activities
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of activities'
      summary: Returns a paginated list of activities
      operationId: get_activity_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: accountid
          in: query
          type: integer
          description: id property of the account with which the appointment takes place
        - name: accounttypeids
          in: query
          type: string
          description: Comma separated list of AccountType.id whose contacts are queried
        - name: accountuserids
          in: query
          type: string
          description: >-
            Comma separated list of User.id of the user responsible for the
            Accounts whose contacts are queried
        - name: date
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) for when the appointment takes place
        - name: startdate
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) start of a date range for appointments
        - name: enddate
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) end of a date range for appointments
        - name: closed
          in: query
          type: integer
          description: get open or closed appointments
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: userid
          in: query
          type: integer
          description: id property of the user owning the appointment
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: missionids
          in: query
          type: string
          description: comma separated list of missionids
        - name: typeid
          in: query
          type: integer
          description: id property of the AppointmentType
        - name: typeids
          in: query
          type: string
          description: comma separated list of typeids
        - name: contactid
          in: query
          type: integer
          description: id property of the contact with which the appointment takes place
        - name: opportunityid
          in: query
          type: integer
          description: id property of the opportunity to which the appointment belongs
        - name: location
          in: query
          type: string
          description: use \% as a wildcard
        - name: description
          in: query
          type: string
          description: use \% as a wildcard
        - name: progressionstateid
          in: query
          type: integer
          description: id propterty of the ProgressionState object
        - name: followedby
          in: query
          type: integer
          description: id property of the user whose followed activities are queried
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in description, date, result
            and location
        - name: sorting
          in: query
          type: string
          required: true
          default: date_desc
          enum:
            - date_asc
            - date_desc
            - account_asc
            - account_desc
            - userid_asc
            - userid_desc
          collectionFormat: multi
        - name: externalkey
          in: query
          type: string
      tags:
        - activities
  /activities/activitycoordinates/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of activitycoordinates'
      summary: Returns a paginated list of activity coordinates
      operationId: get_activity_coordinates_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}
          default: 10
        - name: accountid
          in: query
          type: integer
          description: id property of the account with which the appointment takes place
        - name: accounttypeids
          in: query
          type: string
          description: Comma separated list of AccountType.id whose contacts are queried
        - name: accountuserids
          in: query
          type: string
          description: >-
            Comma separated list of User.id of the user responsible for the
            Accounts whose contacts are queried
        - name: date
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) for when the appointment takes place
        - name: startdate
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) start of a date range for appointments
        - name: enddate
          in: query
          type: string
          description: date formatted(YYYY-MM-DD) end of a date range for appointments
        - name: closed
          in: query
          type: integer
          description: get open or closed appointments
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: userid
          in: query
          type: integer
          description: id property of the user owning the appointment
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: typeid
          in: query
          type: integer
          description: id property of the AppointmentType
        - name: typeids
          in: query
          type: string
          description: comma separated list of typeids
        - name: contactid
          in: query
          type: integer
          description: id property of the contact with which the appointment takes place
        - name: opportunityid
          in: query
          type: integer
          description: id property of the opportunity to which the appointment belongs
        - name: location
          in: query
          type: string
          description: use \% as a wildcard
        - name: description
          in: query
          type: string
          description: use \% as a wildcard
        - name: progressionstateid
          in: query
          type: integer
          description: id propterty of the ProgressionState object
        - name: followedby
          in: query
          type: integer
          description: id property of the user whose followed activities are queried
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in description, date, result
            and location
        - name: sorting
          in: query
          type: string
          required: true
          default: date_desc
          enum:
            - date_asc
            - date_desc
            - account_asc
            - account_desc
            - userid_asc
            - userid_desc
          collectionFormat: multi
      tags:
        - activities
  /activities/activitytypes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ActivityType'
      summary: Creates a new activitytype
      operationId: post_activity_type_collection
      tags:
        - activities
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ActivityType'
      summary: Returns a list of activitytypes
      operationId: get_activity_type_collection
      tags:
        - activities
  /activities/activitytypes/questions/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ActivityTypeQuestion'
      summary: Returns a list of activitytypequestions
      operationId: get_activity_type_question_collection
      tags:
        - activities
  /activities/activitytypes/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: ActivityType successfully updated.
        '404':
          description: ActivityType not found.
      summary: Updates an activitytype
      description: Use this method to change root level properties of an activity.
      operationId: put_activity_type_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateActivityType'
      tags:
        - activities
    delete:
      responses:
        '204':
          description: ActivityType successfully deleted.
        '404':
          description: ActivityType not found.
      summary: Deletes an activitytype
      operationId: delete_activity_type_item
      tags:
        - activities
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ActivityType'
        '404':
          description: ActivityType not found.
      summary: Returns an activitytype
      operationId: get_activity_type_item
      tags:
        - activities
  /activities/follow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Activity successfully followed.
        '404':
          description: Activity not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Follows an activity
      operationId: post_activity_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - activities
  /activities/progressionstates/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ProgressionState'
      summary: Returns a list of progressionstates for activities
      operationId: get_opportunity_progression_collection
      tags:
        - activities
  /activities/unfollow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Activity successfully unfollowed.
        '404':
          description: Activity not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Unfollows an activity
      operationId: post_activity_un_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - activities
  /activities/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Activity successfully updated.
        '404':
          description: Activity not found.
      summary: Updates an activity
      description: Use this method to change root level properties of an activity.
      operationId: put_activity_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateActivity'
      tags:
        - activities
    delete:
      responses:
        '204':
          description: Activity successfully deleted.
        '404':
          description: Activity not found.
      summary: Deletes an activity
      operationId: delete_activity_item
      tags:
        - activities
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Activity'
        '404':
          description: Activity not found.
      summary: Returns an activity
      operationId: get_activity_item
      tags:
        - activities
  /addons/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of addons'
      summary: Returns a paginated list of addons
      operationId: get_addon_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: internalname
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
            - title_asc
            - title_desc
            - internalname_asc
            - internalname_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      tags:
        - addons
  /addons/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Addon'
        '404':
          description: Addon not found.
      summary: Returns a addon
      operationId: get_addon_item
      tags:
        - addons
  /appserver/addresslookup/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/AddressLookup'
      operationId: post_address
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/AddressLookupRequest'
      tags:
        - appserver
  /appserver/bankid/sign/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '422':
          description: Abstract missing
        '501':
          description: Bankid integration not setup
      summary: Creates a new article
      operationId: post_com_hem_bankid_file_sign
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/BankIdSignRequest'
      deprecated: true
      tags:
        - appserver
  /appserver/bankid/sign/cancel/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '404':
          description: Bankid sign request not found
        '501':
          description: Bankid integration not setup
      summary: Cancels a signing request
      operationId: put_com_hem_bankid_cancel
      deprecated: true
      tags:
        - appserver
  /appserver/bankid/sign/collect/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '404':
          description: Bankid sign request not found
        '501':
          description: Bankid integration not setup
      summary: Checks status of a signing request
      operationId: get_com_hem_bankid_collect
      deprecated: true
      tags:
        - appserver
  /appserver/creditcheck/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/CreditCheck'
        '404':
          description: Person not found, blocked for credit or deceased
        '422':
          description: 'person_number not valid '
        '501':
          description: Credit check not setup
        '503':
          description: Credit check communication failed
      operationId: post_credit_check
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreditCheckRequest'
      tags:
        - appserver
  /appserver/phonebrands/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Brand'
      summary: Returns a list of phone brands
      operationId: get_com_hem_brands_collection
      tags:
        - appserver
  /appserver/phonemodels/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/VolumeGroup'
      summary: Returns a list of budgetgroups
      operationId: get_com_hem_models_collection
      parameters:
        - name: brandid
          in: query
          type: integer
          description: Filter models by brand
      tags:
        - appserver
  /appserver/phoneoptions/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Options'
      summary: Returns a list of budgetgroups
      operationId: get_com_hem_options_collection
      parameters:
        - name: modelid
          in: query
          type: integer
          description: Filter options by model
      tags:
        - appserver
  /appserver/phones/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Phone'
      summary: Returns a list of budgetgroups
      operationId: get_com_hem_phones_collection
      parameters:
        - name: modelid
          in: query
          type: integer
          required: true
          description: Filter phones
        - name: colourid
          in: query
          type: integer
          description: Filter phones
        - name: sizeid
          in: query
          type: integer
          description: Filter by size
      tags:
        - appserver
  /appserver/ping:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Ping recieved.
      summary: Performs an X-Token validation and extension
      operationId: get_ping
      tags:
        - appserver
  /articlegroups/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: ArticleGroup successfully created.
      summary: Creates a new articlegroup
      operationId: post_article_group_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/ArticleGroup'
      tags:
        - articlegroups
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of articleunits'
      summary: Returns a paginated list of articlegroups
      operationId: get_article_group_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: externalkey
          in: query
          type: string
        - name: name
          in: query
          type: string
          description: >-
            this property will match groups with a name that begins with the
            supplied text
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - id_asc
            - id_desc
            - sort_asc
            - sort_desc
          collectionFormat: multi
      tags:
        - articlegroups
  /articlegroups/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: ArticleGroup successfully updated.
        '404':
          description: ArticleGroup not found.
      summary: Updates an articlegroup
      description: Use this method to change root level properties of an articlegroup.
      operationId: put_article_group_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/ArticleGroup'
      tags:
        - articlegroups
    delete:
      responses:
        '204':
          description: ArticleGroup successfully deleted.
        '404':
          description: ArticleGroup not found.
      summary: Deletes an articlegroup
      operationId: delete_article_group_item
      tags:
        - articlegroups
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ArticleGroup'
        '404':
          description: ArticleGroup not found.
      summary: Returns a article
      operationId: get_article_group_item
      tags:
        - articlegroups
  /articles/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Article successfully created.
      summary: Creates a new article
      operationId: post_article_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateArticle'
      tags:
        - articles
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of articles'
      summary: Returns a paginated list of articles
      operationId: get_article_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: number
          in: query
          type: string
          description: query articles by number
        - name: groupid
          in: query
          type: string
          description: query articles by id property of the ArticleGroup
        - name: active
          in: query
          type: integer
          description: get active or inactive articles
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: supplierarticlenumber
          in: query
          type: string
          description: get active or inactive articles
        - name: warehousestatusid
          in: query
          type: integer
        - name: businessareaid'
          in: query
          type: integer
        - name: servicelevelid
          in: query
          type: integer
        - name: warehouseid
          in: query
          type: integer
        - name: unitid
          in: query
          type: integer
        - name: externalkey
          in: query
          type: string
        - name: brandid
          in: query
          type: integer
        - name: materialid
          in: query
          type: integer
        - name: volumegroupid
          in: query
          type: integer
        - name: discountgroupid
          in: query
          type: integer
        - name: budgetgroupid
          in: query
          type: integer
        - name: missionid
          in: query
          type: integer
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in title, description and
            result
        - name: sorting
          in: query
          type: string
          required: true
          default: number_asc
          enum:
            - name_asc
            - name_desc
            - number_asc
            - number_desc
            - suppliername_asc
            - suppliername_desc
            - supplierarticlenumber_asc
            - supplierarticlenumber_desc
            - externalkey_asc
            - externalkey_desc
            - sort_asc
            - sort_desc
          collectionFormat: multi
      tags:
        - articles
  /articles/brand/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Brand'
      summary: Returns a list of brands
      operationId: get_article_brand_collection
      tags:
        - articles
  /articles/budgetgroup/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/BudgetGroup'
      summary: Returns a list of budgetgroups
      operationId: get_article_budget_group_collection
      tags:
        - articles
  /articles/discountgroup/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/DiscountGroup'
      summary: Returns a list of discountgroups
      operationId: get_article_discount_group_collection
      tags:
        - articles
  /articles/group/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ArticleGroup'
      summary: DEPRECATED Returns a list of articlegroups
      operationId: get_article_group_list
      tags:
        - articles
  /articles/material/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Material'
      summary: Returns a list of materials
      operationId: get_article_material_collection
      tags:
        - articles
  /articles/servicelevel/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ServiceLevel'
      summary: Returns a list of servicelevels
      operationId: get_article_service_level_collection
      tags:
        - articles
  /articles/unit/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ArticleUnit'
      summary: Returns a list of articleunits
      operationId: get_article_unit_list
      tags:
        - articles
  /articles/volumegroup/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/VolumeGroup'
      summary: Returns a list of volumegroups
      operationId: get_article_volume_group_collection
      tags:
        - articles
  /articles/warehouse/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Warehouse'
      summary: Returns a list of warehouses
      operationId: get_article_warehouse_collection
      tags:
        - articles
  /articles/warehousestatus/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/WarehouseStatus'
      summary: Returns a list of warehousestatuses
      operationId: get_article_warehouse_status_collection
      tags:
        - articles
  /articles/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Article successfully updated.
        '404':
          description: Article not found.
      summary: Updates a article
      description: Use this method to change root level properties of a article.
      operationId: put_article_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateArticle'
      tags:
        - articles
    delete:
      responses:
        '204':
          description: Article successfully deleted.
        '404':
          description: Article not found.
      summary: Deletes a article
      operationId: delete_article_item
      tags:
        - articles
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Article'
        '404':
          description: Article not found.
      summary: Returns a article
      operationId: get_article_item
      tags:
        - articles
  /articleunits/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: ArticleUnit successfully created.
      summary: Creates a new article
      operationId: post_article_unit_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/ArticleUnit'
      tags:
        - articleunits
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of articleunits'
      summary: Returns a paginated list of articleunits
      operationId: get_article_unit_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: externalkey
          in: query
          type: string
        - name: name
          in: query
          type: string
          description: >-
            this property will match units with a name that begins with the
            supplied text
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - id_asc
            - id_desc
          collectionFormat: multi
      tags:
        - articleunits
  /articleunits/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: ArticleUnit successfully updated.
        '404':
          description: ArticleUnit not found.
      summary: Updates an articleunit
      description: Use this method to change root level properties of an articleunit.
      operationId: put_article_unit_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/ArticleUnit'
      tags:
        - articleunits
    delete:
      responses:
        '204':
          description: ArticleUnit successfully deleted.
        '404':
          description: ArticleUnit not found.
      summary: Deletes an articleunit
      operationId: delete_article_unit_item
      tags:
        - articleunits
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ArticleUnit'
        '404':
          description: ArticleUnit not found.
      summary: Returns a article
      operationId: get_article_unit_item
      tags:
        - articleunits
  /bankid/sign/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '422':
          description: Abstract missing
        '501':
          description: Bankid integration not setup
      summary: Initiates a signing request
      description: |-
        This API offers no support for animated QR codes, which will be
        mandatory for all signatures by 2024-05-01. New implementations
        must use Cirrus API Gateway instead.
      operationId: post_bankid_signature_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/BankIdSignRequest'
      tags:
        - bankid
  /bankid/sign/relations:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Relation successfully created
        '400':
          description: Invalid type
        '404':
          description: Bankid sign request not found
      summary: Connects a bankid signature to another entity
      operationId: post_bankid_signature_item_relations
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateBankIdSignRelation'
      tags:
        - bankid
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of bankid relations'
      summary: Lists the relations of a bankid signature
      operationId: get_bankid_signature_item_relations
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: type
          in: query
          type: string
          enum:
            - order
          collectionFormat: multi
        - name: otherid
          in: query
          type: integer
        - name: signatureid
          in: query
          type: integer
      tags:
        - bankid
  /bankid/sign/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '404':
          description: Bankid sign request not found
        '501':
          description: Bankid integration not setup
      summary: Updates or cancels a signing request
      operationId: put_bankid_signature_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/BankIdSignUpdate'
      tags:
        - bankid
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/BankIdSign'
        '404':
          description: Bankid sign request not found
        '501':
          description: Bankid integration not setup
      summary: Checks status of a signing request
      operationId: get_bankid_signature_item
      tags:
        - bankid
  /challenges/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Challenge'
        '201':
          description: Challenge successfully created.
      summary: Creates a new challenge
      operationId: post_challenge_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/NewChallenge'
      tags:
        - challenges
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of challenges'
      summary: Returns a paginated list of challenges
      operationId: get_challenge_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: challengerid
          in: query
          type: integer
          description: Userid of the user who issued the challenge
        - name: challengedid
          in: query
          type: integer
          description: userid of the challenged user
        - name: typeid
          in: query
          type: integer
        - name: winnerid
          in: query
          type: integer
          description: Userid of the user who won the challenge
        - name: status
          in: query
          type: string
          required: true
          default: pending
          enum:
            - pending
            - unanswered
            - ongoing
            - won
            - lost
            - all
            - closed
          collectionFormat: multi
        - name: datespan_start
          in: query
          type: string
          description: >-
            Start of date span formatted(YYYY-MM-DD) for filtering challenges
            that took place within this span
        - name: datespan_end
          in: query
          type: string
          description: >-
            End of date span formatted(YYYY-MM-DD) for filtering challenges that
            took place within this span
        - name: sorting
          in: query
          type: string
          required: true
          default: active_desc
          enum:
            - active_asc
            - active_desc
            - type_asc
            - type_desc
            - winner_asc
            - winner_desc
            - challenger_asc
            - challenger_desc
            - challenged_asc
            - challenged_desc
          collectionFormat: multi
      tags:
        - challenges
  /challenges/challengetypes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ChallengeType'
      summary: Returns a list of challengetypes
      operationId: get_challenge_type_collection
      tags:
        - challenges
  /challenges/userscore/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ChallengeScorePoints'
      summary: Returns a challenge object
      operationId: get_challenge_user_score
      tags:
        - challenges
  /challenges/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Challenge'
        '404':
          description: Challenge not found.
      summary: Returns a challenge object
      operationId: get_challenge_item
      tags:
        - challenges
  /challenges/{id}/accept:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ChallengeResponse'
      summary: Downloads the challenge contents
      operationId: put_challenge_accept
      tags:
        - challenges
  /challenges/{id}/deny:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ChallengeResponse'
      summary: Downloads the challenge contents
      operationId: put_challenge_deny
      tags:
        - challenges
  /contacts/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Contact successfully created.
      summary: Creates a new contact
      operationId: post_contact_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateContact'
      tags:
        - contacts
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of contacts'
      summary: Returns a paginated list of contacts
      operationId: get_contact_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: accountid
          in: query
          type: integer
          description: Contact.id with which the Contact takes place
        - name: accounttypeids
          in: query
          type: string
          description: Comma separated list of AccountType.id whose contacts are queried
        - name: accountuserids
          in: query
          type: string
          description: >-
            Comma separated list of User.id of the user responsible for the
            Accounts whose contacts are queried
        - name: active
          in: query
          type: integer
          description: get active or inactive contacts
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: cellphone
          in: query
          type: string
          description: use \% as a wildcard
        - name: city
          in: query
          type: string
          description: use \% as a wildcard
        - name: email
          in: query
          type: string
          description: use \% as a wildcard
        - name: externalkey
          in: query
          type: string
        - name: followedby
          in: query
          type: integer
          description: User.id whose followed accounts are queried
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in name, surname, email,
            officephone, cellphone, title, idnumber, street, city, zip
        - name: name
          in: query
          type: string
          description: use \% as a wildcard
        - name: officephone
          in: query
          type: string
          description: use \% as a wildcard
        - name: surname
          in: query
          type: string
          description: use \% as a wildcard
        - name: title
          in: query
          type: string
          description: use \% as a wildcard
        - name: primarycontact
          in: query
          type: integer
          description: get marked as primarycontact or not primarycontact contacts
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - surname_asc
            - surname_desc
            - email_asc
            - email_desc
            - primarycontact_asc
            - primarycontact_desc
          collectionFormat: multi
      tags:
        - contacts
  /contacts/follow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Contact successfully followed.
        '404':
          description: Contact not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Follows a contact
      operationId: post_contact_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - contacts
  /contacts/unfollow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Contact successfully unfollowed.
        '404':
          description: Contact not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Unfollows a contact
      operationId: post_contact_un_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - contacts
  /contacts/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Contact successfully updated.
        '404':
          description: Contact not found.
      summary: Updates a contact
      description: Use this method to change root level properties of a contact.
      operationId: put_contact_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateContact'
      tags:
        - contacts
    delete:
      responses:
        '204':
          description: Contact successfully deleted.
        '404':
          description: Contact not found.
      summary: Deletes a contact
      operationId: delete_contact_item
      tags:
        - contacts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Contact'
        '404':
          description: Contact not found.
      summary: Returns a contact
      operationId: get_contact_item
      tags:
        - contacts
  /contracts/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Contract successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new contract
      operationId: post_contract_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateContract'
      tags:
        - contracts
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of contracts'
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a paginated list of contracts
      operationId: get_contract_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: number
          in: query
          type: string
        - name: fulltext
          in: query
          type: string
        - name: contactids
          in: query
          type: string
          description: comma separated list of contactids
        - name: financeaccountids
          in: query
          type: string
          description: comma separated list of accountids
        - name: responsibleids
          in: query
          type: string
          description: comma separated list of userids
        - name: responsibleserviceids
          in: query
          type: string
          description: comma separated list of userids
        - name: typeids
          in: query
          type: string
          description: comma separated list of objectcategoryids
        - name: statusids
          in: query
          type: string
          description: comma separated list of objectcategoryids
        - name: objectids
          in: query
          type: string
          description: comma separated list of objectids
        - name: externalkey
          in: query
          type: string
      tags:
        - contracts
  /contracts/{contract_id}/objects:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: contract_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of contract-object links'
        '404':
          description: Contract not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_contract_object_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: location
          in: query
          type: string
      tags:
        - contracts
  /contracts/{contract_id}/objects/{object_id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: contract_id
        in: path
        required: true
        type: integer
      - name: object_id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Contract-object link successfully updated.
        '404':
          description: Contract, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: put_contract_object_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateContractObject'
      tags:
        - contracts
    delete:
      responses:
        '204':
          description: Contract-object link successfully deleted.
        '404':
          description: Contract, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: delete_contract_object_item
      tags:
        - contracts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ContractObject'
        '404':
          description: Contract, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_contract_object_item
      tags:
        - contracts
  /contracts/{contract_id}/reminder/{activity_id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: contract_id
        in: path
        required: true
        type: integer
      - name: activity_id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Contract reminder successfully updated.
        '404':
          description: Contract, or contract reminder not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: put_contract_reminder_item
      tags:
        - contracts
    delete:
      responses:
        '204':
          description: Contract reminder successfully deleted.
        '404':
          description: Contract, or contract reminder not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: delete_contract_reminder_item
      tags:
        - contracts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ContractReminder'
        '404':
          description: Contract, or contract reminder not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_contract_reminder_item
      tags:
        - contracts
  /contracts/{contract_id}/reminders:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: contract_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of contract reminders'
        '404':
          description: Reminder not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_contract_reminder_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
      tags:
        - contracts
  /contracts/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Contract successfully updated.
        '404':
          description: Contract not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates a contract
      operationId: put_contract_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateContract'
      tags:
        - contracts
    delete:
      responses:
        '204':
          description: Contract successfully deleted.
        '404':
          description: Contract not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Deletes a contract
      operationId: delete_contract_item
      tags:
        - contracts
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Contract'
        '404':
          description: Contract not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a contract
      operationId: get_contract_item
      tags:
        - contracts
  /deliveryterms/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: DeliveryTerm successfully created.
      summary: Creates a new deliveryterm
      operationId: post_delivery_term_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/DeliveryTerm'
      tags:
        - deliveryterms
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of deliveryterms'
      summary: Returns a paginated list of deliveryterms
      operationId: get_delivery_term_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: externalkey
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - id_asc
            - id_desc
          collectionFormat: multi
      tags:
        - deliveryterms
  /deliveryterms/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: DeliveryTerm successfully updated.
        '404':
          description: DeliveryTerm not found.
      summary: Updates an deliveryterm
      description: Use this method to change root level properties of an deliveryterm.
      operationId: put_delivery_term_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/DeliveryTerm'
      tags:
        - deliveryterms
    delete:
      responses:
        '204':
          description: DeliveryTerm successfully deleted.
        '404':
          description: DeliveryTerm not found.
      summary: Deletes an deliveryterm
      operationId: delete_delivery_term_item
      tags:
        - deliveryterms
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/DeliveryTerm'
        '404':
          description: DeliveryTerm not found.
      summary: Returns a article
      operationId: get_delivery_term_item
      tags:
        - deliveryterms
  /deliverytypes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: DeliveryType successfully created.
      summary: Creates a new deliverytype
      operationId: post_delivery_type_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/DeliveryType'
      tags:
        - deliverytypes
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of deliverytypes'
      summary: Returns a paginated list of deliverytypes
      operationId: get_delivery_type_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - id_asc
            - id_desc
          collectionFormat: multi
      tags:
        - deliverytypes
  /deliverytypes/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: DeliveryType successfully updated.
        '404':
          description: DeliveryType not found.
      summary: Updates an deliverytype
      description: Use this method to change root level properties of an deliverytype.
      operationId: put_delivery_type_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/DeliveryType'
      tags:
        - deliverytypes
    delete:
      responses:
        '204':
          description: DeliveryType successfully deleted.
        '404':
          description: DeliveryType not found.
      summary: Deletes an deliverytype
      operationId: delete_delivery_type_item
      tags:
        - deliverytypes
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/DeliveryType'
        '404':
          description: DeliveryType not found.
      summary: Returns a article
      operationId: get_delivery_type_item
      tags:
        - deliverytypes
  /dynamicfields/Definitions:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of field definitions'
      summary: Returns a paginated list of dynamic fields
      operationId: get_field_definition_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: groups
          in: query
          type: array
          description: >-
            comma separated list of groups [account, contact, order,
            opportunity, article]
          items:
            type: string
          collectionFormat: csv
        - name: typeid
          in: query
          type: integer
        - name: fieldname
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          required: true
          default: sorting_asc
          enum:
            - name_asc
            - name_desc
            - sorting_asc
            - sorting_desc
            - groupname_asc
            - groupname_desc
          collectionFormat: multi
      tags:
        - dynamicfields
  /dynamicfields/Definitions/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/FieldDefinition'
        '404':
          description: Field definition not found.
      operationId: get_field_definition_item
      tags:
        - dynamicfields
  /dynamicfields/ResourceData:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of dynamic field data'
      summary: Returns a paginated list of dynamic data for a given resource
      operationId: get_dynamic_data_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: resourcetype
          in: query
          type: string
          required: true
          enum:
            - account
            - contact
            - order
            - quote
            - opportunity
            - activity
            - article
          collectionFormat: multi
        - name: resourceid
          in: query
          type: integer
          required: true
        - name: fieldname
          in: query
          type: string
        - name: fieldids
          in: query
          type: array
          items:
            type: integer
          collectionFormat: csv
        - name: sorting
          in: query
          type: string
          required: true
          default: sorting_asc
          enum:
            - name_asc
            - name_desc
            - sorting_asc
            - sorting_desc
          collectionFormat: multi
      tags:
        - dynamicfields
  /dynamicfields/ResourceData/{fieldid}/{resourceid}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: fieldid
        in: path
        required: true
        type: integer
      - name: resourceid
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: DynamicDataValue successfully updated.
        '404':
          description: ResourceData not found.
      summary: Updates the value(s) of a dynamic data object for a given resource
      operationId: put_dynamic_data_value
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/DynamicDataValue'
      tags:
        - dynamicfields
  /emails/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of emails'
      summary: Returns a paginated list of emails
      operationId: get_email_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: accountid
          in: query
          type: integer
        - name: contactid
          in: query
          type: integer
        - name: date
          in: query
          type: string
          format: date-time
        - name: sorting
          in: query
          type: string
          required: true
          default: date_desc
          enum:
            - date_asc
            - date_desc
          collectionFormat: multi
      deprecated: true
      tags:
        - emails
  /emails/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    delete:
      responses:
        '204':
          description: Email successfully deleted.
        '404':
          description: Email not found.
      summary: Deletes an email
      operationId: delete_email_item
      deprecated: true
      tags:
        - emails
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Email'
        '404':
          description: Email not found.
      summary: Returns an email
      operationId: get_email_item
      deprecated: true
      tags:
        - emails
  /files/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: File successfully created.
        '413':
          description: File too large.
      summary: Creates a new file
      operationId: post_file_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateFile'
      tags:
        - files
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of files'
      summary: Returns a paginated list of files
      operationId: get_file_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: activityid
          in: query
          type: integer
        - name: articleid
          in: query
          type: integer
        - name: accountid
          in: query
          type: integer
        - name: contactid
          in: query
          type: integer
        - name: opportunityid
          in: query
          type: integer
        - name: quoteid
          in: query
          type: integer
        - name: orderid
          in: query
          type: integer
        - name: leadid
          in: query
          type: integer
        - name: projectid
          in: query
          type: integer
        - name: objectid
          in: query
          type: integer
        - name: userid
          in: query
          type: integer
        - name: missionid
          in: query
          type: integer
      tags:
        - files
  /files/folder:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of folders'
      summary: Returns a paginated list of folders
      operationId: get_folder_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: folderid
          in: query
          type: integer
        - name: accountid
          in: query
          type: integer
        - name: parentfolderid
          in: query
          type: integer
      tags:
        - files
  /files/folder/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Folder'
        '404':
          description: Folder not found.
      summary: Returns a folder
      operationId: get_folder_item
      tags:
        - files
  /files/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: File successfully updated.
        '404':
          description: File not found.
        '413':
          description: File too large.
      summary: Updates a file
      operationId: put_file_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateFile'
      tags:
        - files
    delete:
      responses:
        '204':
          description: File successfully deleted.
        '404':
          description: File not found.
      summary: Deletes a file
      operationId: delete_file_item
      tags:
        - files
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/File'
        '404':
          description: File not found.
      summary: Returns a file object
      operationId: get_file_item
      tags:
        - files
  /files/{id}/download:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: returns the byte stream of the file.
      summary: Downloads the file contents
      operationId: get_file_download
      produces:
        - application/octet-stream
      tags:
        - files
  /kpis/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of kpis'
      summary: Returns a paginated list of kpis
      operationId: get_kpi_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: userid
          in: query
          type: integer
          required: true
        - name: sorting
          in: query
          type: string
          required: true
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
          collectionFormat: multi
        - name: location
          in: query
          type: string
          required: true
          default: dashboard
          enum:
            - dashboard
            - all
          collectionFormat: multi
      tags:
        - kpis
  /leads/leadactivities/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: LeadActivity successfully created.
      summary: Creates a new leadactivity
      operationId: post_lead_activity_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/LeadActivity'
      tags:
        - leads
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of lead activities'
      summary: Returns a paginated list of leadactivities
      operationId: get_lead_activity_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: done
          in: query
          type: integer
          description: Filter Leads based on date of creation formatted(YYYY-MM-DD)
        - name: typeid
          in: query
          type: integer
        - name: leadid
          in: query
          type: integer
        - name: userid
          in: query
          type: integer
        - name: folowupdate
          in: query
          type: string
        - name: comment
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          required: true
          default: done_asc
          enum:
            - followupdate_asc
            - followupdate_desc
            - created_asc
            - created_desc
            - done_asc
            - done_desc
          collectionFormat: multi
      tags:
        - leads
  /leads/leadactivities/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: LeadActivity successfully updated.
        '404':
          description: LeadActivity not found.
      summary: Updates an leadactivity
      description: Use this method to change root level properties of an leadactivity.
      operationId: put_lead_activity_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/LeadActivity'
      tags:
        - leads
    delete:
      responses:
        '204':
          description: LeadActivity successfully deleted.
        '404':
          description: LeadActivity not found.
      summary: Deletes an leadactivity
      operationId: delete_lead_activity_item
      tags:
        - leads
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/LeadActivity'
        '404':
          description: LeadActivity not found.
      summary: Returns a article
      operationId: get_lead_activity_item
      tags:
        - leads
  /leads/leads/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Lead successfully created.
        '422':
          description: Filter is invalid
      summary: Creates a new lead
      operationId: post_lead_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateLead'
      tags:
        - leads
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of leads'
        '422':
          description: Filter is invalid
      summary: Returns a paginated list of leads
      operationId: get_lead_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: created
          in: query
          type: string
          description: Filter Leads based on date of creation formatted(YYYY-MM-DD)
        - name: status
          in: query
          type: integer
        - name: source
          in: query
          type: integer
        - name: rating
          in: query
          type: integer
        - name: fulltext
          in: query
          type: string
        - name: userid
          in: query
          type: integer
        - name: userids
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          required: true
          default: age_desc
          enum:
            - age_asc
            - age_desc
            - statusid_asc
            - statusid_desc
            - userid_asc
            - userid_desc
            - sourceid_asc
            - sourceid_desc
            - value_asc
            - value_desc
          collectionFormat: multi
      tags:
        - leads
  /leads/leads/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Lead successfully updated.
        '404':
          description: Lead not found.
      summary: Updates an lead
      description: Use this method to change root level properties of an lead.
      operationId: put_lead_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateLead'
      tags:
        - leads
    delete:
      responses:
        '204':
          description: Lead successfully deleted.
        '404':
          description: Lead not found.
      summary: Deletes an lead
      operationId: delete_lead_item
      tags:
        - leads
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Lead'
        '404':
          description: Lead not found.
      summary: Returns a lead
      operationId: get_lead_item
      tags:
        - leads
  /leadstatus/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: LeadStatus successfully created.
      summary: Creates a new leadstatus
      operationId: post_lead_status_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/LeadStatus'
      tags:
        - leadstatus
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of leadstatus'
      summary: Returns a paginated list of leadstatus
      operationId: get_lead_status_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: sortorder
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: sortorder_asc
          enum:
            - name_asc
            - name_desc
            - sortorder_asc
            - sortorder_desc
          collectionFormat: multi
      tags:
        - leadstatus
  /leadstatus/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: LeadStatus successfully updated.
        '404':
          description: LeadStatus not found.
      summary: Updates an leadstatus
      description: Use this method to change root level properties of an leadstatus.
      operationId: put_lead_status_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/LeadStatus'
      tags:
        - leadstatus
    delete:
      responses:
        '204':
          description: LeadStatus successfully deleted.
        '404':
          description: LeadStatus not found.
      summary: Deletes an leadstatus
      operationId: delete_lead_status_item
      tags:
        - leadstatus
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/LeadStatus'
        '404':
          description: LeadStatus not found.
      summary: Returns a leadstatus
      operationId: get_lead_status_item
      tags:
        - leadstatus
  /missions/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Mission successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new mission
      operationId: post_mission_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateMission'
      tags:
        - missions
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of missions'
      summary: Returns a paginated list of missions
      operationId: get_mission_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: active
          in: query
          type: integer
          description: get active or inactive missions
          default: 1
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: datespan_start
          in: query
          type: string
          format: date-time
        - name: datespan_end
          in: query
          type: string
          format: date-time
        - name: ownerid
          in: query
          type: integer
          description: id property of the user owning the mission
        - name: ownerids
          in: query
          type: string
          description: comma separated list of userids
        - name: typeid
          in: query
          type: integer
          description: id property of the mission type
        - name: sorting
          in: query
          type: string
          default: enddate_asc
          enum:
            - enddate_asc
            - enddate_desc
            - startdate_asc
            - startdate_desc
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
        - name: accountids
          in: query
          type: string
        - name: activityids
          in: query
          type: string
        - name: articleids
          in: query
          type: string
        - name: userids
          in: query
          type: string
        - name: orderids
          in: query
          type: string
      tags:
        - missions
  /missions/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Mission successfully updated.
        '404':
          description: Mission not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates an mission
      description: Use this method to change root level properties of an mission.
      operationId: put_mission_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateMission'
      tags:
        - missions
    delete:
      responses:
        '204':
          description: Mission successfully inactivated.
        '404':
          description: Mission not found.
      summary: Deletes an mission
      operationId: delete_mission_item
      tags:
        - missions
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Mission'
        '404':
          description: Mission not found.
      summary: Returns an mission
      operationId: get_mission_item
      tags:
        - missions
  /missions/{mission_id}/connections:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: mission_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of missions'
        '404':
          description: Mission or connection type not found.
      operationId: get_mission_connection_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: result
          in: query
          type: integer
      tags:
        - missions
  /missions/{mission_id}/connections/activity:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: mission_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of mission activity connections'
        '404':
          description: Mission not found.
      operationId: get_mission_activity_connection_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: result
          in: query
          type: integer
        - name: typeids
          in: query
          type: string
          description: comma separated list of activity type ids
        - name: userids
          in: query
          type: string
          description: comma separated list of user ids
        - name: start
          in: query
          type: string
          format: date-time
        - name: end
          in: query
          type: string
          format: date-time
        - name: sorting
          in: query
          type: string
          default: number_asc
          enum:
            - start_asc
            - start_desc
            - end_asc
            - end_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      tags:
        - missions
  /missions/{mission_id}/connections/{connection_type}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: mission_id
        in: path
        required: true
        type: integer
      - name: connection_type
        in: path
        required: true
        type: string
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of missions'
        '404':
          description: Mission or connection type not found.
      operationId: get_mission_connection_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: result
          in: query
          type: integer
      tags:
        - missions
  /missions/{mission_id}/connections/{connection_type}/{other_id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: mission_id
        in: path
        required: true
        type: integer
      - name: connection_type
        in: path
        required: true
        type: string
      - name: other_id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Mission connection successfully updated.
        '404':
          description: Mission, connection type, or connection not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: put_mission_connection_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/MissionConnection'
      tags:
        - missions
    delete:
      responses:
        '204':
          description: Mission connection successfully deleted.
        '404':
          description: Mission, connection type, or connection not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: delete_mission_connection_item
      tags:
        - missions
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/MissionConnection'
        '404':
          description: Mission, connection type, or connection not found.
      operationId: get_mission_connection_item
      tags:
        - missions
  /missions/{mission_id}/progress:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: mission_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of mission progress'
        '404':
          description: Mission not found
      operationId: get_mission_progress_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: accountids
          in: query
          type: string
          description: comma separated list of accountids
      tags:
        - missions
  /objects/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Object successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new object
      operationId: post_object_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateObject'
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of objects'
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a paginated list of objects
      operationId: get_object_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: serialnumber
          in: query
          type: string
        - name: fulltext
          in: query
          type: string
        - name: name
          in: query
          type: string
        - name: manufacturerids
          in: query
          type: string
          description: comma separated list of accountids
        - name: modelgroupids
          in: query
          type: string
          description: comma separated list of objectcategoryids
        - name: externalkey
          in: query
          type: string
      tags:
        - objects
  /objects/categories/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Object category successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new object category
      operationId: post_object_category_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateObjectCategory'
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of object categories'
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a paginated list of object categories
      operationId: get_object_category_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: type
          in: query
          type: string
          enum:
            - modelgroup
            - contracttype
            - contractstatus
          collectionFormat: multi
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          enum:
            - order_asc
            - order_desc
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - objects
  /objects/categories/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Object category successfully updated.
        '404':
          description: Object category not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates a object category
      operationId: put_object_category_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateObjectCategory'
      tags:
        - objects
    delete:
      responses:
        '204':
          description: Object category successfully deleted.
        '404':
          description: Object category not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Deletes a object category
      operationId: delete_object_category_item
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ObjectCategory'
        '404':
          description: Object category not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a object category
      operationId: get_object_category_item
      tags:
        - objects
  /objects/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Object successfully updated.
        '404':
          description: Object not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates a object
      operationId: put_object_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateObjet'
      tags:
        - objects
    delete:
      responses:
        '204':
          description: Object successfully deleted.
        '404':
          description: Object not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Deletes a object
      operationId: delete_object_item
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Object'
        '404':
          description: Object not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Returns a object
      operationId: get_object_item
      tags:
        - objects
  /objects/{object_id}/contracts:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: object_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of contract-object links'
        '404':
          description: Object not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_object_contract_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: location
          in: query
          type: string
      tags:
        - objects
  /objects/{object_id}/contracts/{contract_id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: object_id
        in: path
        required: true
        type: integer
      - name: contract_id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Contract-object link successfully updated.
        '404':
          description: Object, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: put_object_contract_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateContractObject'
      tags:
        - objects
    delete:
      responses:
        '204':
          description: Contract-object link successfully deleted.
        '404':
          description: Object, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: delete_object_contract_item
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ContractObject'
        '404':
          description: Object, or contract-object link not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_object_contract_item
      tags:
        - objects
  /objects/{object_id}/relations:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: object_id
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of object relations'
        '404':
          description: Object or relation type not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_object_relation_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
      tags:
        - objects
  /objects/{object_id}/relations/{relation_type}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: object_id
        in: path
        required: true
        type: integer
      - name: relation_type
        in: path
        required: true
        type: string
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of object relations'
        '404':
          description: Object or relation type not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_object_relation_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
      tags:
        - objects
  /objects/{object_id}/relations/{relation_type}/{other_id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: object_id
        in: path
        required: true
        type: integer
      - name: relation_type
        in: path
        required: true
        type: string
      - name: other_id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Object relation successfully updated.
        '404':
          description: Object, relation type, or relation not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: put_object_relation_item
      tags:
        - objects
    delete:
      responses:
        '204':
          description: Object relation successfully deleted.
        '404':
          description: Object, relation type, or relation not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: delete_object_relation_item
      tags:
        - objects
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/ObjectRelation'
        '404':
          description: Object, relation type, or relation not found.
        '422':
          description: Invalid parameters were supplied.
      operationId: get_object_relation_item
      tags:
        - objects
  /opportunities/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Opportunity successfully created.
      summary: Creates a new opportunity
      operationId: post_opportunity_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateOpportunity'
      tags:
        - opportunities
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of opportunities'
      summary: Returns a paginated list of opportunities
      operationId: get_opportunity_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: userid
          in: query
          type: integer
          description: id property of the Contact whith which the Contact takes place
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: accountid
          in: query
          type: integer
        - name: accounttypeids
          in: query
          type: string
          description: Comma separated list of AccountType.id whose contacts are queried
        - name: accountuserids
          in: query
          type: string
          description: >-
            Comma separated list of User.id of the user responsible for the
            Accounts whose contacts are queried
        - name: estimated_startdate
          in: query
          type: string
          description: >-
            Start of date span formatted(YYYY-MM-DD) for filtering via
            estimatedenddate
        - name: estimated_enddate
          in: query
          type: string
          description: >-
            End of date span formatted(YYYY-MM-DD) for filtering via
            estimatedenddate
        - name: actual_startdate
          in: query
          type: string
          description: >-
            Start of date span formatted(YYYY-MM-DD) for filtering via actual
            end date
        - name: actual_enddate
          in: query
          type: string
          description: >-
            End of date span formatted(YYYY-MM-DD) for filtering via actual end
            date
        - name: statusid
          in: query
          type: integer
          description: id propterty of the OpportunityStatus object
        - name: statusids
          in: query
          type: string
          description: comma separated list of statusids
        - name: estimateid
          in: query
          type: integer
          description: id propterty of the OpportunityEstimate object
        - name: estimateids
          in: query
          type: string
          description: comma separated list of estimateids
        - name: lostreasonid
          in: query
          type: integer
          description: id propterty of the OpportunityLost object
        - name: winreasonid
          in: query
          type: integer
          description: id propterty of the OpportunityWin object
        - name: contactid
          in: query
          type: integer
          description: id property of the contact with which the appointment takes place
        - name: typeid
          in: query
          type: integer
          description: id propterty of the OpportunityType object
        - name: closed
          in: query
          type: integer
          description: get open or closed opportunities
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: progressionstateid
          in: query
          type: integer
          description: id propterty of the ProgressionState object
        - name: description
          in: query
          type: string
          description: string to be matched against description
        - name: followedby
          in: query
          type: integer
          description: id property of the user whose followed accounts are queried
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in title, description and
            result
        - name: sorting
          in: query
          type: string
          required: true
          default: date_asc
          enum:
            - date_asc
            - date_desc
            - account_asc
            - account_desc
            - userid_asc
            - userid_desc
          collectionFormat: multi
      tags:
        - opportunities
  /opportunities/estimate/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunityEstimate'
      summary: Returns a list of opportunityestimates
      operationId: get_opportunity_estimate_collection
      tags:
        - opportunities
  /opportunities/follow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Opportunity successfully followed.
        '404':
          description: Opportunity not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Follows an opportunity
      operationId: post_opportunity_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - opportunities
  /opportunities/lostresult/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunityLost'
      summary: Returns a list of opportunitylostreasons
      operationId: get_opportunity_lost_result_collection
      tags:
        - opportunities
  /opportunities/progressionstates/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/ProgressionState'
      summary: Returns a list of progressionstates for opportunities
      operationId: get_opportunity_progression_state_collection
      tags:
        - opportunities
  /opportunities/source/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunitySource'
      summary: Returns a list of opportunitysources
      operationId: get_opportunity_source_collection
      tags:
        - opportunities
  /opportunities/status/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunityStatus'
      summary: Returns a list of opportunitystatuses
      operationId: get_opportunity_status_collection
      tags:
        - opportunities
  /opportunities/type/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunityType'
      summary: Returns a list of opportunitytypes
      operationId: get_opportunity_type_collection
      tags:
        - opportunities
  /opportunities/unfollow:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
    post:
      responses:
        '204':
          description: Opportunity successfully unfollowed.
        '404':
          description: Opportunity not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Unfollows an opportunity
      operationId: post_opportunity_un_follow
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Following'
      tags:
        - opportunities
  /opportunities/winresult/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/OpportunityWin'
      summary: Returns a list of opportunitywinreasons
      operationId: get_opportunity_win_result_collection
      tags:
        - opportunities
  /opportunities/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Opportunity successfully updated.
        '404':
          description: Opportunity not found.
      summary: Updates an opportunity
      description: Use this method to change root level properties of an opportunity.
      operationId: put_opportunity_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateOpportunity'
      tags:
        - opportunities
    delete:
      responses:
        '204':
          description: Opportunity successfully deleted.
        '404':
          description: Opportunity not found.
      summary: Deletes an opportunity
      operationId: delete_opportunity_item
      tags:
        - opportunities
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Opportunity'
        '404':
          description: Opportunity not found.
      summary: Returns an opportunity
      operationId: get_opportunity_item
      tags:
        - opportunities
  /orders/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Order successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new order
      operationId: post_order_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateOrder'
      tags:
        - orders
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of orders'
      summary: Returns a paginated list of orders
      operationId: get_order_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: number
          in: query
          type: string
        - name: altnumber
          in: query
          type: string
        - name: externalkey
          in: query
          type: string
        - name: accountids
          in: query
          type: string
        - name: statusids
          in: query
          type: string
        - name: opportunityid
          in: query
          type: integer
        - name: contactid
          in: query
          type: integer
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: missionids
          in: query
          type: string
          description: comma separated list of missionids
        - name: missionresult
          in: query
          type: integer
          description: only shows orders connected to missionid with result 1/0
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: datespan_start
          in: query
          type: string
          description: Start of date span formatted(YYYY-MM-DD)
        - name: datespan_end
          in: query
          type: string
          description: End of date span formatted(YYYY-MM-DD)
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in internal and external
            comments
        - name: typeids
          in: query
          type: string
          description: comma separated list of typeids
        - name: accountresponsibleids
          in: query
          type: string
          description: comma separated list of accountresponsibleids
        - name: accounttypeids
          in: query
          type: string
          description: comma separated list of accounttypeids
        - name: sorting
          in: query
          type: string
          required: true
          default: placedate_desc
          enum:
            - placedate_asc
            - placedate_desc
            - deliverydate_asc
            - deliverydate_desc
            - number_asc
            - number_desc
            - accountid_asc
            - accountid_desc
            - externalkey_asc
            - externalkey_desc
          collectionFormat: multi
      tags:
        - orders
  /orders/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Order successfully updated.
        '404':
          description: Order not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates an order
      description: Use this method to change root level properties of an order.
      operationId: put_order_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateOrder'
      tags:
        - orders
    delete:
      responses:
        '204':
          description: Order successfully inactivated.
        '404':
          description: Order not found.
      summary: Deletes an order
      operationId: delete_order_item
      tags:
        - orders
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Order'
        '404':
          description: Order not found.
      summary: Returns an order
      operationId: get_order_item
      tags:
        - orders
  /orderstatus/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: OrderStatus successfully created.
      summary: Creates a new orderstatus
      operationId: post_order_status_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/OrderStatus'
      tags:
        - orderstatus
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of orderstatus'
      summary: Returns a paginated list of orderstatus
      operationId: get_order_status_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: step
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - orderstatus
  /orderstatus/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: OrderStatus successfully updated.
        '404':
          description: OrderStatus not found.
      summary: Updates an orderstatus
      description: Use this method to change root level properties of an orderstatus.
      operationId: put_order_status_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/OrderStatus'
      tags:
        - orderstatus
    delete:
      responses:
        '204':
          description: OrderStatus successfully deleted.
        '404':
          description: OrderStatus not found.
      summary: Deletes an orderstatus
      operationId: delete_order_status_item
      tags:
        - orderstatus
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/OrderStatus'
        '404':
          description: OrderStatus not found.
      summary: Returns a orderstatus
      operationId: get_order_status_item
      tags:
        - orderstatus
  /ordertypes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: OrderType successfully created.
      summary: Creates a new ordertype
      operationId: post_order_type_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/OrderType'
      tags:
        - ordertypes
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of ordertypes'
      summary: Returns a paginated list of ordertypes
      operationId: get_order_type_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: sortorder
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: sortorder_asc
          enum:
            - name_asc
            - name_desc
            - sortorder_asc
            - sortorder_desc
          collectionFormat: multi
      tags:
        - ordertypes
  /ordertypes/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: OrderType successfully updated.
        '404':
          description: OrderType not found.
      summary: Updates an ordertype
      description: Use this method to change root level properties of an ordertype.
      operationId: put_order_type_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/OrderType'
      tags:
        - ordertypes
    delete:
      responses:
        '204':
          description: OrderType successfully deleted.
        '404':
          description: OrderType not found.
      summary: Deletes an ordertype
      operationId: delete_order_type_item
      tags:
        - ordertypes
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/OrderType'
        '404':
          description: OrderType not found.
      summary: Returns a article
      operationId: get_order_type_item
      tags:
        - ordertypes
  /paymentterms/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: PaymentTerm successfully created.
      summary: Creates a new paymentterm
      operationId: post_payment_term_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PaymentTerm'
      tags:
        - paymentterms
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of paymentterms'
      summary: Returns a paginated list of paymentterms
      operationId: get_payment_term_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: default
          in: query
          type: integer
        - name: externalkey
          in: query
          type: string
        - name: days
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - days_asc
            - days_desc
          collectionFormat: multi
      tags:
        - paymentterms
  /paymentterms/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: PaymentTerm successfully updated.
        '404':
          description: PaymentTerm not found.
      summary: Updates an paymentterm
      description: Use this method to change root level properties of an paymentterm.
      operationId: put_payment_term_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PaymentTerm'
      tags:
        - paymentterms
    delete:
      responses:
        '204':
          description: PaymentTerm successfully deleted.
        '404':
          description: PaymentTerm not found.
      summary: Deletes an paymentterm
      operationId: delete_payment_term_item
      tags:
        - paymentterms
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/PaymentTerm'
        '404':
          description: PaymentTerm not found.
      summary: Returns a article
      operationId: get_payment_term_item
      tags:
        - paymentterms
  /pricelists/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: PriceList successfully created.
      summary: Creates a new pricelist
      operationId: post_price_list_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PriceList'
      tags:
        - pricelists
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of pricelists'
      summary: Returns a paginated list of pricelists
      operationId: get_price_list_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: active
          in: query
          type: integer
        - name: start
          in: query
          type: string
          description: Start of date span formatted(YYYY-MM-DD)
        - name: stop
          in: query
          type: string
          description: End of date span formatted(YYYY-MM-DD)
        - name: default
          in: query
          type: integer
        - name: accountid
          in: query
          type: integer
        - name: accountnumber
          in: query
          type: string
        - name: externalkey
          in: query
          type: string
        - name: strict
          in: query
          type: integer
        - name: currencyid
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: start_asc
          enum:
            - name_asc
            - name_desc
            - start_asc
            - start_desc
            - active_asc
            - active_desc
          collectionFormat: multi
      tags:
        - pricelists
  /pricelists/pricegroups/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: ArticlePriceGroup successfully created.
      summary: Creates a new pricegroup
      operationId: post_article_price_group_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PriceGroup'
      tags:
        - pricelists
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of price groups'
      summary: Returns a paginated list of pricegroups
      operationId: get_article_price_group_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: unitid
          in: query
          type: integer
        - name: quantity
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: quantity_asc
          enum:
            - unitid_asc
            - unitid_desc
            - quantity_asc
            - quantity_desc
          collectionFormat: multi
      tags:
        - pricelists
  /pricelists/pricegroups/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: ArticlePriceGroup successfully updated.
        '404':
          description: ArticlePriceGroup not found.
      summary: Updates an pricegroup
      description: Use this method to change root level properties of an pricegroup.
      operationId: put_article_price_group_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PriceGroup'
      tags:
        - pricelists
    delete:
      responses:
        '204':
          description: ArticlePriceGroup successfully deleted.
        '404':
          description: ArticlePriceGroup not found.
      summary: Deletes an pricegroup
      operationId: delete_article_price_group_item
      tags:
        - pricelists
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/PriceGroup'
        '404':
          description: ArticlePriceGroup not found.
      summary: Returns a pricegroup
      operationId: get_article_price_group_item
      tags:
        - pricelists
  /pricelists/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: PriceList successfully updated.
        '404':
          description: PriceList not found.
      summary: Updates an pricelist
      description: Use this method to change root level properties of an pricelist.
      operationId: put_price_list_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/PriceList'
      tags:
        - pricelists
    delete:
      responses:
        '204':
          description: PriceList successfully deleted.
        '404':
          description: PriceList not found.
      summary: Deletes an pricelist
      operationId: delete_price_list_item
      tags:
        - pricelists
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/PriceList'
        '404':
          description: PriceList not found.
      summary: Returns a pricelist
      operationId: get_price_list_item
      tags:
        - pricelists
  /projects/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of projects'
      summary: Returns a paginated list of projects
      operationId: get_project_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: accountid
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      tags:
        - projects
  /quotes/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Quote successfully created.
        '422':
          description: Invalid parameters were supplied.
      summary: Creates a new quote
      operationId: post_quote_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateQuote'
      tags:
        - quotes
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of quotes'
      summary: Returns a paginated list of quotes
      operationId: get_quote_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: dynamicfield_id
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_id must be paired
            with a dynamicfield_val parameter in order to filter
          items:
            type: integer
          collectionFormat: multi
        - name: dynamicfield_val
          in: query
          type: array
          description: >-
            Query by dynamicfield value. Each dynamicfield_val must be paired
            with a dynamicfield_id parameter in order to filter
          items:
            type: string
          collectionFormat: multi
        - name: externalkey
          in: query
          type: string
        - name: altnumber
          in: query
          type: string
        - name: accountids
          in: query
          type: string
          description: comma separated list of accountids
        - name: statusids
          in: query
          type: string
          description: comma separated list of statusids
        - name: contactids
          in: query
          type: string
          description: comma separated list of contactids
        - name: opportunityids
          in: query
          type: string
          description: comma separated list of opportunityids
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: user2ids
          in: query
          type: string
          description: comma separated list of userids
        - name: orderids
          in: query
          type: string
          description: comma separated list of orderids
        - name: activityids
          in: query
          type: string
          description: comma separated list of activityids
        - name: placedate_start
          in: query
          type: string
          description: Start of date span formatted(YYYY-MM-DD)
        - name: placedate_end
          in: query
          type: string
          description: End of date span formatted(YYYY-MM-DD)
        - name: validtodate_start
          in: query
          type: string
          description: Start of date span formatted(YYYY-MM-DD)
        - name: validtodate_end
          in: query
          type: string
          description: End of date span formatted(YYYY-MM-DD)
        - name: deliverydate_start
          in: query
          type: string
          description: Start of date span formatted(YYYY-MM-DD)
        - name: deliverydate_end
          in: query
          type: string
          description: End of date span formatted(YYYY-MM-DD)
        - name: fulltext
          in: query
          type: string
          description: >-
            this property will be used in a search in internal and external
            comments
        - name: sorting
          in: query
          type: string
          required: true
          default: placedate_desc
          enum:
            - placedate_asc
            - placedate_desc
            - validtodate_asc
            - validtodate_desc
            - deliverydate_asc
            - deliverydate_desc
            - number_asc
            - number_desc
            - externalkey_asc
            - externalkey_desc
          collectionFormat: multi
      tags:
        - quotes
  /quotes/relations:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Relation successfully created
        '400':
          description: Invalid type
        '404':
          description: Quote not found
      summary: Connects a quote relation to another entity
      operationId: post_quote_relations
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateQuoteRelation'
      tags:
        - quotes
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of quote relations'
      summary: Lists the relations of a quote
      operationId: get_quote_relations
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: type
          in: query
          type: string
          enum:
            - account
            - opportunity
            - contact
            - user
            - user2
            - order
          collectionFormat: multi
        - name: otherid
          in: query
          type: integer
        - name: quoteid
          in: query
          type: integer
        - name: value
          in: query
          type: string
      tags:
        - quotes
  /quotes/statuses:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Quote Status successfully created
        '400':
          description: Invalid metatype
        '404':
          description: Quote Status not found
      summary: Connects a quote relation to another entity
      operationId: post_quote_status_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateQuoteStatus'
      tags:
        - quotes
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of quote statuses'
      summary: Lists the statuses a quote can have
      operationId: get_quote_status_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: metatype
          in: query
          type: string
          enum:
            - active
            - expired
            - denied
            - order
          collectionFormat: multi
        - name: default
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: sorting_asc
          enum:
            - sorting_asc
            - sorting_desc
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      tags:
        - quotes
  /quotes/statuses/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Quote status successfully updated.
        '404':
          description: Quote status not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates a quote status
      operationId: put_quote_status_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateQuoteStatus'
      tags:
        - quotes
    delete:
      responses:
        '204':
          description: Quote status successfully deleted.
        '403':
          description: Quote status is in use and cannot be deleted.
        '404':
          description: Quote status not found.
      summary: Deletes a quote
      operationId: delete_quote_status_item
      tags:
        - quotes
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/QuoteStatus'
        '404':
          description: Quote status not found.
      summary: Returns a quote status
      operationId: get_quote_status_item
      tags:
        - quotes
  /quotes/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Quote successfully updated.
        '404':
          description: Quote not found.
        '422':
          description: Invalid parameters were supplied.
      summary: Updates a quote
      description: Use this method to change root level properties of a quote.
      operationId: put_quote_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateQuote'
      tags:
        - quotes
    delete:
      responses:
        '204':
          description: Quote successfully inactivated.
        '404':
          description: Quote not found.
      summary: Deletes a quote
      operationId: delete_quote_item
      tags:
        - quotes
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Quote'
        '404':
          description: Quote not found.
      summary: Returns a quote
      operationId: get_quote_item
      tags:
        - quotes
  /security/authenticate:
    post:
      responses:
        '302':
          description: Authentication successful
        '401':
          description: Unauthorized
        '422':
          description: Invalid parameters
      summary: Authenticates a set of credentials
      operationId: post_authentication_request
      parameters:
        - name: Key
          in: formData
          type: string
        - name: AppId
          in: formData
          type: string
      consumes:
        - application/x-www-form-urlencoded
        - multipart/form-data
      tags:
        - security
  /settings/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    put:
      responses:
        '204':
          description: Settings successfully updated.
      summary: Updates settings
      operationId: put_settings_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Settings'
      tags:
        - settings
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Settings'
      summary: Returns settings
      operationId: get_settings_item
      tags:
        - settings
  /sortgroups/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Sortgroup successfully created.
        '400':
          description: Invalid sortgroup type.
      summary: Creates a new SortGroup
      operationId: post_sort_group_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateSortGroup'
      tags:
        - sortgroups
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of sortgroups'
      summary: Returns a paginated list of tags
      operationId: get_sort_group_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: sort
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - sortgroups
  /sortgroups/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Sortgroup successfully updated.
        '404':
          description: Sortgroup not found.
      summary: Updates a Sortgroup
      description: Use this method to change root level properties of a sorgroup.
      operationId: put_sort_group_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateSortGroup'
      tags:
        - sortgroups
    delete:
      responses:
        '204':
          description: Sortgroup successfully deleted.
        '404':
          description: Sortgroup not found.
      summary: Deletes a sortgroup
      operationId: delete_sort_group_item
      tags:
        - sortgroups
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/SortGroup'
        '404':
          description: Sortgroup not found.
      summary: Returns a sortgroup
      operationId: get_sort_group_item
      tags:
        - sortgroups
  /subscriptions/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Subscription successfully created.
      summary: Creates a new subscription
      description: 'TODO: do it properly'
      operationId: post_sort_group_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateSubscription'
      tags:
        - subscriptions
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of subscriptions'
      summary: Returns a paginated list of subscriptions
      description: TODO.
      operationId: get_sort_group_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: sort
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - subscriptions
  /subscriptions/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Subscription successfully updated.
        '404':
          description: Subscription not found.
      summary: Updates a subscription TODO
      operationId: put_sort_group_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateSubscription'
      tags:
        - subscriptions
    delete:
      responses:
        '204':
          description: Subscription successfully deleted.
        '404':
          description: Subscription not found.
      summary: Deletes a subscription
      description: TODO.
      operationId: delete_sort_group_item
      tags:
        - subscriptions
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/SortGroup'
        '404':
          description: Subscription not found.
      summary: Returns a subscription
      description: TODO.
      operationId: get_sort_group_item
      tags:
        - subscriptions
  /tags/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Tag successfully created.
        '400':
          description: Invalid tag type.
      summary: Creates a new Tag
      operationId: post_tag_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateTag'
      tags:
        - tags
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of tags'
      summary: Returns a paginated list of tags
      operationId: get_tag_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: fulltext
          in: query
          type: string
        - name: type
          in: query
          type: string
          enum:
            - company
            - contact
            - opportunity
            - project
            - lead
            - order
            - quote
            - article
            - orderrow
            - quoterow
            - activity
            - object
            - user
            - template
          collectionFormat: multi
        - name: sorting
          in: query
          type: string
          default: number_asc
          enum:
            - number_asc
            - number_desc
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - tags
  /tags/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Tag successfully updated.
        '404':
          description: Tag not found.
      summary: Updates a tag
      description: Use this method to change root level properties of a tag.
      operationId: put_tag_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateTag'
      tags:
        - tags
    delete:
      responses:
        '204':
          description: Tag successfully deleted.
        '404':
          description: Tag not found.
      summary: Deletes a tag
      operationId: delete_tag_item
      tags:
        - tags
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Tag'
        '404':
          description: Tag not found.
      summary: Returns a tag
      operationId: get_tag_item
      tags:
        - tags
  /templates/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Template successfully created.
      summary: Creates a new template
      operationId: post_template_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateTemplate'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of templates'
      summary: Returns a paginated list of templates
      operationId: get_template_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: active
          in: query
          type: integer
          description: get active or inactive templates
          enum:
            - 0
            - 1
          collectionFormat: multi
        - name: resource
          in: query
          type: string
          enum:
            - order
            - quote
          collectionFormat: multi
        - name: languageids
          in: query
          type: string
          description: >-
            Only list templates with languages in this comma separated list of
            ids
        - name: categoryids
          in: query
          type: string
          description: >-
            Only list templates with categories in this comma separated list of
            ids
        - name: sorting
          in: query
          type: string
          default: number_asc
          enum:
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      deprecated: true
      tags:
        - templates
  /templates/categories:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: TemplateCategory successfully created.
      summary: Creates a new template category
      operationId: post_template_category_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateTemplateCategory'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of template categories'
      summary: Returns a paginated list of template categories
      operationId: get_template_category_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      deprecated: true
      tags:
        - templates
  /templates/categories/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: TemplateCategory successfully updated.
        '404':
          description: TemplateCategory not found.
      operationId: put_template_category_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateTemplateCategory'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/TemplateCategory'
        '404':
          description: TemplateCategory not found.
      summary: Returns a template category
      operationId: get_template_category_item
      deprecated: true
      tags:
        - templates
  /templates/languages:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: TemplateLanguage successfully created.
      summary: Creates a new template language
      operationId: post_template_language_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/CreateTemplateLanguage'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of template langages'
      summary: Returns a paginated list of template languages
      operationId: get_template_language_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: name
          in: query
          type: string
        - name: sorting
          in: query
          type: string
          default: sort_asc
          enum:
            - sort_asc
            - sort_desc
            - name_asc
            - name_desc
            - number_asc
            - number_desc
          collectionFormat: multi
      deprecated: true
      tags:
        - templates
  /templates/languages/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: TemplateLanguage successfully updated.
        '404':
          description: TemplateLanguage not found.
      operationId: put_template_language_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateTemplateLanguage'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/TemplateLanguage'
        '404':
          description: TemplateLanguage not found.
      summary: Returns a template language
      operationId: get_template_language_item
      deprecated: true
      tags:
        - templates
  /templates/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Template successfully updated.
        '404':
          description: Template not found.
      operationId: put_template_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateTemplate'
      deprecated: true
      tags:
        - templates
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Template'
        '404':
          description: Template not found.
      summary: Returns a template
      operationId: get_template_item
      deprecated: true
      tags:
        - templates
  /users/:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: User successfully created.
      summary: Creates a new user
      operationId: post_user_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/User'
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of users'
      summary: Returns a paginated list of users
      operationId: get_user_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: active
          in: query
          type: integer
        - name: code
          in: query
          type: string
          description: Filter users matching the external system code
        - name: fulltext
          in: query
          type: string
          description: this property will be used in a search in name, surname, and email
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - active_asc
            - active_desc
            - surname_asc
            - surname_desc
          collectionFormat: multi
      tags:
        - users
  /users/budget:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of budgets'
        '402':
          description: Invalid arguments.
        '404':
          description: User not found.
      operationId: get_budget_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: year_from
          in: query
          type: integer
        - name: month_from
          in: query
          type: integer
        - name: year_to
          in: query
          type: integer
        - name: month_to
          in: query
          type: integer
      tags:
        - users
  /users/departments:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Department successfully created.
      summary: Creates a new department
      operationId: post_department_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Department'
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of departments'
      summary: Returns a paginated list of departments
      operationId: get_department_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: parentid
          in: query
          type: integer
        - name: managerid
          in: query
          type: integer
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
          collectionFormat: multi
      tags:
        - users
  /users/departments/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: Department successfully updated.
        '404':
          description: Department not found.
      summary: Updates a department
      operationId: put_user_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Department'
      tags:
        - users
    delete:
      responses:
        '204':
          description: Department successfully deleted.
        '404':
          description: Department not found.
      summary: Deletes a department
      operationId: delete_user_item
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/Department'
        '404':
          description: Department not found.
      summary: Returns a department
      operationId: get_user_item
      tags:
        - users
  /users/myuser:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    put:
      responses:
        '204':
          description: User successfully updated.
        '404':
          description: User not found.
      summary: Updates a user
      operationId: put_my_user_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/MyUser'
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/MyUser'
        '404':
          description: User not found.
      summary: Returns a user
      operationId: get_my_user_item
      tags:
        - users
  /users/roles:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
    post:
      responses:
        '201':
          description: Role successfully created.
      summary: Creates a new role
      operationId: post_role_collection
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/Role'
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of roles'
      summary: Returns a paginated list of roles
      operationId: get_role_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: sorting
          in: query
          type: string
          required: true
          default: name_asc
          enum:
            - name_asc
            - name_desc
            - id_asc
            - id_desc
          collectionFormat: multi
      tags:
        - users
  /users/{id}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: id
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: User successfully updated.
        '404':
          description: User not found.
      summary: Updates a user
      operationId: put_user_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateUser'
      tags:
        - users
    delete:
      responses:
        '204':
          description: User successfully deleted.
        '404':
          description: User not found.
      summary: Deletes a user
      operationId: delete_user_item
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/User'
        '404':
          description: User not found.
      summary: Returns a user
      operationId: get_user_item
      tags:
        - users
  /users/{userid}/budget:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: userid
        in: path
        required: true
        type: integer
    get:
      responses:
        '200':
          description: Success
          schema:
            type: array
            items:
              $ref: '#/definitions/Page of budgets'
        '402':
          description: Invalid arguments.
        '404':
          description: User not found.
      operationId: get_budget_collection
      parameters:
        - name: page
          in: query
          type: integer
          description: Page number
          default: 1
        - name: per_page
          in: query
          type: integer
          description: Results per page {error_msg}, max pagesize is 50
          default: 10
        - name: userids
          in: query
          type: string
          description: comma separated list of userids
        - name: year_from
          in: query
          type: integer
        - name: month_from
          in: query
          type: integer
        - name: year_to
          in: query
          type: integer
        - name: month_to
          in: query
          type: integer
      tags:
        - users
  /users/{userid}/budget/{year}/{month}:
    parameters:
      - name: X-Token
        in: header
        type: string
        description: X-Token can not be blank unless using a Bearer token from new auth
      - name: X-Fields
        in: header
        type: string
        description: >-
          Mask which fields to include in the response '{id,name,description,
          etc}'
      - name: userid
        in: path
        required: true
        type: integer
      - name: year
        in: path
        required: true
        type: integer
      - name: month
        in: path
        required: true
        type: integer
    put:
      responses:
        '204':
          description: User budget successfully updated.
        '402':
          description: Invalid arguments.
        '404':
          description: User not found.
      operationId: put_budget_item
      parameters:
        - name: payload
          required: true
          in: body
          schema:
            $ref: '#/definitions/UpdateUserBudget'
      tags:
        - users
    delete:
      responses:
        '204':
          description: User budget successfully deleted.
        '402':
          description: Invalid arguments.
        '404':
          description: User not found.
      operationId: delete_budget_item
      tags:
        - users
    get:
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/UserBudget'
        '402':
          description: Invalid arguments.
        '404':
          description: User not found.
      operationId: get_budget_item
      tags:
        - users
info:
  title: RESTful API for Cirrus 2
  version: 0.3.73
  description: An open RESTful API for Cirrus 2 integration
produces:
  - application/json
consumes:
  - application/json
securityDefinitions:
  OAuth2:
    type: oauth2
    description: Cirrus Auth Service
    flow: password
    authorizationUrl: https://account.cirruscrm.io/oauth/authorize
    tokenUrl: https://account.cirruscrm.io/oauth/token
    scopes: []
  X-Token:
    type: apiKey
    description: API token from /security/authenticate
    in: header
    name: X-Token
security:
  - OAuth2: []
  - X-Token: []
tags:
  - name: accounts
    description: Operations related to accounts
  - name: activities
    description: Operations related to activities
  - name: articlegroups
    description: Operations related to articlegroups
  - name: articles
    description: Operations related to articles
  - name: articleunits
    description: Operations related to articleunits
  - name: contacts
    description: Operations related to contacts
  - name: deliveryterms
    description: Operations related to deliveryterms
  - name: deliverytypes
    description: Operations related to deliverytypes
  - name: dynamicfields
    description: Operations related to dynamic field definitions
  - name: files
    description: Operations related to files
  - name: challenges
    description: Operations related to challenges
  - name: leads
    description: Operations related to leads
  - name: opportunities
    description: Operations related to opportunities
  - name: orders
    description: Operations related to orders
  - name: ordertypes
    description: Operations related to ordertypes
  - name: paymentterms
    description: Operations related to paymentterms
  - name: pricelists
    description: Operations related to pricelists
  - name: security
    description: Operations related to security
  - name: appserver
    description: Cirrus Appserver
  - name: users
    description: Operations related to users
  - name: kpis
    description: Operations related to kpi
  - name: orderstatus
    description: Operations related to orderstatus
  - name: missions
    description: Operations related to missions
  - name: contracts
    description: Operations related to contracts
  - name: objects
    description: Operations related to objects
  - name: settings
    description: Operations related to settings
  - name: addons
    description: Operations related to addons
  - name: tags
    description: Operations related to tags
  - name: bankid
    description: Cirrus BankID integration
  - name: quotes
    description: Operations related to quotes
  - name: emails
    description: Operations related to emails
  - name: sortgroups
    description: Operations related to sortgroups
  - name: templates
    description: Operations related to templates
  - name: subscriptions
    description: Operations related to subscriptions
  - name: projects
    description: Operations related to projects
  - name: leadstatus
    description: Operations related to leadstatus
definitions:
  CreateAccount:
    required:
      - name
      - typeid
      - userid
    properties:
      name:
        type: string
        description: This field can not be empty.
      alt_name:
        type: string
        description: ''
      typeid:
        type: integer
        description: ''
      number:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
      alternateuserid:
        type: integer
        description: ''
      phone:
        type: string
        description: ''
      cellphone:
        type: string
        description: ''
      fax:
        type: string
        description: ''
      email:
        type: string
        description: ''
      url:
        type: string
        description: ''
      vatno:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      info:
        type: string
        description: ''
      socialmedia_fb:
        type: string
        description: ''
      socialmedia_tw:
        type: string
        description: ''
      socialmedia_li:
        type: string
        description: ''
      uservisitintervalweeks:
        type: integer
        description: ''
      alternateuservisitintervalweeks:
        type: integer
        description: ''
      parentaccountid:
        type: integer
        description: ''
      addresses:
        $ref: '#/definitions/Addresses'
      accountgroups:
        type: array
        items:
          $ref: '#/definitions/AccountGroup'
      externalkey:
        type: string
        description: ''
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Addresses:
    properties:
      visiting:
        $ref: '#/definitions/Address'
      delivery:
        $ref: '#/definitions/Address'
      invoice:
        $ref: '#/definitions/Address'
      postal:
        $ref: '#/definitions/Address'
    type: object
  Address:
    properties:
      careof:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      name:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      street:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      zip:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      city:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      country:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      email:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      coordinates:
        $ref: '#/definitions/Coordinates'
      number:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      letter:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  Coordinates:
    properties:
      latitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      longitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      distance:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  AccountGroup:
    required:
      - name
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  IdObject:
    required:
      - id
    properties:
      id:
        type: integer
    type: object
  Page of accounts:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Account'
        type: object
  A page of results:
    properties:
      page:
        type: integer
        description: Number of this page of results
      pages:
        type: integer
        description: Total number of pages of results
      per_page:
        type: integer
        description: Number of items per page of results
      total:
        type: integer
        description: Total number of results
    type: object
  Account:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      alt_name:
        type: string
        description: ''
      number:
        type: string
        description: ''
      phone:
        type: string
        description: ''
      cellphone:
        type: string
        description: ''
      fax:
        type: string
        description: ''
      email:
        type: string
        description: ''
      url:
        type: string
        description: ''
      vatno:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      info:
        type: string
        description: ''
      socialmedia_fb:
        type: string
        description: ''
      socialmedia_tw:
        type: string
        description: ''
      socialmedia_li:
        type: string
        description: ''
      department:
        type: string
        description: ''
      externalkey:
        type: string
        description: ''
      uservisitintervalweeks:
        type: integer
        description: ''
      alternateuservisitintervalweeks:
        type: integer
        description: ''
      addresses:
        $ref: '#/definitions/Addresses'
      files:
        type: array
        items:
          $ref: '#/definitions/ListedFile'
      type:
        $ref: '#/definitions/ListedAccountType'
      user:
        $ref: '#/definitions/ListedUser'
      parentaccount:
        $ref: '#/definitions/ListedAccount'
      contacts:
        type: array
        items:
          $ref: '#/definitions/AccountContact'
      followers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      accountgroups:
        type: array
        items:
          $ref: '#/definitions/AccountGroup'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
      alternateuserid:
        type: string
        description: ''
      alternateuser:
        $ref: '#/definitions/ListedUser'
    type: object
  ListedFile:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  ListedAccountType:
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  ListedUser:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      surname:
        type: string
      title:
        type: string
      email:
        type: string
      phone:
        type: string
      cellphone:
        type: string
    type: object
  ListedAccount:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      alt_name:
        type: string
      number:
        type: string
      email:
        type: string
      phone:
        type: string
      cellphone:
        type: string
      coordinates:
        $ref: '#/definitions/Coordinates'
    type: object
  AccountContact:
    properties:
      id:
        type: integer
      name:
        type: string
      surname:
        type: string
      email:
        type: string
      phone:
        type: string
      cellphone:
        type: string
      primary:
        type: integer
      title:
        type: string
    type: object
  Tag:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      type:
        type: string
        example: company
        enum:
          - company
          - contact
          - opportunity
          - project
          - lead
          - order
          - quote
          - article
          - orderrow
          - quoterow
          - activity
          - object
          - user
          - template
    type: object
  AccountType:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      defaulttab:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
      isdefault:
        type: integer
        description: ''
      turnover_from:
        type: number
        description: ''
      turnover_to:
        type: number
        description: ''
      turnoverpotential_from:
        type: number
        description: ''
      turnoverpotential_to:
        type: number
        description: ''
      turnover_volume1from:
        type: number
        description: ''
      turnover_volume1to:
        type: number
        description: ''
      turnover_volume2from:
        type: number
        description: ''
      turnover_volume2to:
        type: number
        description: ''
      turnoverpotential_volume1from:
        type: number
        description: ''
      turnoverpotential_volume1to:
        type: number
        description: ''
      turnoverpotential_volume2from:
        type: number
        description: ''
      turnoverpotential_volume2to:
        type: number
        description: ''
      typeiscustomer:
        type: integer
        description: ''
      typeisprospect:
        type: integer
        description: ''
    x-mask: >-
      {id,name,sortorder,isdefault,turnover_from,turnover_to,turnoverpotential_from,turnoverpotential_to,typeiscustomer,typeisprospect}
    type: object
  UpdateAccount:
    properties:
      name:
        type: string
      alt_name:
        type: string
      typeid:
        type: integer
      number:
        type: string
      userid:
        type: integer
      alternateuserid:
        type: integer
      phone:
        type: string
      cellphone:
        type: string
      fax:
        type: string
      email:
        type: string
      url:
        type: string
      vatno:
        type: string
      active:
        type: integer
      info:
        type: string
      socialmedia_fb:
        type: string
      socialmedia_tw:
        type: string
      socialmedia_li:
        type: string
      uservisitintervalweeks:
        type: integer
      alternateuservisitintervalweeks:
        type: integer
      parentaccountid:
        type: integer
      addresses:
        $ref: '#/definitions/Addresses'
      accountgroups:
        type: array
        items:
          $ref: '#/definitions/AccountGroup'
      externalkey:
        type: string
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  UpdateAccountBudget:
    properties:
      budget:
        type: integer
        description: The budget assiged to the account for the year/month period.
    type: object
  AccountBudget:
    properties:
      id:
        type: integer
      year:
        type: integer
        description: ''
      month:
        type: integer
        description: ''
      budget:
        type: integer
        description: The budget assiged to the account for the year/month period.
    x-mask: '{year,month,budget}'
    type: object
  Following:
    required:
      - key
      - userid
    properties:
      key:
        type: integer
      userid:
        type: integer
    type: object
  Page of accountgroups:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/AccountGroup'
        type: object
  Page of accountcoordinates:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ListedCoordinates'
        type: object
  ListedCoordinates:
    properties:
      accountid:
        type: integer
        description: ''
      addresstype:
        type: string
        description: ''
      latitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      longitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      distance:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  Activity:
    required:
      - accountid
      - description
      - location
      - primarycontact
      - result
      - type
      - userid
    properties:
      id:
        type: integer
        description: The unique identifier of an Activity
      account:
        $ref: '#/definitions/ListedAccount'
      accountid:
        type: integer
        description: The unique identifier of the Account to which the Activity belongs
      closed:
        type: integer
        description: Is the Activity closed or open
      contactattempts:
        type: array
        items:
          $ref: '#/definitions/ActivityAttempt'
      description:
        type: string
        description: The description of the Activity
      date:
        type: string
        format: date
        description: Date for when the Activity is scheduled
      extrasexternalid:
        type: integer
      files:
        type: array
        items:
          $ref: '#/definitions/ListedFile'
      followers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      invitedusers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      invitedcontacts:
        type: array
        items:
          $ref: '#/definitions/ListedContact'
      location:
        type: string
        description: Location of the activity
      primarycontact:
        $ref: '#/definitions/PrimaryContact'
      priority:
        $ref: '#/definitions/ActivityPriority'
      progressionstate:
        $ref: '#/definitions/ProgressionState'
      opportunity:
        $ref: '#/definitions/ListedOpportunity'
      reminder:
        $ref: '#/definitions/ActivityReminder'
      start:
        type: string
        format: date-time
        description: The time when the Activity starts
        example: '2019-01-25T00:00:00.000Z'
      starttime:
        type: string
        description: The time when the Activity starts
      stop:
        type: string
        format: date-time
        description: End time of the Activity
        example: '2019-01-25T00:00:00.000Z'
      stoptime:
        type: string
        description: End time of the Activity
      result:
        type: string
        description: ''
      type:
        $ref: '#/definitions/ListedActivityType'
      user:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      userid:
        type: integer
        description: The unique identifier of the owning User
      answers:
        type: array
        items:
          $ref: '#/definitions/ActivityTypeAnswer'
      externalkey:
        type: string
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  ActivityAttempt:
    properties:
      id:
        type: integer
      note:
        type: string
      timestamp:
        type: string
      user:
        $ref: '#/definitions/ListedUser'
    type: object
  ListedContact:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      surname:
        type: string
      title:
        type: string
      email:
        type: string
      officephone:
        type: string
      cellphone:
        type: string
      number:
        type: string
    type: object
  PrimaryContact:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      surname:
        type: string
      email:
        type: string
      phone:
        type: string
      cellphone:
        type: string
      title:
        type: string
    type: object
  ActivityPriority:
    properties:
      id:
        type: integer
      description:
        type: string
    type: object
  ProgressionState:
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  ListedOpportunity:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      title:
        type: string
        description: ''
      description:
        type: string
        description: ''
      estimatedenddate:
        type: string
        description: ''
      account:
        $ref: '#/definitions/ListedAccount'
      user:
        $ref: '#/definitions/ListedUser'
    type: object
  ActivityReminder:
    properties:
      text:
        type: string
      min:
        type: integer
      done:
        type: integer
    type: object
  ListedActivityType:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  ActivityTypeAnswer:
    required:
      - questionid
    properties:
      questionid:
        type: integer
        description: The activity type question id
    type: object
  Page of activities:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Activity'
        type: object
  ActivityType:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      value:
        type: integer
        description: ''
      icon:
        type: integer
        description: ''
      sortorder:
        type: integer
        description: ''
      default:
        type: integer
        description: ''
      quick:
        type: integer
        description: ''
      defaultdescription:
        type: string
        description: ''
      defaultresult:
        type: string
        description: ''
      userfollowups:
        type: integer
        description: ''
      alternateuserfollowups:
        type: integer
        description: ''
    type: object
  ActivityTypeQuestion:
    required:
      - activitytypeid
      - id
      - question
      - sortorder
    properties:
      id:
        type: integer
      question:
        type: string
      activitytypeid:
        type: integer
      sortorder:
        type: integer
    type: object
  UpdateActivity:
    properties:
      closed:
        type: integer
        description: Is the Activity closed or open
      date:
        type: string
        format: date
        description: Date 'YYYY-MM-DD' for when the Activity is scheduled
      description:
        type: string
        description: The description of the Activity
      location:
        type: string
        description: Location of the activity
      result:
        type: string
        description: ''
      starttime:
        type: string
        description: The time 'HH:MM' when the Activity starts
      stoptime:
        type: string
        description: End time 'HH:MM' of the Activity
      typeid:
        type: integer
        description: The unique id for the ActivityType for the Activity
      opportunityid:
        type: integer
        description: ''
      userid:
        type: integer
        description: The unique identifier of the owning User
      user:
        description: Optional way of providing user owning the activity
        allOf:
          - $ref: '#/definitions/ListedUser'
      primarycontact:
        $ref: '#/definitions/PrimaryContact'
      invitedusers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      invitedcontacts:
        type: array
        items:
          $ref: '#/definitions/ListedContact'
      answers:
        type: array
        items:
          $ref: '#/definitions/ActivityTypeAnswer'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  UpdateActivityType:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      value:
        type: integer
        description: ''
      icon:
        type: integer
        description: ''
      sortorder:
        type: integer
        description: ''
      default:
        type: integer
        description: ''
      quick:
        type: integer
        description: ''
      defaultdescription:
        type: string
        description: ''
      defaultresult:
        type: string
        description: ''
      userfollowups:
        type: integer
        description: ''
      alternateuserfollowups:
        type: integer
        description: ''
    type: object
  Page of activitycoordinates:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ListedActivityCoordinates'
        type: object
  ListedActivityCoordinates:
    properties:
      activityid:
        type: integer
        description: ''
      addresstype:
        type: string
        description: ''
      latitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      longitude:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      distance:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  ArticleGroup:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      externalkey:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
        default: 0
    type: object
  Page of articleunits:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ArticleUnit'
        type: object
  ArticleUnit:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      externalkey:
        type: string
        description: ''
    type: object
  CreateArticle:
    required:
      - description
      - name
      - price
      - vat
    properties:
      name:
        type: string
        description: ''
      price:
        type: number
        description: ''
      description:
        type: string
        description: ''
      warehousestatusid:
        type: integer
        description: ''
      businessareaid:
        type: integer
        description: ''
      servicelevelid:
        type: integer
        description: ''
      warehouseid:
        type: integer
        description: ''
      unitid:
        type: integer
        description: ''
      groupid:
        type: integer
        description: ''
      number:
        type: string
        description: ''
      buyprice:
        type: number
        description: ''
      commision:
        type: number
        description: ''
      externalkey:
        type: string
        description: ''
      imageurl:
        type: string
        description: ''
      url1:
        type: string
        description: ''
      url2:
        type: string
        description: ''
      stockbalance:
        type: integer
        description: ''
      vat:
        type: number
        description: ''
      accountid:
        type: integer
        description: ''
      suppliername:
        type: string
        description: ''
      supplierarticlenumber:
        type: string
        description: ''
      stockbalancewarningtreshold:
        type: integer
        description: ''
      brandid:
        type: integer
        description: ''
      materialid:
        type: integer
        description: ''
      incampaign:
        type: integer
        description: ''
      volume:
        type: integer
        description: ''
      area:
        type: number
        description: ''
      volumegroupid:
        type: integer
        description: ''
      discountgroupid:
        type: integer
        description: ''
      budgetgroupid:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      presentation:
        type: string
        description: ''
      discount:
        type: number
        description: ''
      sortorder:
        type: integer
        description: ''
        default: 0
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of articles:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Article'
        type: object
  Article:
    required:
      - description
      - name
      - price
      - vat
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      price:
        type: number
        description: ''
      description:
        type: string
        description: ''
      warehousestatusid:
        type: integer
        description: ''
      businessareaid:
        type: integer
        description: ''
      servicelevelid:
        type: integer
        description: ''
      warehouseid:
        type: integer
        description: ''
      unitid:
        type: integer
        description: ''
      groupid:
        type: integer
        description: ''
      number:
        type: string
        description: ''
      buyprice:
        type: number
        description: ''
      commision:
        type: number
        description: ''
      externalkey:
        type: string
        description: ''
      imageurl:
        type: string
        description: ''
      url1:
        type: string
        description: ''
      url2:
        type: string
        description: ''
      stockbalance:
        type: integer
        description: ''
      vat:
        type: number
        description: ''
      accountid:
        type: integer
        description: ''
      suppliername:
        type: string
        description: ''
      supplierarticlenumber:
        type: string
        description: ''
      stockbalancewarningtreshold:
        type: integer
        description: ''
      brandid:
        type: integer
        description: ''
      materialid:
        type: integer
        description: ''
      incampaign:
        type: integer
        description: ''
      volume:
        type: integer
        description: ''
      area:
        type: number
        description: ''
      volumegroupid:
        type: integer
        description: ''
      discountgroupid:
        type: integer
        description: ''
      budgetgroupid:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      presentation:
        type: string
        description: ''
      discount:
        type: number
        description: ''
      sortorder:
        type: integer
        description: ''
        default: 0
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  UpdateArticle:
    required:
      - description
      - name
      - price
      - vat
    properties:
      name:
        type: string
        description: ''
      price:
        type: number
        description: ''
      description:
        type: string
        description: ''
      warehousestatusid:
        type: integer
        description: ''
      businessareaid:
        type: integer
        description: ''
      servicelevelid:
        type: integer
        description: ''
      warehouseid:
        type: integer
        description: ''
      unitid:
        type: integer
        description: ''
      groupid:
        type: integer
        description: ''
      number:
        type: string
        description: ''
      buyprice:
        type: number
        description: ''
      commision:
        type: number
        description: ''
      externalkey:
        type: string
        description: ''
      imageurl:
        type: string
        description: ''
      url1:
        type: string
        description: ''
      url2:
        type: string
        description: ''
      stockbalance:
        type: integer
        description: ''
      vat:
        type: number
        description: ''
      accountid:
        type: integer
        description: ''
      suppliername:
        type: string
        description: ''
      supplierarticlenumber:
        type: string
        description: ''
      stockbalancewarningtreshold:
        type: integer
        description: ''
      brandid:
        type: integer
        description: ''
      materialid:
        type: integer
        description: ''
      incampaign:
        type: integer
        description: ''
      volume:
        type: integer
        description: ''
      area:
        type: number
        description: ''
      volumegroupid:
        type: integer
        description: ''
      discountgroupid:
        type: integer
        description: ''
      budgetgroupid:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      presentation:
        type: string
        description: ''
      discount:
        type: number
        description: ''
      sortorder:
        type: integer
        description: ''
        default: 0
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  WarehouseStatus:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  ServiceLevel:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Warehouse:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Material:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Brand:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  VolumeGroup:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  DiscountGroup:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  BudgetGroup:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  CreateContact:
    required:
      - accountid
      - name
      - surname
    properties:
      name:
        type: string
        description: This field must not be empty.
      surname:
        type: string
        description: This field must not be empty.
      function:
        type: string
      department:
        type: string
      email:
        type: string
      officephone:
        type: string
      cellphone:
        type: string
      title:
        type: string
      street:
        type: string
      city:
        type: string
      zip:
        type: string
      accountid:
        type: integer
      primarycontact:
        type: integer
      socialmedia_fb:
        type: string
      socialmedia_tw:
        type: string
      socialmedia_li:
        type: string
      idnumber:
        type: string
      externalkey:
        type: string
      active:
        type: integer
      superiorid:
        type: integer
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of contacts:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Contact'
        type: object
  Contact:
    required:
      - active
    properties:
      id:
        type: integer
        description: ''
      account:
        description: ''
        $ref: '#/definitions/ListedAccount'
      name:
        type: string
        description: ''
      surname:
        type: string
        description: ''
      function:
        type: string
        description: ''
      department:
        type: string
        description: ''
      email:
        type: string
        description: ''
      officephone:
        type: string
        description: ''
      cellphone:
        type: string
        description: ''
      title:
        type: string
        description: ''
      street:
        type: string
        description: ''
      city:
        type: string
        description: ''
      zip:
        type: string
        description: ''
      primarycontact:
        type: integer
        description: ''
      socialmedia_fb:
        type: string
        description: ''
      socialmedia_tw:
        type: string
        description: ''
      socialmedia_li:
        type: string
        description: ''
      idnumber:
        type: string
        description: ''
      externalkey:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      superior:
        $ref: '#/definitions/ListedContact'
      files:
        type: array
        items:
          $ref: '#/definitions/ListedFile'
      followers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      photo:
        description: >-
          possible properties are 'avatar' and 'photo', 'photo' is not included
          by default. to include photo and everything else use mask
          '{*,photo{avatar,photo}}'
        allOf:
          - $ref: '#/definitions/ContactPhoto'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  ContactPhoto:
    properties:
      avatar:
        type: string
        description: This property is included in the default X-Files mask.
      photo:
        type: string
        description: This property is not included in the default X-Files mask.
    x-mask: '{avatar}'
    type: object
  UpdateContact:
    properties:
      name:
        type: string
      surname:
        type: string
      function:
        type: string
      department:
        type: string
      email:
        type: string
      officephone:
        type: string
      cellphone:
        type: string
      title:
        type: string
      street:
        type: string
      city:
        type: string
      zip:
        type: string
      primarycontact:
        type: integer
      socialmedia_fb:
        type: string
      socialmedia_tw:
        type: string
      socialmedia_li:
        type: string
      idnumber:
        type: string
      externalkey:
        type: string
      active:
        type: integer
      superiorid:
        type: integer
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  DeliveryTerm:
    required:
      - externalkey
      - name
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      default:
        type: integer
        description: ''
      externalkey:
        type: string
        description: ''
    type: object
  Page of deliveryterms:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/DeliveryTerm'
        type: object
  DeliveryType:
    required:
      - name
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      default:
        type: integer
        description: ''
    type: object
  Page of deliverytypes:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/DeliveryType'
        type: object
  Page of field definitions:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/FieldDefinition'
        type: object
  FieldDefinition:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      group:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
      size:
        type: integer
        description: ''
      help:
        type: string
        description: ''
      required:
        type: boolean
      inoverview:
        type: boolean
      visible:
        type: boolean
      readonly:
        type: boolean
      options:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      type:
        $ref: '#/definitions/FieldType'
      fieldgroup:
        $ref: '#/definitions/FieldGroup'
      selected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      unselected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
    type: object
  FieldType:
    required:
      - id
    properties:
      id:
        type: integer
      fieldid:
        type: integer
      label:
        type: string
      sortorder:
        type: integer
      group:
        type: string
    type: object
  FieldGroup:
    properties:
      id:
        type: integer
      name:
        type: string
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  Page of dynamic field data:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/DynamicFieldData'
        type: object
  DynamicFieldData:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      required:
        type: boolean
      inoverview:
        type: boolean
      visible:
        type: boolean
      readonly:
        type: boolean
      selected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      unselected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      type:
        $ref: '#/definitions/FieldType'
      value:
        type: string
        description: ''
    type: object
  DynamicDataValue:
    properties:
      selected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      unselected:
        type: array
        items:
          $ref: '#/definitions/FieldType'
      value:
        type: string
        description: ''
    type: object
  UpdateFile:
    required:
      - content
      - name
    properties:
      name:
        type: string
        description: ''
      info:
        type: string
        description: ''
      folderid:
        type: integer
        description: ''
      content:
        type: string
        description: base64 representation of the file content.
      connectedactivities:
        type: array
        description: this is a list of Activity.id to which the file will be connected
        items:
          type: integer
      connectedaccounts:
        type: array
        description: this is a list of Account.id to which the file will be connected
        items:
          type: integer
      connectedcontacts:
        type: array
        description: this is a list of Contact.id to which the file will be connected
        items:
          type: integer
      connectedopportunities:
        type: array
        description: this is a list of Opportunity.id to which the file will be connected
        items:
          type: integer
      connectedorders:
        type: array
        description: this is a list of Order.id to which the file will be connected
        items:
          type: integer
      connectedleads:
        type: array
        description: this is a list of Lead.id to which the file will be connected
        items:
          type: integer
      connectedquotes:
        type: array
        description: this is a list of Quote.id to which the file will be connected
        items:
          type: integer
      connectedprojects:
        type: array
        description: this is a list of Project.id to which the file will be connected
        items:
          type: integer
      connectedobjects:
        type: array
        description: this is a list of Object.id to which the file will be connected
        items:
          type: integer
      connectedusers:
        type: array
        description: this is a list of User.id to which the file will be connected
        items:
          type: integer
      connectedarticles:
        type: array
        description: this is a list of Article.id to which the file will be connected
        items:
          type: integer
      connectedmissions:
        type: array
        description: this is a list of Mission.id to which the file will be connected
        items:
          type: integer
      connectedsubscriptions:
        type: array
        description: this is a list of Subscription.id to which the file will be connected
        items:
          type: integer
    type: object
  Page of files:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/File'
        type: object
  File:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      info:
        type: string
        description: ''
      timestamp:
        type: string
        description: ''
      folderid:
        type: integer
        description: ''
      templateid:
        type: integer
        description: ''
      folder:
        $ref: '#/definitions/ParentFolder'
      template:
        $ref: '#/definitions/FileTemplate'
      activities:
        type: array
        items:
          $ref: '#/definitions/ListedActivity'
      accounts:
        type: array
        items:
          $ref: '#/definitions/ListedAccount'
      contacts:
        type: array
        items:
          $ref: '#/definitions/ListedContact'
      opportunities:
        type: array
        items:
          $ref: '#/definitions/ListedOpportunity'
      connectedactivities:
        type: array
        description: stuff
        items:
          type: integer
      connectedaccounts:
        type: array
        description: stuff
        items:
          type: integer
      connectedcontacts:
        type: array
        description: stuff
        items:
          type: integer
      connectedopportunities:
        type: array
        items:
          type: integer
          description: stuff
      connectedorders:
        type: array
        items:
          type: integer
          description: stuff
      connectedleads:
        type: array
        items:
          type: integer
          description: stuff
      connectedquotes:
        type: array
        items:
          type: integer
          description: stuff
      connectedprojects:
        type: array
        items:
          type: integer
          description: stuff
      connectedobjects:
        type: array
        items:
          type: integer
          description: stuff
      connectedusers:
        type: array
        items:
          type: integer
          description: stuff
      connectedarticles:
        type: array
        items:
          type: integer
          description: stuff
      connectedmissions:
        type: array
        items:
          type: integer
          description: stuff
      connectedsubscriptions:
        type: array
        items:
          type: integer
          description: stuff
    type: object
  ParentFolder:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentfolderid:
        type: integer
        description: ''
    type: object
  FileTemplate:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  ListedActivity:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      description:
        type: string
        description: ''
      date:
        type: string
        format: date
        description: ''
      user:
        $ref: '#/definitions/ListedUser'
      type:
        $ref: '#/definitions/ListedActivityType'
      account:
        $ref: '#/definitions/ListedAccount'
    type: object
  Page of folders:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Folder'
        type: object
  Folder:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentfolderid:
        type: integer
        description: ''
      accountid:
        type: integer
        description: ''
      files:
        type: array
        items:
          $ref: '#/definitions/ListedFile'
      account:
        $ref: '#/definitions/ListedAccount'
      folders:
        type: array
        items:
          $ref: '#/definitions/ListedFolder'
    type: object
  ListedFolder:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  NewChallenge:
    required:
      - challenged
      - startdate
    properties:
      challenged:
        $ref: '#/definitions/NewCahllengeUser'
      startdate:
        type: string
        format: date-time
        description: ''
      type:
        $ref: '#/definitions/ChallengeType'
    type: object
  NewCahllengeUser:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      surname:
        type: string
      title:
        type: string
    type: object
  ChallengeType:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Challenge:
    properties:
      id:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      challenged:
        $ref: '#/definitions/ChallengeUser'
      challenger:
        $ref: '#/definitions/ChallengeUser'
      created:
        type: object
      daysremaining:
        type: number
        description: Days remaining of the challenge
      startdate:
        type: object
      stopdate:
        type: object
      type:
        $ref: '#/definitions/ChallengeType'
      winner:
        $ref: '#/definitions/ListedUser'
    x-mask: >-
      {id,active,challenged,challenger,daysremaining,startdate,stopdate,type,winner}
    type: object
  ChallengeUser:
    required:
      - user
    properties:
      id:
        type: integer
        description: ''
      accepted:
        type: object
      challengeid:
        type: integer
        description: ''
      owner:
        type: boolean
        description: ''
      score:
        type: integer
        description: The acumulated score for the user in this challenge
      user:
        $ref: '#/definitions/ListedUser'
    x-mask: '{user,accepted,owner,score}'
    type: object
  Page of challenges:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Challenge'
        type: object
  ChallengeResponse:
    properties:
      id:
        type: integer
        description: id of challenge
      status:
        type: string
        description: status (accepted or denied) of the challenge
    type: object
  ChallengeScorePoints:
    properties:
      achievements:
        $ref: '#/definitions/ChallengeAchievements'
      category:
        type: string
        description: ''
      heartbeat:
        type: number
      level:
        type: integer
        description: ''
      score:
        type: integer
        description: ''
    type: object
  ChallengeAchievements:
    properties:
      day:
        type: integer
        description: ''
      week:
        type: integer
        description: ''
      month:
        type: integer
        description: ''
    type: object
  CreateLead:
    properties:
      contacttitle:
        type: string
        description: ''
      contactname:
        type: string
        description: ''
      contactsurname:
        type: string
        description: ''
      contactcompany:
        type: string
        description: ''
      contactstreet:
        type: string
        description: ''
      contactcity:
        type: string
        description: ''
      contactzip:
        type: string
        description: ''
      contactphone:
        type: string
        description: ''
      contactcellphone:
        type: string
        description: ''
      contactemail:
        type: string
        description: ''
      contactvatno:
        type: string
        description: ''
      value:
        type: number
        description: ''
      created:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      updated:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      title:
        type: string
      description:
        type: string
      rating:
        type: integer
      user:
        $ref: '#/definitions/LeadUser'
      source:
        $ref: '#/definitions/Source'
      status:
        $ref: '#/definitions/Status'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  LeadUser:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      surname:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      title:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      email:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      phone:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      cellphone:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  Source:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      default:
        type: integer
        description: ''
    type: object
  Status:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
      created:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      updated:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
    type: object
  Page of leads:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Lead'
        type: object
  Lead:
    properties:
      id:
        type: integer
        description: ''
      contacttitle:
        type: string
        description: ''
      contactname:
        type: string
        description: ''
      contactsurname:
        type: string
        description: ''
      contactcompany:
        type: string
        description: ''
      contactstreet:
        type: string
        description: ''
      contactcity:
        type: string
        description: ''
      contactzip:
        type: string
        description: ''
      contactphone:
        type: string
        description: ''
      contactcellphone:
        type: string
        description: ''
      contactemail:
        type: string
        description: ''
      contactvatno:
        type: string
        description: ''
      value:
        type: number
        description: ''
      created:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      updated:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      title:
        type: string
      description:
        type: string
      rating:
        type: integer
      user:
        $ref: '#/definitions/LeadUser'
      source:
        $ref: '#/definitions/Source'
      status:
        $ref: '#/definitions/Status'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
      activities:
        type: array
        description: this will be ignored on PUT/POST requests
        items:
          $ref: '#/definitions/LeadActivity'
    type: object
  LeadActivity:
    required:
      - comment
      - done
    properties:
      id:
        type: integer
        description: ''
      type:
        $ref: '#/definitions/LeadActivityType'
      comment:
        type: string
        description: ''
      user:
        $ref: '#/definitions/LeadUser'
      followup:
        type: string
        format: date-time
        description: ''
      done:
        type: integer
      created:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      updated:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      lead:
        description: this will be ignored on PUT/POST requests
        allOf:
          - $ref: '#/definitions/ListedLead'
    type: object
  LeadActivityType:
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  ListedLead:
    required:
      - id
      - title
    properties:
      id:
        type: integer
        description: ''
      title:
        type: string
      user:
        description: this will be ignored on PUT/POST requests
        allOf:
          - $ref: '#/definitions/ListedLeadUser'
    type: object
  ListedLeadUser:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      surname:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
    type: object
  UpdateLead:
    properties:
      contacttitle:
        type: string
        description: ''
      contactname:
        type: string
        description: ''
      contactsurname:
        type: string
        description: ''
      contactcompany:
        type: string
        description: ''
      contactstreet:
        type: string
        description: ''
      contactcity:
        type: string
        description: ''
      contactzip:
        type: string
        description: ''
      contactphone:
        type: string
        description: ''
      contactcellphone:
        type: string
        description: ''
      contactemail:
        type: string
        description: ''
      contactvatno:
        type: string
        description: ''
      value:
        type: number
        description: ''
      created:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      updated:
        type: string
        format: date-time
        description: this will be ignored on PUT/POST requests
      title:
        type: string
      description:
        type: string
      rating:
        type: integer
      user:
        $ref: '#/definitions/LeadUser'
      source:
        $ref: '#/definitions/Source'
      status:
        $ref: '#/definitions/Status'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of lead activities:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/LeadActivity'
        type: object
  UpdateOpportunity:
    required:
      - accountid
      - contactid
      - description
      - estimatedenddate
      - statusid
      - title
      - typeid
      - userid
    properties:
      accountid:
        type: integer
        description: ''
      altaccountid:
        type: integer
        description: ''
      contactid:
        type: integer
        description: ''
      phone:
        type: string
        description: ''
      title:
        type: string
        description: ''
      description:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
      result:
        type: string
        description: ''
      value:
        type: number
        description: ''
      altvalue:
        type: string
        description: ''
      altvaluelabel:
        type: string
        description: ''
      statusid:
        type: integer
        description: ''
      estimatedenddate:
        type: string
        description: ''
      lostreasonid:
        type: integer
        description: ''
      typeid:
        type: integer
        description: ''
      winreasonid:
        type: integer
        description: ''
      enddate:
        type: string
        format: date
        description: '2020-01-25'
      stateid:
        type: integer
        description: ''
      estimateid:
        type: integer
        description: ''
      sourceid:
        type: string
        description: ''
      closed:
        type: integer
        description: ''
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of opportunities:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Opportunity'
        type: object
  Opportunity:
    properties:
      id:
        type: integer
        description: ''
      account:
        $ref: '#/definitions/ListedAccount'
      accountid:
        type: integer
        description: ''
      altaccount:
        $ref: '#/definitions/ListedAccount'
      altaccountid:
        type: integer
        description: ''
      altvalue:
        type: integer
        description: ''
      altvaluelabel:
        type: string
        description: ''
      changedate:
        type: object
      changeuserid:
        type: integer
        description: ''
      changeuser:
        $ref: '#/definitions/ListedUser'
      closed:
        type: integer
        description: ''
      contact:
        $ref: '#/definitions/ListedContact'
      contactid:
        type: integer
        description: ''
      description:
        type: string
        description: ''
      estimate:
        $ref: '#/definitions/OpportunityEstimate'
      estimatedenddate:
        type: string
        format: date
        example: '2020-01-25'
      files:
        type: array
        items:
          $ref: '#/definitions/ListedFile'
      followers:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
      lostreason:
        $ref: '#/definitions/OpportunityLost'
      lostreasonid:
        type: integer
        description: ''
      phone:
        type: string
        description: ''
      progressionstate:
        $ref: '#/definitions/ProgressionState'
      regdate:
        type: object
      reguser:
        $ref: '#/definitions/ListedUser'
      reguserid:
        type: integer
        description: ''
      result:
        type: string
        description: ''
      source:
        $ref: '#/definitions/OpportunitySource'
      sourceid:
        type: integer
        description: ''
      state:
        $ref: '#/definitions/OpportunityState'
      stateid:
        type: integer
        description: ''
      status:
        $ref: '#/definitions/OpportunityStatus'
      statusid:
        type: integer
        description: ''
      title:
        type: string
        description: ''
      type:
        $ref: '#/definitions/OpportunityType'
      typeid:
        type: integer
        description: ''
      user:
        $ref: '#/definitions/ListedUser'
      userid:
        type: integer
        description: ''
      value:
        type: number
        description: ''
      businessarea:
        $ref: '#/definitions/OpportunityBusinessArea'
      winreason:
        $ref: '#/definitions/OpportunityWin'
      winreasonid:
        type: integer
        description: ''
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  OpportunityEstimate:
    properties:
      id:
        type: integer
        description: ''
      description:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
      value:
        type: string
        description: ''
      visible:
        type: integer
        description: ''
    x-mask: '{id,value,description}'
    type: object
  OpportunityLost:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
    type: object
  OpportunitySource:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      default:
        type: integer
        description: ''
    type: object
  OpportunityState:
    properties:
      id:
        type: integer
        description: ''
      state:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
    type: object
  OpportunityStatus:
    properties:
      id:
        type: integer
        description: ''
      color:
        type: string
        description: ''
      description:
        type: string
        description: ''
      name:
        type: string
        description: ''
      lost:
        type: integer
        description: ''
      opportunitytypeid:
        type: integer
        description: ''
      sortorder:
        type: integer
        description: ''
      sortorderplug:
        type: integer
        description: ''
      won:
        type: integer
        description: ''
    x-mask: '{id,name,sortorder,description,won,lost,opportunitytypeid}'
    type: object
  OpportunityType:
    properties:
      id:
        type: integer
        description: ''
      isdefault:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
      validstatuses:
        $ref: '#/definitions/OpportunityStatus'
    type: object
  OpportunityBusinessArea:
    properties:
      opportunityid:
        type: integer
        description: ''
      businessareaid:
        type: integer
        description: ''
    type: object
  OpportunityWin:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
    type: object
  CreateOrder:
    required:
      - account
      - contact
      - placedate
      - status
      - user
    properties:
      placedate:
        type: string
        format: _DateTime
        description: Date for when the order was placed, only the date part will be used
        example: '2019-01-25T00:00:00.000Z'
      account:
        $ref: '#/definitions/IdObject'
      user:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      status:
        $ref: '#/definitions/IdObject'
      deliveryterm:
        $ref: '#/definitions/IdObject'
      paymentterm:
        $ref: '#/definitions/IdObject'
      deliverytype:
        $ref: '#/definitions/IdObject'
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      statisticsprice:
        type: number
      alternativevalue:
        type: number
      alternateid:
        type: string
      externalcomment:
        type: string
      delivered:
        type: integer
      deliverydate:
        type: string
        format: _DateTime
        description: >-
          Date for when the order will be delivered, only the date part will be
          used
        example: '2019-01-25T00:00:00.000Z'
      deliveryname:
        type: string
      deliverystreet:
        type: string
      deliveryzip:
        type: string
      deliverycity:
        type: string
      deliverycountry:
        type: string
      invoicename:
        type: string
      invoicestreet:
        type: string
      invoicezip:
        type: string
      invoicecity:
        type: string
      invoicecountry:
        type: string
      invoiceemail:
        type: string
      invoicenumber:
        type: string
      invoicedate:
        type: string
      externalkey:
        type: string
      internalcomment:
        type: string
      marking:
        type: string
      referencecode:
        type: string
      extracode:
        type: string
      user2:
        $ref: '#/definitions/IdObject'
      opportunity:
        $ref: '#/definitions/IdObject'
      type:
        $ref: '#/definitions/IdObject'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      rows:
        type: array
        items:
          $ref: '#/definitions/OrderRow'
    type: object
  OrderRow:
    properties:
      id:
        type: integer
        description: ''
      orderid:
        type: integer
        description: ''
      accountid:
        type: integer
        description: ''
      userid:
        type: integer
        description: ''
      opportunityid:
        type: integer
        description: ''
      quantityordered:
        type: number
        description: ''
      quantitydelivered:
        type: number
        description: ''
      discountspecial:
        type: number
        description: ''
      sortorder:
        type: integer
        description: ''
      price:
        type: number
        description: ''
      currencycode:
        type: string
        description: ''
      currencyrate:
        type: number
        description: ''
      statisticsprice:
        type: number
        description: ''
      alternatvievalue:
        type: number
        description: ''
      buyprice:
        type: number
        description: ''
      specification:
        type: string
        description: ''
      discountpercent:
        type: number
        description: ''
      discountamount:
        type: number
        description: ''
      externalkey:
        type:
          - string
          - 'null'
        description: ''
        example: nullable string
      noprint:
        type: integer
        description: ''
      deleted:
        type: integer
        description: ''
      pricewarning:
        type: integer
        description: indicates that the quantity is not part of the pricegroup
      totalprice:
        type: number
        description: ''
      totalpricestatistics:
        type: number
        description: ''
      totalalternativevalue:
        type: number
        description: ''
      pricelist:
        description: >-
          Indicates if the orderrow is placed against a pricelist, depending on
          configuration of Cirrus this field may be mandatory
        allOf:
          - $ref: '#/definitions/PriceList'
      pricegroup:
        description: >-
          Indicates if the orderrow is placed against a pricegroup from a
          pricelist, depending on configuration of Cirrus this field may be
          mandatory
        allOf:
          - $ref: '#/definitions/PriceGroup'
      sortgroup:
        type: integer
        description: ''
      article:
        $ref: '#/definitions/ListedArticle'
      articleunit:
        $ref: '#/definitions/ListedArticleUnit'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  PriceList:
    required:
      - active
      - default
      - prices
      - start
      - stop
      - strict
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      active:
        type: boolean
        description: ''
      start:
        type: string
        format: date-time
        description: ''
      stop:
        type: string
        format: date-time
        description: ''
      default:
        type: boolean
        description: ''
      externalkey:
        type: string
        description: ''
      strict:
        type: boolean
        description: ''
      description:
        type: string
        description: ''
      currencyid:
        type: integer
        description: ''
      prices:
        type: array
        items:
          $ref: '#/definitions/ArticlePrice'
    type: object
  ArticlePrice:
    required:
      - article
      - discountamount
      - discountpercent
      - price
      - pricegroup
    properties:
      id:
        type: integer
        description: ''
      price:
        type: number
        description: ''
      discountpercent:
        type: number
        description: ''
      discountamount:
        type: number
        description: ''
      pricegroup:
        description: ''
        $ref: '#/definitions/PriceGroup'
      article:
        description: ''
        $ref: '#/definitions/ListedArticle'
    type: object
  PriceGroup:
    required:
      - max
      - min
      - name
      - unit
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      unit:
        description: ''
        $ref: '#/definitions/ListedArticleUnit'
      min:
        type: integer
        description: ''
      max:
        type: integer
        description: ''
    type: object
  ListedArticleUnit:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  ListedArticle:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      number:
        type: string
        description: ''
    type: object
  Page of orders:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Order'
        type: object
  Order:
    required:
      - alternativevalue
      - buyprice
      - currencyrate
      - discounted
      - externalcomment
      - placedate
      - price
      - statisticsprice
    properties:
      id:
        type: integer
        description: ''
      price:
        type: number
        description: ''
      currencycode:
        type: string
        description: ''
      currencyrate:
        type: number
        description: ''
      statisticsprice:
        type: number
        description: ''
      alternativevalue:
        type: number
        description: ''
      buyprice:
        type: number
        description: ''
      discounted:
        type: boolean
        description: ''
      placedate:
        type: string
        format: _DateTime
        description: Date for when the order was placed, only the date part will be used
        example: '2019-01-25T00:00:00.000Z'
      alternateid:
        type: string
        description: ''
      externalcomment:
        type: string
        description: ''
      deliverydate:
        type: string
        format: _DateTime
        description: >-
          Date for when the order will be delivered, only the date part will be
          used
        example: '2019-01-25T00:00:00.000Z'
      deliveryname:
        type: string
        description: ''
      deliverystreet:
        type: string
        description: ''
      deliveryzip:
        type: string
        description: ''
      deliverycity:
        type: string
        description: ''
      deliverycountry:
        type: string
        description: ''
      invoicename:
        type: string
        description: ''
      invoicestreet:
        type: string
        description: ''
      invoicezip:
        type: string
        description: ''
      invoicecity:
        type: string
        description: ''
      invoicecountry:
        type: string
        description: ''
      invoiceemail:
        type: string
        description: ''
      invoicenumber:
        type: string
        description: ''
      invoicedate:
        type: string
        description: ''
      externalkey:
        type: string
        description: ''
      internalcomment:
        type: string
        description: ''
      marking:
        type: string
        description: ''
      referencecode:
        type: string
        description: ''
      extracode:
        type: string
        description: ''
      pricelist:
        description: >-
          Indicates if the order is placed against a pricelist, depending on
          configuration of Cirrus this field may be mandatory
        allOf:
          - $ref: '#/definitions/PriceList'
      tscreated:
        type: string
        format: date-time
      tsupdated:
        type: string
        format: date-time
      account:
        $ref: '#/definitions/ListedAccount'
      user:
        $ref: '#/definitions/ListedUser'
      user2:
        $ref: '#/definitions/ListedUser'
      opportunity:
        $ref: '#/definitions/ListedOpportunity'
      contact:
        $ref: '#/definitions/ListedContact'
      status:
        $ref: '#/definitions/ListedOrderStatus'
      deliveryterm:
        $ref: '#/definitions/Deliveryterm'
      paymentterm:
        $ref: '#/definitions/Paymentterm'
      deliverytype:
        $ref: '#/definitions/Deliverytype'
      type:
        $ref: '#/definitions/ListedOrderType'
      delivered:
        type: integer
        description: ''
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
      rows:
        type: array
        items:
          $ref: '#/definitions/OrderRow'
    type: object
  ListedOrderStatus:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Deliveryterm:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Paymentterm:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Deliverytype:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  ListedOrderType:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  UpdateOrder:
    properties:
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      statisticsprice:
        type: number
      alternativevalue:
        type: number
      buyprice:
        type: number
      discounted:
        type: boolean
      placedate:
        type: string
        format: _DateTime
        description: Date for when the order was placed, only the date part will be used
        example: '2019-01-25T00:00:00.000Z'
      alternateid:
        type: string
      externalcomment:
        type: string
      deliverydate:
        type: string
        format: _DateTime
        description: >-
          Date for when the order will be delivered, only the date part will be
          used
        example: '2019-01-25T00:00:00.000Z'
      deliveryname:
        type: string
      deliverystreet:
        type: string
      deliveryzip:
        type: string
      deliverycity:
        type: string
      deliverycountry:
        type: string
      invoicename:
        type: string
      invoicestreet:
        type: string
      invoicezip:
        type: string
      invoicecity:
        type: string
      invoicecountry:
        type: string
      invoiceemail:
        type: string
      invoicenumber:
        type: string
      invoicedate:
        type: string
      externalkey:
        type: string
      internalcomment:
        type: string
      marking:
        type: string
      referencecode:
        type: string
      extracode:
        type: string
      account:
        $ref: '#/definitions/IdObject'
      user:
        $ref: '#/definitions/IdObject'
      user2:
        $ref: '#/definitions/IdObject'
      opportunity:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      status:
        $ref: '#/definitions/IdObject'
      deliveryterm:
        $ref: '#/definitions/IdObject'
      paymentterm:
        $ref: '#/definitions/IdObject'
      deliverytype:
        $ref: '#/definitions/IdObject'
      type:
        $ref: '#/definitions/IdObject'
      delivered:
        type: integer
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      rows:
        type: array
        items:
          $ref: '#/definitions/OrderRow'
    type: object
  OrderType:
    required:
      - name
      - sortorder
    properties:
      id:
        type: integer
        description: ''
      default:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
    type: object
  Page of ordertypes:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/OrderType'
        type: object
  PaymentTerm:
    required:
      - days
      - externalkey
      - name
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      default:
        type: integer
        description: ''
      externalkey:
        type: string
        description: ''
      days:
        type: integer
        description: ''
    type: object
  Page of paymentterms:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/PaymentTerm'
        type: object
  Page of pricelists:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/PriceList'
        type: object
  Page of price groups:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/PriceGroup'
        type: object
  AddressLookupRequest:
    required:
      - person_number
    properties:
      person_number:
        type: string
    type: object
  AddressLookup:
    properties:
      name:
        type: string
      surname:
        type: string
      street:
        type: string
      city:
        type: string
      zip:
        type: string
    type: object
  Options:
    properties:
      colours:
        $ref: '#/definitions/Material'
      sizes:
        $ref: '#/definitions/DiscountGroup'
    type: object
  Phone:
    properties:
      id:
        type: integer
      name:
        type: string
      description:
        type: string
      price:
        type: integer
    type: object
  BankIdSignRequest:
    required:
      - abstract
    properties:
      abstract:
        type: string
        description: userVisibleData
      digest:
        type: string
        description: userNonVisibleData
      personalnumber:
        type: string
        description: personalNumber of the person supposed to sign
      requirement:
        type:
          - object
        example: {}
      nonce:
        type: string
    type: object
  BankIdSign:
    required:
      - id
      - message
      - status
    properties:
      id:
        type: integer
      message:
        type: string
      status:
        type: string
      orderref:
        type: string
      personalnumber:
        type: string
      autostarttoken:
        type: string
      hintcode:
        type: string
      completiondata:
        $ref: '#/definitions/BankIdCompletionData'
    type: object
  BankIdCompletionData:
    properties:
      user:
        $ref: '#/definitions/BankIdCompletionDataUser'
      device:
        $ref: '#/definitions/BankIdCompletionDataDevice'
      cert:
        $ref: '#/definitions/BankIdCompletionDataCert'
      signature:
        type: string
      ocspresponse:
        type: string
    type: object
  BankIdCompletionDataUser:
    properties:
      personalnumber:
        type: string
      name:
        type: string
      givenname:
        type: string
      surname:
        type: string
    type: object
  BankIdCompletionDataDevice:
    properties:
      ipaddress:
        type: string
    type: object
  BankIdCompletionDataCert:
    properties:
      notbefore:
        type: string
      notafter:
        type: string
    type: object
  CreditCheckRequest:
    required:
      - person_number
    properties:
      person_number:
        type: string
        minLength: 12
        maxLength: 12
        pattern: ^[0-9]{12}$
    type: object
  CreditCheck:
    required:
      - person_number
      - status
    properties:
      person_number:
        type: string
      status:
        type: string
      correlationid:
        type: string
      checkdate:
        type: string
        format: date-time
      outcome:
        type: string
    type: object
  User:
    required:
      - cellphone
      - name
      - roles
      - surname
      - title
    properties:
      active:
        type: integer
        description: ''
      cellphone:
        type: string
        description: ''
      departments:
        type: array
        items:
          $ref: '#/definitions/Department1'
      email:
        type: string
        description: ''
      id:
        type: integer
        description: ''
      language:
        type: string
        description: ''
      lastactive:
        type: object
      name:
        type: string
        description: ''
      phone:
        type: string
        description: ''
      presentation:
        type: string
        description: ''
      startpage:
        type: integer
        description: DEPRECATED
      surname:
        type: string
        description: ''
      title:
        type: string
        description: ''
      avatar_b64:
        type: string
        description: ''
      photo_b64:
        type: string
        description: ''
      settings:
        type: array
        items:
          $ref: '#/definitions/UserSetting'
      roles:
        type: array
        items:
          $ref: '#/definitions/Role'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  Department1:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentdepartment:
        $ref: '#/definitions/Department2'
      manager:
        $ref: '#/definitions/ListedUser'
    type: object
  Department2:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentdepartment:
        $ref: '#/definitions/Department3'
      manager:
        $ref: '#/definitions/ListedUser'
    type: object
  Department3:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentdepartment:
        $ref: '#/definitions/Department4'
      manager:
        $ref: '#/definitions/ListedUser'
    type: object
  Department4:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parentid:
        type: integer
        description: ''
      manager:
        $ref: '#/definitions/ListedUser'
    type: object
  UserSetting:
    required:
      - key
      - value
    properties:
      id:
        type: integer
        description: ''
      key:
        type: string
        description: ''
      value:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
    x-mask: '{key,value}'
    type: object
  Role:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
    type: object
  Page of users:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/User'
        type: object
  UpdateUser:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      surname:
        type: string
        description: ''
      email:
        type: string
        description: ''
      language:
        type: string
        description: ''
      startpage:
        type: integer
        description: DEPRECATED
      active:
        type: integer
        description: ''
      phone:
        type: string
        description: ''
      cellphone:
        type: string
        description: ''
      title:
        type: string
        description: ''
      presentation:
        type: string
        description: ''
      avatar_b64:
        type: string
        description: ''
      photo_b64:
        type: string
        description: ''
      departments:
        type: array
        items:
          $ref: '#/definitions/Department1'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  MyUser:
    properties:
      active:
        type: integer
        description: ''
      cellphone:
        type: string
        description: ''
      customerid:
        type: integer
        description: ''
      departments:
        type: array
        items:
          $ref: '#/definitions/Department1'
      email:
        type: string
        description: ''
      emailsettings:
        $ref: '#/definitions/UserEmailSetting'
      id:
        type: integer
        description: ''
      language:
        type: string
        description: ''
      lastactive:
        type: object
      name:
        type: string
        description: ''
      phone:
        type: string
        description: ''
      presentation:
        type: string
        description: ''
      properties:
        $ref: '#/definitions/UserProperty'
      settings:
        type: array
        items:
          $ref: '#/definitions/UserSetting'
      startpage:
        type: integer
        description: DEPRECATED
      surname:
        type: string
        description: ''
      title:
        type: string
        description: ''
      avatar_b64:
        type: string
        description: ''
      photo_b64:
        type: string
        description: ''
    type: object
  UserEmailSetting:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      email:
        type: string
        description: ''
      name:
        type: string
        description: ''
      username:
        type: string
        description: ''
      password:
        type: string
        description: ''
      port:
        type: string
        description: ''
      authtype:
        type: integer
        description: ''
      incominserver:
        type: string
        description: ''
      smtpserver:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
      signature:
        type: string
        description: ''
      defaultemailtype:
        type: integer
        description: ''
    x-mask: >-
      {id,email,name,username,port,authtype,incominserver,smtpserver,userid,signature,defaultemailtype}
    type: object
  UserProperty:
    properties:
      userid:
        type: integer
        description: ''
      licenceadmin:
        type: integer
        description: ''
      elevatedaccount:
        type: integer
        description: ''
      salescoach:
        type: integer
        description: ''
      crmversion:
        type: number
        description: ''
    type: object
  Department:
    required:
      - id
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      parent:
        $ref: '#/definitions/Department4'
      manager:
        $ref: '#/definitions/ListedUser'
      users:
        type: array
        items:
          $ref: '#/definitions/ListedUser'
    type: object
  Page of departments:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Department'
        type: object
  Page of roles:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Role'
        type: object
  Page of budgets:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/UserBudget'
        type: object
  UserBudget:
    properties:
      id:
        type: integer
      userid:
        type: integer
      year:
        type: integer
      month:
        type: integer
      budget:
        type: integer
      pipeline:
        type: integer
      weeks:
        type: array
        items:
          $ref: '#/definitions/UserBudgetWeek'
    type: object
  UserBudgetWeek:
    properties:
      week:
        type: string
      budget:
        type: integer
      pipeline:
        type: integer
      days:
        type: array
        items:
          $ref: '#/definitions/UserBudgetDay'
    type: object
  UserBudgetDay:
    properties:
      day:
        type: string
      budget:
        type: integer
      pipeline:
        type: integer
    type: object
  UpdateUserBudget:
    properties:
      budget:
        type: integer
      pipeline:
        type: integer
    type: object
  Page of kpis:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Kpi'
        type: object
  Kpi:
    properties:
      id:
        type: integer
        description: ''
      title:
        type: string
        description: ''
      type:
        type: string
        description: ''
      subtitle:
        type: string
        description: ''
      value:
        type: string
        description: ''
      period:
        type: string
        description: ''
      average:
        type: string
        description: ''
    type: object
  OrderStatus:
    required:
      - name
      - step
    properties:
      id:
        type: integer
        description: ''
      default:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      step:
        type: integer
        description: ''
    type: object
  Page of orderstatus:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/OrderStatus'
        type: object
  UpdateMission:
    properties:
      name:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      description:
        type: string
        description: ''
      startdate:
        type: string
        format: date
        description: Date 'YYYY-MM-DD' for when the Mission starts
        example: '1985-11-17'
      enddate:
        type: string
        format: date
        description: Date 'YYYY-MM-DD' for when the Mission ends
        example: '2010-03-15'
      script:
        type: string
        description: ''
      pdf:
        type: string
        description: ''
      video:
        type: string
        description: ''
      terms:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
      typeid:
        type: integer
        description: ''
    type: object
  Page of missions:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/MissionConnection'
        type: object
  MissionConnection:
    properties:
      type:
        type: string
        description: ''
      connectid:
        type: integer
        description: ''
      result:
        type: integer
        description: ''
      tscreated:
        type: string
        format: date-time
        description: ''
      tsupdated:
        type: string
        format: date-time
        description: ''
    type: object
  Mission:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      description:
        type: string
        description: ''
      startdate:
        type: string
        format: date
        description: Date 'YYYY-MM-DD' for when the Mission starts
        example: '1985-11-17'
      enddate:
        type: string
        format: date
        description: Date 'YYYY-MM-DD' for when the Mission ends
        example: '2010-03-15'
      active:
        type: integer
        description: ''
      script:
        type: string
        description: ''
      pdf:
        type: string
        description: ''
      video:
        type: string
        description: ''
      terms:
        type: string
        description: ''
      userid:
        type: integer
        description: ''
      typeid:
        type: integer
        description: ''
    type: object
  Page of mission activity connections:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/MissionActivityConnection'
        type: object
  MissionActivityConnection:
    allOf:
      - $ref: '#/definitions/MissionConnection'
      - properties:
          activity:
            $ref: '#/definitions/ListedActivity'
        type: object
  Page of mission progress:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/MissionProgress'
          totalactive:
            type: integer
            description: This field has been deprecated in favor of totalcompleted.
          totalcompleted:
            type: integer
        type: object
  MissionProgress:
    properties:
      account:
        $ref: '#/definitions/ListedAccount'
      activity:
        $ref: '#/definitions/ListedActivity'
      accountid:
        type: integer
      accountname:
        type: string
      lastactivity:
        type: string
        format: date-time
      completed:
        type: boolean
    type: object
  CreateContract:
    required:
      - contact
      - end
      - number
      - reminderdays
      - responsible
      - start
    properties:
      number:
        type: string
      number2:
        type:
          - string
          - 'null'
        example: nullable string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      status:
        $ref: '#/definitions/IdObject'
      start:
        type: string
        format: date-time
      end:
        type: string
        format: date-time
      installdate:
        type:
          - string
          - 'null'
        format: date-time
      value:
        type: number
      financed:
        type: integer
      financeaccount:
        $ref: '#/definitions/IdObject'
      type:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      responsible:
        $ref: '#/definitions/IdObject'
      responsibleservice:
        $ref: '#/definitions/IdObject'
      reminderdays:
        type: integer
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
    type: object
  Page of contracts:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Contract'
        type: object
  Contract:
    properties:
      id:
        type: integer
      number:
        type:
          - string
          - 'null'
        example: nullable string
      number2:
        type:
          - string
          - 'null'
        example: nullable string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      status:
        $ref: '#/definitions/ObjectCategory'
      start:
        type: string
        format: date-time
      end:
        type: string
        format: date-time
      installdate:
        type: string
        format: date-time
      value:
        type:
          - number
          - 'null'
        example: nullable number
      financed:
        type:
          - integer
          - 'null'
        example: 0
      financeaccount:
        $ref: '#/definitions/ListedAccount'
      type:
        $ref: '#/definitions/ObjectCategory'
      contact:
        $ref: '#/definitions/ListedContact'
      responsible:
        $ref: '#/definitions/ListedUser'
      responsibleservice:
        $ref: '#/definitions/ListedUser'
      reminderdays:
        type:
          - integer
          - 'null'
        example: 0
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
    type: object
  ObjectCategory:
    properties:
      id:
        type: integer
      type:
        type:
          - string
          - 'null'
        example: nullable string
      name:
        type:
          - string
          - 'null'
        example: nullable string
      sort:
        type: integer
      default:
        type: integer
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  UpdateContract:
    properties:
      number:
        type:
          - string
          - 'null'
        example: nullable string
      number2:
        type:
          - string
          - 'null'
        example: nullable string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      status:
        $ref: '#/definitions/IdObject'
      start:
        type: string
        format: date-time
      end:
        type: string
        format: date-time
      installdate:
        type:
          - string
          - 'null'
        format: date-time
      value:
        type:
          - number
          - 'null'
        example: nullable number
      financed:
        type:
          - integer
          - 'null'
        example: 0
      financeaccount:
        anyOf:
          - $ref: '#/definitions/IdObject'
          - type:
              - object
              - 'null'
      type:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      responsible:
        anyOf:
          - $ref: '#/definitions/IdObject'
          - type:
              - object
              - 'null'
      responsibleservice:
        anyOf:
          - $ref: '#/definitions/IdObject'
          - type:
              - object
              - 'null'
      reminderdays:
        type:
          - integer
          - 'null'
        example: 0
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
    type: object
  Page of contract-object links:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ContractObject'
        type: object
  ContractObject:
    properties:
      contractid:
        type: integer
      objectid:
        type: integer
      location:
        type:
          - string
          - 'null'
        example: nullable string
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  UpdateContractObject:
    properties:
      location:
        type:
          - string
          - 'null'
        example: nullable string
    type: object
  Page of contract reminders:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ContractReminder'
        type: object
  ContractReminder:
    properties:
      activityid:
        type: integer
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  CreateObject:
    required:
      - manufacturer
      - name
    properties:
      name:
        type: string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      serialnumber:
        type:
          - string
          - 'null'
        example: nullable string
      manufacturer:
        $ref: '#/definitions/IdObject'
      modelgroup:
        $ref: '#/definitions/IdObject'
      url:
        type:
          - string
          - 'null'
        example: nullable string
      image1:
        type:
          - string
          - 'null'
        example: nullable string
      image2:
        type:
          - string
          - 'null'
        example: nullable string
      image3:
        type:
          - string
          - 'null'
        example: nullable string
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of objects:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Object'
        type: object
  Object:
    properties:
      id:
        type: integer
      name:
        type:
          - string
          - 'null'
        example: nullable string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      serialnumber:
        type:
          - string
          - 'null'
        example: nullable string
      manufacturer:
        $ref: '#/definitions/ListedAccount'
      modelgroup:
        $ref: '#/definitions/ObjectCategory'
      url:
        type:
          - string
          - 'null'
        example: nullable string
      image1:
        type:
          - string
          - 'null'
        example: nullable string
      image2:
        type:
          - string
          - 'null'
        example: nullable string
      image3:
        type:
          - string
          - 'null'
        example: nullable string
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  UpdateObjet:
    properties:
      name:
        type:
          - string
          - 'null'
        example: nullable string
      description:
        type:
          - string
          - 'null'
        example: nullable string
      serialnumber:
        type:
          - string
          - 'null'
        example: nullable string
      manufacturer:
        $ref: '#/definitions/IdObject'
      modelgroup:
        $ref: '#/definitions/IdObject'
      url:
        type:
          - string
          - 'null'
        example: nullable string
      image1:
        type:
          - string
          - 'null'
        example: nullable string
      image2:
        type:
          - string
          - 'null'
        example: nullable string
      image3:
        type:
          - string
          - 'null'
        example: nullable string
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  CreateObjectCategory:
    required:
      - name
      - type
    properties:
      type:
        type: string
      name:
        type:
          - string
          - 'null'
        example: nullable string
      sort:
        type: integer
      default:
        type: integer
    type: object
  Page of object categories:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ObjectCategory'
        type: object
  UpdateObjectCategory:
    properties:
      type:
        type: string
      name:
        type:
          - string
          - 'null'
        example: nullable string
      sort:
        type: integer
      default:
        type: integer
    type: object
  Page of object relations:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/ObjectRelation'
        type: object
  ObjectRelation:
    properties:
      type:
        type: string
      objectid:
        type: integer
      otherid:
        type: integer
    type: object
  Settings:
    properties:
      currency:
        type:
          - string
          - 'null'
        example: nullable string
      portal:
        $ref: '#/definitions/PortalSettings'
      sales:
        $ref: '#/definitions/SalesSettings'
      fieldsales:
        $ref: '#/definitions/FieldsalesSettings'
      consent:
        $ref: '#/definitions/ConsentSettings'
    type: object
  PortalSettings:
    properties:
      name:
        type: string
      street:
        type: string
      zip:
        type: string
      city:
        type: string
      country:
        type: string
      phone:
        type: string
      fax:
        type: string
      email:
        type: string
      plusgiro:
        type: string
      bankgiro:
        type: string
      vatnumber:
        type: string
      vatregnumber:
        type: string
      url:
        type: string
      iban:
        type:
          - string
          - 'null'
        example: nullable string
      swift:
        type:
          - string
          - 'null'
        example: nullable string
      seat:
        type:
          - string
          - 'null'
        example: nullable string
    type: object
  SalesSettings:
    properties:
      defaultinterest:
        type: number
    type: object
  FieldsalesSettings:
    properties:
      activitytypes:
        $ref: '#/definitions/FieldsalesSettingsActivityTypes'
      numberporting:
        $ref: '#/definitions/FieldsalesSettingsNumberporting'
      filter:
        type: integer
      headlines:
        type: array
        items:
          $ref: '#/definitions/FieldsalesHeadline'
      erpurl:
        type: string
      signaturefields:
        type: array
        items:
          type: integer
      terms:
        type: string
    type: object
  FieldsalesSettingsActivityTypes:
    properties:
      assigned:
        type:
          - integer
          - 'null'
        example: 0
      knock:
        type:
          - integer
          - 'null'
        example: 0
      note:
        type:
          - integer
          - 'null'
        example: 0
      return:
        type:
          - integer
          - 'null'
        example: 0
      notavailable:
        type:
          - integer
          - 'null'
        example: 0
      rejected:
        type:
          - integer
          - 'null'
        example: 0
      erpaccepted:
        type:
          - integer
          - 'null'
        example: 0
      erpdeclined:
        type:
          - integer
          - 'null'
        example: 0
    type: object
  FieldsalesSettingsNumberporting:
    properties:
      group:
        type:
          - integer
          - 'null'
        example: 0
      name:
        type:
          - integer
          - 'null'
        example: 0
      number:
        type:
          - integer
          - 'null'
        example: 0
      phone:
        type:
          - integer
          - 'null'
        example: 0
    type: object
  FieldsalesHeadline:
    properties:
      title:
        type: string
      body:
        type: string
    type: object
  ConsentSettings:
    properties:
      logofileid:
        type: integer
      email:
        $ref: '#/definitions/ConsentEmailSettings'
    type: object
  ConsentEmailSettings:
    properties:
      fromemail:
        type: string
      fromname:
        type: string
      user:
        type: string
      port:
        type: string
      server:
        type: string
      body:
        type: string
      password:
        type: string
      auth:
        type: integer
      userid:
        type: integer
      type:
        type: integer
    type: object
  Page of addons:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Addon'
        type: object
  Addon:
    properties:
      id:
        type: integer
      title:
        type: string
      url:
        type: string
      internalname:
        type: string
      sort:
        type: integer
      enabled:
        type: boolean
      parameters:
        type: array
        items:
          $ref: '#/definitions/AddonProperty'
    type: object
  AddonProperty:
    properties:
      id:
        type: integer
      name:
        type: string
      value:
        type: string
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  CreateTag:
    required:
      - name
      - type
    properties:
      name:
        type: string
      type:
        type: string
        example: company
        enum:
          - company
          - contact
          - opportunity
          - project
          - lead
          - order
          - quote
          - article
          - orderrow
          - quoterow
          - activity
          - object
          - user
          - template
    type: object
  Page of tags:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Tag'
        type: object
  UpdateTag:
    properties:
      name:
        type: string
    type: object
  BankIdSignUpdate:
    properties:
      nonce:
        type: string
      status:
        type: string
      hintcode:
        type: string
      orderref:
        type: string
      completiondata:
        type: string
      errorcode:
        type: string
    type: object
  CreateBankIdSignRelation:
    required:
      - otherid
      - signature
      - type
    properties:
      signature:
        type: integer
      type:
        type: string
      otherid:
        type: integer
    type: object
  Page of bankid relations:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/BankIdSignRelation'
        type: object
  BankIdSignRelation:
    required:
      - id
      - otherid
      - signature
      - type
    properties:
      id:
        type: integer
      signature:
        type: integer
      type:
        type: string
      otherid:
        type: integer
      created:
        type: string
        format: date-time
      updated:
        type: string
        format: date-time
    type: object
  CreateQuote:
    required:
      - account
      - contact
      - deliveryterm
      - deliverytype
      - paymentterm
      - placedate
      - status
      - user
    properties:
      placedate:
        type: string
        format: date
        description: Date for when the quote was placed
        example: '2019-01-25'
      status:
        $ref: '#/definitions/IdObject'
      deliveryterm:
        $ref: '#/definitions/IdObject'
      paymentterm:
        $ref: '#/definitions/IdObject'
      deliverytype:
        $ref: '#/definitions/IdObject'
      account:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      user:
        $ref: '#/definitions/IdObject'
      user2:
        $ref: '#/definitions/IdObject'
      opportunity:
        $ref: '#/definitions/IdObject'
      validtodate:
        type: string
        format: date
        description: Last date the quote is valid (inclusive)
        example: '2019-01-25'
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      statisticsprice:
        type: number
      alternativevalue:
        type: number
      alternateid:
        type: string
      externalcomment:
        type: string
      deliverydate:
        type: string
        format: date
        description: Date for when the quote will be delivered
        example: '2019-01-25'
      deliveryname:
        type: string
      deliverystreet:
        type: string
      deliveryzip:
        type: string
      deliverycity:
        type: string
      deliverycountry:
        type: string
      externalkey:
        type: string
      internalcomment:
        type: string
      marking:
        type: string
      referencecode:
        type: string
      extracode:
        type: string
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      rows:
        type: array
        items:
          $ref: '#/definitions/QuoteRow'
    type: object
  QuoteRow:
    properties:
      id:
        type: integer
      quoteid:
        type: integer
      alternateid:
        type: string
      quantity:
        type: number
      discountspecial:
        type: number
      sortorder:
        type: integer
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      statisticsprice:
        type: number
      alternativevalue:
        type: number
      buyprice:
        type: number
      specification:
        type: string
      discountpercent:
        type: number
      discountamount:
        type: number
      costcenter:
        type: string
      externalkey:
        type:
          - string
          - 'null'
        example: nullable string
      pricewarning:
        type: integer
        description: indicates that the quantity is not part of the pricegroup
      totalprice:
        type: number
      totalpricestatistics:
        type: number
      totalalternativevalue:
        type: number
      pricelist:
        description: >-
          Indicates if the quoterow is placed against a pricelist. Depending on
          configuration of Cirrus this field may be mandatory
        allOf:
          - $ref: '#/definitions/PriceList'
      pricegroup:
        description: >-
          Indicates if the quoterow is placed against a pricegroup from a
          pricelist. Depending on configuration of Cirrus this field may be
          mandatory
        allOf:
          - $ref: '#/definitions/PriceGroup'
      article:
        $ref: '#/definitions/ListedArticle'
      articleunit:
        $ref: '#/definitions/ListedArticleUnit'
      sortgroup:
        type: integer
        description: ''
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  Page of quotes:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Quote'
        type: object
  Quote:
    required:
      - alternativevalue
      - buyprice
      - currencyrate
      - discounted
      - externalcomment
      - placedate
      - price
      - validtodate
    properties:
      id:
        type: integer
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      alternativevalue:
        type: number
      buyprice:
        type: number
      discounted:
        type: boolean
      placedate:
        type: string
        format: date
        description: Date for when the quote was placed
        example: '2019-01-25'
      validtodate:
        type: string
        format: date
        description: Last day the quote is valid (inclusive)
        example: '2019-01-25'
      alternateid:
        type: string
      externalcomment:
        type: string
      deliverydate:
        type: string
        format: date
        description: Date for when the quote will be delivered
        example: '2019-01-25'
      deliveryname:
        type: string
      deliverystreet:
        type: string
      deliveryzip:
        type: string
      deliverycity:
        type: string
      deliverycountry:
        type: string
      externalkey:
        type: string
      internalcomment:
        type: string
      marking:
        type: string
      referencecode:
        type: string
      extracode:
        type: string
      pricelist:
        description: >-
          Indicates if the quote is placed against a pricelist. Depending on
          configuration of Cirrus this field may be mandatory
        allOf:
          - $ref: '#/definitions/PriceList'
      tscreated:
        type: string
        format: date-time
      tsupdated:
        type: string
        format: date-time
      status:
        $ref: '#/definitions/QuoteStatus'
      deliveryterm:
        $ref: '#/definitions/Deliveryterm'
      paymentterm:
        $ref: '#/definitions/Paymentterm'
      deliverytype:
        $ref: '#/definitions/Deliverytype'
      user:
        $ref: '#/definitions/ListedUser'
      user2:
        $ref: '#/definitions/ListedUser'
      account:
        $ref: '#/definitions/ListedAccount'
      contact:
        $ref: '#/definitions/ListedContact'
      opportunity:
        $ref: '#/definitions/ListedOpportunity'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
      rows:
        type: array
        items:
          $ref: '#/definitions/QuoteRow'
    type: object
  QuoteStatus:
    required:
      - id
    properties:
      id:
        type: integer
      name:
        type: string
      sortorder:
        type: integer
      isdefault:
        type: integer
      metatype:
        type: string
      tscreated:
        type: string
        format: date-time
      tsupdated:
        type: string
        format: date-time
    type: object
  UpdateQuote:
    properties:
      price:
        type: number
      currencycode:
        type: string
      currencyrate:
        type: number
      statisticsprice:
        type: number
      alternativevalue:
        type: number
      buyprice:
        type: number
      discounted:
        type: boolean
      placedate:
        type: string
        format: date
        description: Date for when the quote was placed
        example: '2019-01-25'
      validtodate:
        type: string
        format: date
        description: Last date the quote is valid (inclusive)
        example: '2019-01-25'
      alternateid:
        type: string
      externalcomment:
        type: string
      deliverydate:
        type: string
        format: date
        description: Date for when the quote will be delivered
        example: '2019-01-25'
      deliveryname:
        type: string
      deliverystreet:
        type: string
      deliveryzip:
        type: string
      deliverycity:
        type: string
      deliverycountry:
        type: string
      externalkey:
        type: string
      internalcomment:
        type: string
      marking:
        type: string
      referencecode:
        type: string
      extracode:
        type: string
      user:
        $ref: '#/definitions/IdObject'
      user2:
        $ref: '#/definitions/IdObject'
      account:
        $ref: '#/definitions/IdObject'
      contact:
        $ref: '#/definitions/IdObject'
      opportunity:
        $ref: '#/definitions/IdObject'
      status:
        $ref: '#/definitions/IdObject'
      deliveryterm:
        $ref: '#/definitions/IdObject'
      paymentterm:
        $ref: '#/definitions/IdObject'
      deliverytype:
        $ref: '#/definitions/IdObject'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      rows:
        type: array
        items:
          $ref: '#/definitions/QuoteRow'
    type: object
  CreateQuoteRelation:
    required:
      - otherid
      - quoteid
      - type
    properties:
      quoteid:
        type: integer
      type:
        type: string
      otherid:
        type: integer
      value:
        type: string
    type: object
  Page of quote relations:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/QuoteRelation'
        type: object
  QuoteRelation:
    required:
      - id
      - otherid
      - quoteid
      - type
      - value
    properties:
      id:
        type: integer
      quoteid:
        type: integer
      otherid:
        type: integer
      type:
        type: string
      value:
        type: string
    type: object
  CreateQuoteStatus:
    required:
      - name
    properties:
      name:
        type: string
      sortorder:
        type: integer
      isdefault:
        type: integer
      metatype:
        type: string
    type: object
  Page of quote statuses:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/QuoteStatus'
        type: object
  UpdateQuoteStatus:
    properties:
      name:
        type: string
      sortorder:
        type: integer
      isdefault:
        type: integer
      metatype:
        type: string
    type: object
  Page of emails:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Email'
        type: object
  Email:
    required:
      - body
      - cc
      - subject
      - text
      - to
    properties:
      id:
        type: integer
        description: The unique identifier of an email
      sender:
        type: string
        description: Sender of email.
      to:
        type: array
        description: List of recipients.
        items:
          type: string
      cc:
        type: array
        description: List of recipients.
        items:
          type: string
      subject:
        type: string
        description: Subject of the email.
      date:
        type: string
        format: date-time
        description: The time when the email was stored.
        example: '2019-01-25T00:00:00.000Z'
      body:
        type: string
        description: The body of the email.
      text:
        type: string
        description: The body of the email.
    type: object
  CreateSortGroup:
    required:
      - name
      - sort
    properties:
      name:
        type: string
      sort:
        type: integer
      externalkey:
        type: string
    type: object
  Page of sortgroups:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/SortGroup'
        type: object
  SortGroup:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
      externalkey:
        type: string
    type: object
  UpdateSortGroup:
    properties:
      name:
        type: string
      sort:
        type: integer
        description: ''
      externalkey:
        type: string
    type: object
  CreateTemplate:
    required:
      - name
      - resource
    properties:
      name:
        type: string
        description: ''
      resource:
        type: string
        description: ''
      html:
        type: string
        description: ''
      url:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      languages:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      categories:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  Page of templates:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Template'
        type: object
  Template:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      description:
        type: string
        description: ''
      resource:
        type: string
        description: ''
      html:
        type: string
        description: ''
      url:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      languages:
        type: array
        items:
          $ref: '#/definitions/TemplateLanguage'
      categories:
        type: array
        items:
          $ref: '#/definitions/TemplateCategory'
      tags:
        type: array
        items:
          $ref: '#/definitions/Tag'
    type: object
  TemplateLanguage:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  TemplateCategory:
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  UpdateTemplate:
    properties:
      name:
        type: string
        description: ''
      resource:
        type: string
        description: ''
      html:
        type: string
        description: ''
      url:
        type: string
        description: ''
      active:
        type: integer
        description: ''
      languages:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      categories:
        type: array
        items:
          $ref: '#/definitions/IdObject'
      tags:
        type: array
        items:
          $ref: '#/definitions/IdObject'
    type: object
  CreateTemplateLanguage:
    required:
      - name
    properties:
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  Page of template langages:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/TemplateLanguage'
        type: object
  UpdateTemplateLanguage:
    properties:
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  CreateTemplateCategory:
    required:
      - name
    properties:
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  Page of template categories:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/TemplateCategory'
        type: object
  UpdateTemplateCategory:
    properties:
      name:
        type: string
        description: ''
      sort:
        type: integer
        description: ''
    type: object
  CreateSubscription:
    properties:
      id:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      note:
        type: string
        description: ''
      startdate:
        type: string
        description: ''
      orderstartdate:
        type: string
        description: ''
      typeid:
        type: integer
        description: ''
      statusid:
        type: integer
        description: ''
      intervalid:
        type: integer
        description: ''
      periodid:
        type: integer
        description: ''
      nextperiodid:
        type: integer
        description: ''
      renewalperiodid:
        type: integer
        description: ''
      renewalid:
        type: integer
        description: ''
      advanceid:
        type: integer
        description: ''
      parentid:
        type: integer
        description: ''
      userid:
        type: integer
        description: ''
      contactid:
        type: integer
        description: ''
    type: object
  Page of subscriptions:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Subscription'
        type: object
  Subscription:
    properties:
      id:
        type: integer
        description: ''
      active:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      note:
        type: string
        description: ''
      startdate:
        type: string
        description: ''
      orderstartdate:
        type: string
        description: ''
      typeid:
        type: integer
        description: ''
      statusid:
        type: integer
        description: ''
      intervalid:
        type: integer
        description: ''
      periodid:
        type: integer
        description: ''
      nextperiodid:
        type: integer
        description: ''
      renewalperiodid:
        type: integer
        description: ''
      renewalid:
        type: integer
        description: ''
      advanceid:
        type: integer
        description: ''
      parentid:
        type: integer
        description: ''
      userid:
        type: integer
        description: ''
      contactid:
        type: integer
        description: ''
    type: object
  UpdateSubscription:
    properties:
      name:
        type: string
      sort:
        type: integer
        description: ''
      externalkey:
        type: string
    type: object
  Page of projects:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/Project'
        type: object
  Project:
    properties:
      id:
        type: integer
      name:
        type: string
      type:
        $ref: '#/definitions/ListedProjectType'
    type: object
  ListedProjectType:
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  LeadStatus:
    required:
      - name
      - sortorder
    properties:
      id:
        type: integer
        description: ''
      name:
        type: string
        description: ''
      sortorder:
        type: integer
        description: ''
    type: object
  Page of leadstatus:
    allOf:
      - $ref: '#/definitions/A page of results'
      - properties:
          items:
            type: array
            items:
              $ref: '#/definitions/LeadStatus'
        type: object
responses:
  ParseError:
    description: When a mask can't be parsed
  MaskError:
    description: When any error occurs on mask
  NoResultFound:
    description: >-
      when a requested resource or one of it's dependencies could not be found,
      returned with a 404 status code
  MarshallingError:
    description: >-
      when a requested resource or one of it's dependencies can not be
      marshalled to it's specified JSON object, returned with a 422 status code
host: api.careofcrm.com
schemes:
  - https
