Skip to main content
PUT
Update customer
Send only the fields you want to change. A field that you do not send keeps its stored value. Set is_taxable to false to mark the customer as tax-exempt, or true to make them taxable. Omit the field to leave the current value unchanged. To set a custom field, use its name as the key:
Each item is an object with one key. The key is the name of the custom field, and the value is the value to set. Send null to clear a field. If the name does not match a custom field in your organization, the request fails with 422. If you know the id of the custom field, you can also use the nested shape. You can mix both shapes in one request:
If two custom fields have the same name, a name key cannot tell them apart. Use the nested shape for those fields. Side effects
  • When you send attachments on an update, DualEntry replaces the stored attachment set with the list you send.
  • If an approval workflow matches this request, DualEntry can set record_status back to draft.
Additional validations
  • Fails with 422 when you set allowed_company_ids on a child customer, or when you create a child customer with its own company access.
  • Fails with 422 when you set a default AR account on an intercompany customer.
  • Fails with 422 when the default AR account is not an accounts receivable account in your organization.
  • Fails with 422 when parent_id would create a circular parent relationship.
  • Fails with 422 when you create a customer with customer_type intercompany, or when you change customer_type to or from intercompany.
  • Fails with 422 when you change customer_type from company while the customer has VAT or GST registrations. To clear them, send vat_registration_numbers and gst_registration_numbers as empty lists in the same request.
  • Fails with 422 when the request archives the customer while a recurring template that is not archived uses it.

Authorizations

X-API-KEY
string
header
required

Headers

Idempotency-Key
string

Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.

Maximum string length: 255

Path Parameters

customer_id
integer
required

Body

application/json

Partial update payload for PUT /public/customers/{id}/.

Every field is optional: send only the fields you want to change. Unset fields are left untouched on the existing record. This is the partial-update semantic clients expect from a modern REST API.

gst_registration_numbers
GstRegistrationItemSchema · object[] | null
vat_registration_numbers
VatRegistrationItemSchema · object[] | null
custom_fields
Custom Fields · object[] | null
business_id
string
default:""

Business identifier. Spaces at the ends are removed. An empty value clears the stored identifier.

Maximum string length: 100
date_style
enum<string> | null

Date display style: short, medium, long, or custom. Null means the organization default applies.

Available options:
short,
medium,
long,
custom
date_format_custom
string | null

Day.js / Moment-style date pattern (max 16 chars). Tokens: YYYY, YY, MMMM, MMM, MM, M, DD, D. Separators: / . - , and space. Examples: DD.MM.YYYY, MM/DD/YYYY, YYYY-MM-DD. Not ICU or raw Intl.

Maximum string length: 16
name
string | null
unique_id
string | null
Required string length: 1 - 64
email
string | null
cc
string | null
bcc
string | null
address
string | null
country
string | null
phone
string | null
Maximum string length: 64
Pattern: (?i)^(?:[0-9\s+\-.\(\)]*|[0-9\s+\-.\(\)]+(?:\s*(?:x|ext\.?|extension)\s*\d+))$
website
string | null
full_address
AddressSchemaIn · object | null
shipping_address
AddressSchemaIn · object | null
is_active
boolean | null
record_status
enum<string> | null
Available options:
draft,
posted,
archived
is_taxable
boolean | null

Whether tax is calculated for this customer. Set to false to mark the customer as tax-exempt.

allowed_company_ids
integer[] | null

Company IDs allowed to use this customer. Empty list means global (all companies). Omit or send null to leave unchanged.

default_ar_account_id
integer | null
default_currency
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
YER,
ZAR,
ZMW,
ZWL
term_id
integer | null
parent_id
integer | null
customer_type
enum<string> | null
Available options:
individual,
company,
intercompany
tax_exemption_reason_code
string | null
tax_exemption_reason_code_origin
enum<string> | null
Available options:
AVALARA
tin
string | null

Tax identification number. Set it together with tin_type. Format by type: ein 12-3456789, ssn 123-45-6789, rfc 3 or 4 uppercase letters, a YYMMDD date, 2 uppercase letters or digits, then a digit or A, for example ABC010203XY9. On an update, send an empty string or null to clear it.

Maximum string length: 13
tin_type

Type of tax identification number: ein, ssn, utr, or rfc (Mexico). Set it together with tin. On an update, send an empty string or null to clear it.

Allowed value: ""
default_billable_markup_pct
default_billable_consolidation
enum<string> | null
Available options:
by_line,
consolidated
default_billable_expense_item_id
integer | null
attachments
AttachmentSchemaOut · object[] | null
classification_line_ids
integer[] | null

Classification lines stored on this record.

Response

OK

term_id
integer | null
required
term_name
string
required
created_at
string<date-time>
required

Date and time the record was created

updated_at
string<date-time>
required

Date and time the record was last updated

id
integer
required
address
string
required
country
string
required
name
string
required
unique_id
string | null
required
website
string
required
email
string
required
cc
string
required
bcc
string
required
customer_type
string
required
is_active
boolean
required
phone
string
required
record_status
string
required
is_taxable
boolean
required
default_tax_code
string
required
tax_registration_number
string
required
default_currency
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
YER,
ZAR,
ZMW,
ZWL
full_address
AddressSchemaIn · object | null
required
shipping_address
AddressSchemaIn · object | null
required
attachments
PublicAttachmentSchemaOut · object[]
gst_registration_numbers
GstRegistrationItemSchemaOut · object[]
vat_registration_numbers
VatRegistrationItemSchemaOut · object[]
classification_line_ids
integer[]
custom_fields
CustomFieldValuePairOutputSchema · object[]
created_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

updated_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

approval_status
string | null
next_approvers
ApproverDictSchema · object[] | null
rejected_by
RejectedBySchema · object | null

Schema for rejector information including rejection reason.

date_style
enum<string> | null

Date display style: short, medium, long, or custom. Null means the organization default applies.

Available options:
short,
medium,
long,
custom
date_format_custom
string | null

Day.js / Moment-style date pattern (max 16 chars). Tokens: YYYY, YY, MMMM, MMM, MM, M, DD, D. Separators: / . - , and space. Examples: DD.MM.YYYY, MM/DD/YYYY, YYYY-MM-DD. Not ICU or raw Intl.

Maximum string length: 16
code
string | null
tin
string
default:""

Tax identification number. The value is an empty string when the number is not set.

tin_type
string
default:""

Type of tax identification number: ein, ssn, utr, or rfc (Mexico). The value is an empty string when the type is not set.

business_id
string
default:""
default_ar_account_id
integer | null
parent_id
integer | null
tax_exemption_reason_code
string | null
tax_exemption_reason_code_origin
enum<string> | null
Available options:
AVALARA
default_billable_markup_pct
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
default_billable_consolidation
enum<string> | null
Available options:
by_line,
consolidated
default_billable_expense_item_id
integer | null
company_id
integer | null
company_name
string | null
allowed_company_ids
integer[]
merged_into_id
integer | null

When you merge this customer into another customer, the ID of that customer.

classifications
RecordClassificationsSchemaOut · object[]