import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const inventorySite = await conductor.qbd.inventorySites.create({
name: 'Stockroom',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(inventorySite.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
)
inventory_site = conductor.qbd.inventory_sites.create(
name="Stockroom",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(inventory_site.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/inventory-sites \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Stockroom",
"isActive": true,
"parentId": "80000001-1234567890",
"description": "Main Stockroom for Electronics",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/inventory-sites",
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' => 'Stockroom',
'isActive' => true,
'parentId' => '80000001-1234567890',
'description' => 'Main Stockroom for Electronics',
'email' => 'inventory-site@example.com',
'address' => [
'line1' => 'Conductor Labs Inc.',
'line2' => '540 Market St.',
'line3' => 'Suite 100',
'line4' => '',
'line5' => '',
'city' => 'San Francisco',
'state' => 'CA',
'postalCode' => '94110',
'country' => 'United States'
]
]),
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/inventory-sites"
payload := strings.NewReader("{\n \"name\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\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/inventory-sites")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/inventory-sites")
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\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_inventory_site",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"name": "Stockroom",
"isActive": true,
"parent": {
"id": "80000001-1234567890",
"fullName": "Romulus Warehouse:Stockroom"
},
"isDefault": true,
"description": "Main Stockroom for Electronics",
"contact": "Jane Smith",
"phone": "+1-555-123-4567",
"fax": "+1-555-555-1212",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}Create an inventory site
Creates an inventory site for companies using QuickBooks Enterprise with Advanced Inventory.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const inventorySite = await conductor.qbd.inventorySites.create({
name: 'Stockroom',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(inventorySite.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
)
inventory_site = conductor.qbd.inventory_sites.create(
name="Stockroom",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(inventory_site.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/inventory-sites \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Stockroom",
"isActive": true,
"parentId": "80000001-1234567890",
"description": "Main Stockroom for Electronics",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/inventory-sites",
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' => 'Stockroom',
'isActive' => true,
'parentId' => '80000001-1234567890',
'description' => 'Main Stockroom for Electronics',
'email' => 'inventory-site@example.com',
'address' => [
'line1' => 'Conductor Labs Inc.',
'line2' => '540 Market St.',
'line3' => 'Suite 100',
'line4' => '',
'line5' => '',
'city' => 'San Francisco',
'state' => 'CA',
'postalCode' => '94110',
'country' => 'United States'
]
]),
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/inventory-sites"
payload := strings.NewReader("{\n \"name\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\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/inventory-sites")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/inventory-sites")
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\": \"Stockroom\",\n \"isActive\": true,\n \"parentId\": \"80000001-1234567890\",\n \"description\": \"Main Stockroom for Electronics\",\n \"email\": \"inventory-site@example.com\",\n \"address\": {\n \"line1\": \"Conductor Labs Inc.\",\n \"line2\": \"540 Market St.\",\n \"line3\": \"Suite 100\",\n \"line4\": \"\",\n \"line5\": \"\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"postalCode\": \"94110\",\n \"country\": \"United States\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_inventory_site",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"name": "Stockroom",
"isActive": true,
"parent": {
"id": "80000001-1234567890",
"fullName": "Romulus Warehouse:Stockroom"
},
"isDefault": true,
"description": "Main Stockroom for Electronics",
"contact": "Jane Smith",
"phone": "+1-555-123-4567",
"fax": "+1-555-555-1212",
"email": "inventory-site@example.com",
"address": {
"line1": "Conductor Labs Inc.",
"line2": "540 Market St.",
"line3": "Suite 100",
"line4": "",
"line5": "",
"city": "San Francisco",
"state": "CA",
"postalCode": "94110",
"country": "United States"
}
}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 inventory site, unique across all inventory sites.
NOTE: Inventory sites 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"Stockroom"
Indicates whether this inventory site is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
The parent inventory site one level above this one in the hierarchy.
36"80000001-1234567890"
A description of this inventory site.
"Main Stockroom for Electronics"
The inventory site's email address.
"inventory-site@example.com"
The inventory site's address.
Show child attributes
Show child attributes
Response
Returns the newly created inventory site.
The unique identifier assigned by QuickBooks to this inventory site. This ID is unique across all inventory sites but not across different QuickBooks object types.
"80000001-1234567890"
The type of object. This value is always "qbd_inventory_site".
"qbd_inventory_site""qbd_inventory_site"
The date and time when this inventory site 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 inventory site 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 inventory site 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 inventory site, unique across all inventory sites.
NOTE: Inventory sites 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.
"Stockroom"
Indicates whether this inventory site is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
The parent inventory site one level above this one in the hierarchy.
Show child attributes
Show child attributes
{
"id": "80000001-1234567890",
"fullName": "Romulus Warehouse:Stockroom"
}
Indicates whether this inventory site is the default site used when no specific site is provided during the creation of other objects.
true
A description of this inventory site.
"Main Stockroom for Electronics"
The name of the primary contact person for this inventory site.
"Jane Smith"
The inventory site's primary telephone number.
"+1-555-123-4567"
The inventory site's fax number.
"+1-555-555-1212"
The inventory site's email address.
"inventory-site@example.com"
The inventory site's address.
Show child attributes
Show child attributes

