> ## Documentation Index
> Fetch the complete documentation index at: https://docs.conductor.is/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an unit-of-measure set

> Creates a new unit-of-measure set.

NOTE: The QuickBooks company file must have unit-of-measure enabled (either a single unit per item or multiple units per item). To support both configurations, prefix all UOM set names with "By the" (for example, "By the Barrel"); otherwise, the set may not appear in the QuickBooks UI when the company file is configured for a single unit per item.



## OpenAPI

````yaml POST /quickbooks-desktop/unit-of-measure-sets
openapi: 3.1.0
info:
  title: Conductor API
  version: 0.0.1
servers:
  - url: https://api.conductor.is/v1
security:
  - BearerAuth: []
paths:
  /quickbooks-desktop/unit-of-measure-sets:
    post:
      summary: Create an unit-of-measure set
      description: >-
        Creates a new unit-of-measure set.


        NOTE: The QuickBooks company file must have unit-of-measure enabled
        (either a single unit per item or multiple units per item). To support
        both configurations, prefix all UOM set names with "By the" (for
        example, "By the Barrel"); otherwise, the set may not appear in the
        QuickBooks UI when the company file is configured for a single unit per
        item.
      parameters:
        - in: header
          name: Conductor-End-User-Id
          description: The ID of the End-User to receive this request.
          schema:
            type: string
            description: The ID of the End-User to receive this request.
            example: end_usr_1234567abcdefg
            x-stainless-naming:
              typescript:
                method_argument: conductorEndUserId
              mcp:
                method_argument: conductorEndUserId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 31
                  description: >-
                    The case-insensitive unique name of this unit-of-measure
                    set, unique across all unit-of-measure sets. To ensure this
                    set appears in the QuickBooks UI for companies configured
                    with a single unit per item, prefix the name with "By the"
                    (e.g., "By the Barrel").


                    **NOTE**: Unit-of-measure sets do not have a `fullName`
                    field because they are not hierarchical objects, which is
                    why `name` is unique for them but not for objects that have
                    parents.


                    Maximum length: 31 characters.
                  example: Weight Units
                isActive:
                  type: boolean
                  description: >-
                    Indicates whether this unit-of-measure set is active.
                    Inactive objects are typically hidden from views and reports
                    in QuickBooks. Defaults to `true`.
                  example: true
                  default: true
                unitOfMeasureType:
                  type: string
                  enum:
                    - area
                    - count
                    - length
                    - other
                    - time
                    - volume
                    - weight
                  description: >-
                    The unit-of-measure set's type. Use "other" for a custom
                    type defined in QuickBooks.
                  example: count
                baseUnit:
                  type: object
                  properties:
                    name:
                      type: string
                      maxLength: 31
                      description: >-
                        The case-insensitive unique name of this base unit,
                        unique across all base units.


                        **NOTE**: Base units do not have a `fullName` field
                        because they are not hierarchical objects, which is why
                        `name` is unique for them but not for objects that have
                        parents.


                        Maximum length: 31 characters.
                      example: Each
                    abbreviation:
                      type: string
                      maxLength: 31
                      description: >-
                        The base unit's short identifier shown in the QuickBooks
                        U/M field on transaction line items.


                        Maximum length: 31 characters.
                      example: ea
                  required:
                    - name
                    - abbreviation
                  additionalProperties: false
                  description: >-
                    The unit-of-measure set's base unit used to track and price
                    item quantities. If the company file is enabled for a single
                    unit of measure per item, the base unit is the only unit
                    available on transaction line items. If enabled for multiple
                    units per item, the base unit is the default unless
                    overridden by the set's default units.
                relatedUnits:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        maxLength: 31
                        description: >-
                          The case-insensitive unique name of this related unit,
                          unique across all related units.


                          **NOTE**: Related units do not have a `fullName` field
                          because they are not hierarchical objects, which is
                          why `name` is unique for them but not for objects that
                          have parents.


                          Maximum length: 31 characters.
                        example: Case
                      abbreviation:
                        type: string
                        maxLength: 31
                        description: >-
                          The related unit's short identifier shown in the
                          QuickBooks U/M field on transaction line items.


                          Maximum length: 31 characters.
                        example: ea
                      conversionRatio:
                        type: string
                        description: >-
                          The number of base units in this related unit,
                          represented as a decimal string. For example, if the
                          base unit is "box" and this related unit is "case"
                          with `conversionRatio` = "10", that means there are 10
                          boxes in one case.
                        example: '10'
                    required:
                      - name
                      - abbreviation
                      - conversionRatio
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The unit-of-measure set's related units, each specifying how
                    many base units they represent (conversion ratio).
                defaultUnits:
                  type: array
                  items:
                    type: object
                    properties:
                      unitUsedFor:
                        type: string
                        enum:
                          - purchase
                          - sales
                          - shipping
                        description: >-
                          Where this default unit is used as the default:
                          purchase line items, sales line items, or shipping
                          lines.
                        example: purchase
                      unit:
                        type: string
                        maxLength: 31
                        description: >-
                          The unit name for this default unit, as displayed in
                          the U/M field. If the company file is enabled for
                          multiple units per item, this appears as an available
                          unit for the item. Must correspond to the base unit or
                          a related unit defined in this set.


                          Maximum length: 31 characters.
                        example: Each
                    required:
                      - unitUsedFor
                      - unit
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The unit-of-measure set's default units to appear in the U/M
                    field on transaction line items. You can specify separate
                    defaults for purchases, sales, and shipping.
              required:
                - name
                - unitOfMeasureType
                - baseUnit
              additionalProperties: false
      responses:
        '200':
          description: Returns the newly created unit-of-measure set.
          headers:
            Conductor-Request-Id:
              schema:
                type: string
                description: The unique identifier for this API request.
                example: req_1234567abcdefg
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/qbd_unit_of_measure_set'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Conductor from 'conductor-node';


            const conductor = new Conductor({
              apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
            });


            const unitOfMeasureSet = await
            conductor.qbd.unitOfMeasureSets.create({
              baseUnit: { abbreviation: 'ea', name: 'Each' },
              name: 'Weight Units',
              unitOfMeasureType: 'count',
              conductorEndUserId: 'end_usr_1234567abcdefg',
            });


            console.log(unitOfMeasureSet.id);
        - lang: Python
          source: |-
            import os
            from conductor import Conductor

            conductor = Conductor(
                api_key=os.environ.get("CONDUCTOR_SECRET_KEY"),  # This is the default and can be omitted
            )
            unit_of_measure_set = conductor.qbd.unit_of_measure_sets.create(
                base_unit={
                    "abbreviation": "ea",
                    "name": "Each",
                },
                name="Weight Units",
                unit_of_measure_type="count",
                conductor_end_user_id="end_usr_1234567abcdefg",
            )
            print(unit_of_measure_set.id)
components:
  schemas:
    qbd_unit_of_measure_set:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this unit-of-measure
            set. This ID is unique across all unit-of-measure sets but not
            across different QuickBooks object types.
          example: 80000001-1234567890
        objectType:
          type: string
          const: qbd_unit_of_measure_set
          description: >-
            The type of object. This value is always
            `"qbd_unit_of_measure_set"`.
          example: qbd_unit_of_measure_set
        createdAt:
          type: string
          description: >-
            The date and time when this unit-of-measure set was created, in ISO
            8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop
            interprets in the local timezone of the end-user's computer.
          example: '2025-01-01T12:34:56.000Z'
        updatedAt:
          type: string
          description: >-
            The date and time when this unit-of-measure set was last updated, in
            ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks
            Desktop interprets in the local timezone of the end-user's computer.
          example: '2025-02-01T12:34:56.000Z'
        revisionNumber:
          type: string
          description: >-
            The current QuickBooks-assigned revision number of this
            unit-of-measure set object, which changes each time the object is
            modified. When updating this object, you must provide the most
            recent `revisionNumber` to ensure you're working with the latest
            data; otherwise, the update will return an error.
          example: '1721172183'
        name:
          type: string
          description: >-
            The case-insensitive unique name of this unit-of-measure set, unique
            across all unit-of-measure sets. To ensure this set appears in the
            QuickBooks UI for companies configured with a single unit per item,
            prefix the name with "By the" (e.g., "By the Barrel").


            **NOTE**: Unit-of-measure sets do not have a `fullName` field
            because they are not hierarchical objects, which is why `name` is
            unique for them but not for objects that have parents.
          example: Weight Units
        isActive:
          type: boolean
          description: >-
            Indicates whether this unit-of-measure set is active. Inactive
            objects are typically hidden from views and reports in QuickBooks.
            Defaults to `true`.
          example: true
        unitOfMeasureType:
          type: string
          enum:
            - area
            - count
            - length
            - other
            - time
            - volume
            - weight
          description: >-
            The unit-of-measure set's type. Use "other" for a custom type
            defined in QuickBooks.
          example: count
        baseUnit:
          type: object
          properties:
            name:
              type: string
              description: >-
                The case-insensitive unique name of this base unit, unique
                across all base units.


                **NOTE**: Base units do not have a `fullName` field because they
                are not hierarchical objects, which is why `name` is unique for
                them but not for objects that have parents.
              example: Each
            abbreviation:
              type: string
              description: >-
                The base unit's short identifier shown in the QuickBooks U/M
                field on transaction line items.
              example: ea
          required:
            - name
            - abbreviation
          additionalProperties: false
          title: The Base Unit object
          x-conductor-object-type: nested
          description: >-
            The unit-of-measure set's base unit used to track and price item
            quantities. If the company file is enabled for a single unit of
            measure per item, the base unit is the only unit available on
            transaction line items. If enabled for multiple units per item, the
            base unit is the default unless overridden by the set's default
            units.
        relatedUnits:
          type: array
          items:
            $ref: '#/components/schemas/qbd_related_unit'
          description: >-
            The unit-of-measure set's related units, each specifying how many
            base units they represent (conversion ratio).
        defaultUnits:
          type: array
          items:
            $ref: '#/components/schemas/qbd_default_unit'
          description: >-
            The unit-of-measure set's default units to appear in the U/M field
            on transaction line items. You can specify separate defaults for
            purchases, sales, and shipping.
      required:
        - id
        - objectType
        - createdAt
        - updatedAt
        - revisionNumber
        - name
        - isActive
        - unitOfMeasureType
        - baseUnit
        - relatedUnits
        - defaultUnits
      additionalProperties: false
      title: The Unit-Of-Measure Set object
      x-conductor-object-type: other
      summary: >-
        A unit-of-measure set (UOM set) defines a base unit and optional related
        units with conversion ratios, plus optional defaults for purchases,
        sales, and shipping.


        NOTE: The QuickBooks company file must have unit-of-measure enabled
        (either a single unit per item or multiple units per item).
    qbd_related_unit:
      type: object
      properties:
        name:
          type: string
          description: >-
            The case-insensitive unique name of this related unit, unique across
            all related units.


            **NOTE**: Related units do not have a `fullName` field because they
            are not hierarchical objects, which is why `name` is unique for them
            but not for objects that have parents.
          example: Case
        abbreviation:
          type: string
          description: >-
            The related unit's short identifier shown in the QuickBooks U/M
            field on transaction line items.
          example: ea
        conversionRatio:
          type: string
          description: >-
            The number of base units in this related unit, represented as a
            decimal string. For example, if the base unit is "box" and this
            related unit is "case" with `conversionRatio` = "10", that means
            there are 10 boxes in one case.
          example: '10'
      required:
        - name
        - abbreviation
        - conversionRatio
      additionalProperties: false
      title: The Related Unit object
      x-conductor-object-type: nested
    qbd_default_unit:
      type: object
      properties:
        unitUsedFor:
          type: string
          enum:
            - purchase
            - sales
            - shipping
          description: >-
            Where this default unit is used as the default: purchase line items,
            sales line items, or shipping lines.
          example: purchase
        unit:
          type: string
          description: >-
            The unit name for this default unit, as displayed in the U/M field.
            If the company file is enabled for multiple units per item, this
            appears as an available unit for the item. Must correspond to the
            base unit or a related unit defined in this set.
          example: Each
      required:
        - unitUsedFor
        - unit
      additionalProperties: false
      title: The Default Unit object
      x-conductor-object-type: nested
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Conductor secret key using Bearer auth (e.g., `"Authorization:
        Bearer {{YOUR_SECRET_KEY}}"`).

````

Built with [Mintlify](https://mintlify.com).