import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const salesRepresentative = await conductor.qbd.salesRepresentatives.create({
entityId: '80000001-1234567890',
initial: 'JD',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(salesRepresentative.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
)
sales_representative = conductor.qbd.sales_representatives.create(
entity_id="80000001-1234567890",
initial="JD",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(sales_representative.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/sales-representatives \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"initial": "JD",
"entityId": "80000001-1234567890",
"isActive": true
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/sales-representatives",
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([
'initial' => 'JD',
'entityId' => '80000001-1234567890',
'isActive' => true
]),
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/sales-representatives"
payload := strings.NewReader("{\n \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\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/sales-representatives")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/sales-representatives")
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 \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_sales_representative",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"initial": "JD",
"isActive": true,
"entity": {
"id": "80000001-1234567890",
"fullName": "John Doe"
}
}Create a sales representative
Creates a sales representative that references an existing employee, vendor, or other-name record so it can be assigned on sales forms.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const salesRepresentative = await conductor.qbd.salesRepresentatives.create({
entityId: '80000001-1234567890',
initial: 'JD',
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(salesRepresentative.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
)
sales_representative = conductor.qbd.sales_representatives.create(
entity_id="80000001-1234567890",
initial="JD",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(sales_representative.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/sales-representatives \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"initial": "JD",
"entityId": "80000001-1234567890",
"isActive": true
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/sales-representatives",
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([
'initial' => 'JD',
'entityId' => '80000001-1234567890',
'isActive' => true
]),
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/sales-representatives"
payload := strings.NewReader("{\n \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\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/sales-representatives")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/sales-representatives")
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 \"initial\": \"JD\",\n \"entityId\": \"80000001-1234567890\",\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "80000001-1234567890",
"objectType": "qbd_sales_representative",
"createdAt": "2025-01-01T12:34:56.000Z",
"updatedAt": "2025-02-01T12:34:56.000Z",
"revisionNumber": "1721172183",
"initial": "JD",
"isActive": true,
"entity": {
"id": "80000001-1234567890",
"fullName": "John Doe"
}
}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 initials of this sales representative's name.
Maximum length: 5 characters.
5"JD"
The sales representative's corresponding person entity in QuickBooks, stored as either an employee, vendor, or other-name entry.
36"80000001-1234567890"
Indicates whether this sales representative is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
Response
Returns the newly created sales representative.
The unique identifier assigned by QuickBooks to this sales representative. This ID is unique across all sales representatives but not across different QuickBooks object types.
"80000001-1234567890"
The type of object. This value is always "qbd_sales_representative".
"qbd_sales_representative""qbd_sales_representative"
The date and time when this sales representative 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 sales representative 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 sales representative 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 initials of this sales representative's name.
"JD"
Indicates whether this sales representative is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.
true
The sales representative's corresponding person entity in QuickBooks, stored as either an employee, vendor, or other-name entry.
Show child attributes
Show child attributes
{
"id": "80000001-1234567890",
"fullName": "John Doe"
}

