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.create({
name: 'Customer Rating',
objectTypes: ['customer'],
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.create(
name="Customer Rating",
object_types=["customer"],
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 \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Rating",
"objectTypes": [
"customer"
],
"ownerId": "0",
"type": "string_255_type"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions",
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' => 'Customer Rating',
'objectTypes' => [
'customer'
],
'ownerId' => '0',
'type' => 'string_255_type'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\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")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions")
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\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\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"
}Create a custom field definition
Creates a custom field and assigns it to the types of records you list. To give it a value on a record, use the set-custom-fields endpoint of that record’s type.
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.create({
name: 'Customer Rating',
objectTypes: ['customer'],
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.create(
name="Customer Rating",
object_types=["customer"],
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 \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Rating",
"objectTypes": [
"customer"
],
"ownerId": "0",
"type": "string_255_type"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions",
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' => 'Customer Rating',
'objectTypes' => [
'customer'
],
'ownerId' => '0',
'type' => 'string_255_type'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\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")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/custom-field-definitions")
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\": \"Customer Rating\",\n \"objectTypes\": [\n \"customer\"\n ],\n \"ownerId\": \"0\",\n \"type\": \"string_255_type\"\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
Body
The types of records the custom field applies to. A public custom field takes either "item" or any of "customer", "vendor", and "employee", and QuickBooks adds transaction types itself, which the returned definition's objectTypes lists: a customer, vendor, or employee custom field applies to those transactions themselves, and an item custom field to their lines. A private custom field takes any of these types.
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 ["customer"]
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 data type of the custom field's values. Defaults to "string_255_type", the only type QuickBooks accepts for a public custom field.
amount_type, date_time_type, integer_type, percent_type, price_type, quantity_type, string_1024_type, string_255_type "string_255_type"
Response
Returns the newly created 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"]

