import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const customFieldDefinition = await conductor.qbd.customFieldDefinitions.update('Customer Rating', {
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(customFieldDefinition.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
)
custom_field_definition = conductor.qbd.custom_field_definitions.update(
id="Customer Rating",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(custom_field_definition.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": "0",
"name": "Customer Tier",
"addObjectTypes": [
"vendor"
],
"removeObjectTypes": [
"employee"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id}",
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([
'ownerId' => '0',
'name' => 'Customer Tier',
'addObjectTypes' => [
'vendor'
],
'removeObjectTypes' => [
'employee'
]
]),
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/custom-field-definitions/{id}"
payload := strings.NewReader("{\n \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\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/custom-field-definitions/{id}")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id}")
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 \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "Customer Rating",
"objectType": "qbd_custom_field_definition",
"ownerId": "0",
"name": "Customer Rating",
"type": "string_255_type",
"objectTypes": [
"customer",
"invoice",
"sales_order"
],
"isRequiredForListObjects": false,
"isRequiredForTransactions": false,
"format": "Any text"
}Update a custom field definition
Renames a custom field or changes the types of records it applies to. The id in the path is the custom field’s current name.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const customFieldDefinition = await conductor.qbd.customFieldDefinitions.update('Customer Rating', {
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(customFieldDefinition.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
)
custom_field_definition = conductor.qbd.custom_field_definitions.update(
id="Customer Rating",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(custom_field_definition.id)curl --request POST \
--url https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerId": "0",
"name": "Customer Tier",
"addObjectTypes": [
"vendor"
],
"removeObjectTypes": [
"employee"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id}",
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([
'ownerId' => '0',
'name' => 'Customer Tier',
'addObjectTypes' => [
'vendor'
],
'removeObjectTypes' => [
'employee'
]
]),
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/custom-field-definitions/{id}"
payload := strings.NewReader("{\n \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\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/custom-field-definitions/{id}")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions/{id}")
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 \"ownerId\": \"0\",\n \"name\": \"Customer Tier\",\n \"addObjectTypes\": [\n \"vendor\"\n ],\n \"removeObjectTypes\": [\n \"employee\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "Customer Rating",
"objectType": "qbd_custom_field_definition",
"ownerId": "0",
"name": "Customer Rating",
"type": "string_255_type",
"objectTypes": [
"customer",
"invoice",
"sales_order"
],
"isRequiredForListObjects": false,
"isRequiredForTransactions": false,
"format": "Any text"
}Authorizations
Headers
Path Parameters
The id of the custom field definition, which is its name. QuickBooks matches the name without regard to letter case. For a private definition, also send its ownerId; without it, the request acts on the public definition with this name.
31"Customer Rating"
Body
The owner of the custom field. Defaults to "0", the owner of public custom fields, which QuickBooks users define and see. Any other owner is an application's GUID in braces, such as "{6B063959-81B0-4622-85D6-F548C8CCB517}", whose private custom fields appear only in requests that name it.
"0"
The types of records to also apply the custom field to. A public custom field takes only "customer", "vendor", "employee", or "item", and QuickBooks adds the matching transaction types itself.
1account, ar_refund_credit_card, bill, bill_payment_check, bill_payment_credit_card, build_assembly, charge, check, company, credit_card_charge, credit_card_credit, credit_memo, customer, deposit, employee, estimate, inventory_adjustment, invoice, item, item_receipt, journal_entry, other_name, purchase_order, receive_payment, sales_order, sales_receipt, sales_tax_payment_check, vendor, vendor_credit ["vendor"]
The types of records to stop applying the custom field to. A public custom field takes only "customer", "vendor", "employee", or "item", and QuickBooks removes the matching transaction types itself. Removing a type hides the custom field's values on its records without erasing them, and adding the type back with addObjectTypes restores them unchanged.
1account, ar_refund_credit_card, bill, bill_payment_check, bill_payment_credit_card, build_assembly, charge, check, company, credit_card_charge, credit_card_credit, credit_memo, customer, deposit, employee, estimate, inventory_adjustment, invoice, item, item_receipt, journal_entry, other_name, purchase_order, receive_payment, sales_order, sales_receipt, sales_tax_payment_check, vendor, vendor_credit ["employee"]
Response
Returns the updated custom field definition.
The types of records this custom field applies to. For a public custom field, this includes the transaction types QuickBooks adds itself: a customer, vendor, or employee custom field applies to the listed transactions themselves, and an item custom field to their lines.
account, ar_refund_credit_card, bill, bill_payment_check, bill_payment_credit_card, build_assembly, charge, check, company, credit_card_charge, credit_card_credit, credit_memo, customer, deposit, employee, estimate, inventory_adjustment, invoice, item, item_receipt, journal_entry, other_name, purchase_order, receive_payment, sales_order, sales_receipt, sales_tax_payment_check, vendor, vendor_credit ["customer", "invoice", "sales_order"]

