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);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)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weight Units",
"unitOfMeasureType": "count",
"baseUnit": {
"name": "Each",
"abbreviation": "ea"
},
"isActive": true,
"relatedUnits": [
{
"name": "Case",
"abbreviation": "ea",
"conversionRatio": "10"
}
],
"defaultUnits": [
{
"unitUsedFor": "purchase",
"unit": "Each"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Weight Units',
'unitOfMeasureType' => 'count',
'baseUnit' => [
'name' => 'Each',
'abbreviation' => 'ea'
],
'isActive' => true,
'relatedUnits' => [
[
'name' => 'Case',
'abbreviation' => 'ea',
'conversionRatio' => '10'
]
],
'defaultUnits' => [
[
'unitUsedFor' => 'purchase',
'unit' => 'Each'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Conductor-End-User-Id: <conductor-end-user-id>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets"
payload := strings.NewReader("{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Conductor-End-User-Id", "<conductor-end-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Conductor-End-User-Id"] = '<conductor-end-user-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_unit_of_measure_set",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"name": "Weight Units",
"isActive": true,
"unitOfMeasureType": "count",
"baseUnit": {
"name": "Each",
"abbreviation": "ea"
},
"relatedUnits": [
{
"name": "Case",
"abbreviation": "ea",
"conversionRatio": "10"
}
],
"defaultUnits": [
{
"unitUsedFor": "purchase",
"unit": "Each"
}
]
}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.
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);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)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weight Units",
"unitOfMeasureType": "count",
"baseUnit": {
"name": "Each",
"abbreviation": "ea"
},
"isActive": true,
"relatedUnits": [
{
"name": "Case",
"abbreviation": "ea",
"conversionRatio": "10"
}
],
"defaultUnits": [
{
"unitUsedFor": "purchase",
"unit": "Each"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Weight Units',
'unitOfMeasureType' => 'count',
'baseUnit' => [
'name' => 'Each',
'abbreviation' => 'ea'
],
'isActive' => true,
'relatedUnits' => [
[
'name' => 'Case',
'abbreviation' => 'ea',
'conversionRatio' => '10'
]
],
'defaultUnits' => [
[
'unitUsedFor' => 'purchase',
'unit' => 'Each'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Conductor-End-User-Id: <conductor-end-user-id>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets"
payload := strings.NewReader("{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Conductor-End-User-Id", "<conductor-end-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/unit-of-measure-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Conductor-End-User-Id"] = '<conductor-end-user-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Weight Units\",\n \"unitOfMeasureType\": \"count\",\n \"baseUnit\": {\n \"name\": \"Each\",\n \"abbreviation\": \"ea\"\n },\n \"isActive\": true,\n \"relatedUnits\": [\n {\n \"name\": \"Case\",\n \"abbreviation\": \"ea\",\n \"conversionRatio\": \"10\"\n }\n ],\n \"defaultUnits\": [\n {\n \"unitUsedFor\": \"purchase\",\n \"unit\": \"Each\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_unit_of_measure_set",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"name": "Weight Units",
"isActive": true,
"unitOfMeasureType": "count",
"baseUnit": {
"name": "Each",
"abbreviation": "ea"
},
"relatedUnits": [
{
"name": "Case",
"abbreviation": "ea",
"conversionRatio": "10"
}
],
"defaultUnits": [
{
"unitUsedFor": "purchase",
"unit": "Each"
}
]
}Authorizations
Your Conductor secret key using Bearer auth (e.g., "Authorization: Bearer {{YOUR_SECRET_KEY}}").
Headers
The ID of the End-User to receive this request.
"end_usr_1234567abcdefg"
Body
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.
31"Weight Units"
The unit-of-measure set's type. Use "other" for a custom type defined in QuickBooks.
area, count, length, other, time, volume, weight "count"
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.
Show child attributes
Show child attributes
Indicates whether this unit-of-measure set is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
The unit-of-measure set's related units, each specifying how many base units they represent (conversion ratio).
1Show child attributes
Show child attributes
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.
1Show child attributes
Show child attributes
Response
Returns the newly created unit-of-measure set.
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.
"80000001-1234567890"
The type of object. This value is always "qbd_unit_of_measure_set".
"qbd_unit_of_measure_set""qbd_unit_of_measure_set"
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.
"2025-01-01T12:34:56.000Z"
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.
"2025-02-01T12:34:56.000Z"
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.
"1721172183"
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.
"Weight Units"
Indicates whether this unit-of-measure set is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
The unit-of-measure set's type. Use "other" for a custom type defined in QuickBooks.
area, count, length, other, time, volume, weight "count"
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.
Show child attributes
Show child attributes
The unit-of-measure set's related units, each specifying how many base units they represent (conversion ratio).
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes

