Skip to main content
POST
Create vendor
Side effects
  • If an approval workflow matches this request, DualEntry can set record_status back to draft.
Additional validations
  • Fails with 422 when the default AP account is not an accounts payable account in your organization.
  • Fails with 422 when you create a vendor with vendor_type intercompany, or when you change vendor_type to or from intercompany.

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

Body

application/json
is_active
boolean
required
vendor_type
enum<string>
required
Available options:
individual,
company,
intercompany,
tax_agency
name
string
required
Required string length: 2 - 255
email
string
required
Maximum string length: 128
phone
string
required
Maximum string length: 64
Pattern: (?i)^(?:[0-9\s+\-.\(\)]*|[0-9\s+\-.\(\)]+(?:\s*(?:x|ext\.?|extension)\s*\d+))$
website
string
required
Maximum string length: 128
gst_registration_numbers
GstRegistrationItemSchema · object[] | null
vat_registration_numbers
VatRegistrationItemSchema · object[] | null
custom_fields
Custom Fields · object[] | null
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
is_withholding_tax_applicable
boolean
default:false

Shows that withholding tax applies to this vendor. DualEntry does not apply withholding tax from this value: send withholding_tax_rate_id on each line.

default_withholding_tax_rate_id
integer | null

ID of the withholding tax rate that the app suggests for the lines of this vendor. DualEntry does not copy it to lines that you send through the API.

default_withholding_tax_payable_account_id
integer | null

ID of the liability account that DualEntry uses when a bill or direct expense of this vendor has withholding tax and no withholding_tax_payable_account_id.

withholding_tax_agency_id
integer | null

ID of the vendor with vendor_type tax_agency that receives the withheld amounts. Use it as tax_agency_id on a remittance.

unique_id
string | null
Required string length: 1 - 64
single_address
string | null
default:""
Maximum string length: 2048
country
default:""
Allowed value: ""
is_1099_eligible
boolean
default:false
address
AddressSchemaIn · object | null
tin
string | null
default:""

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
default:""

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: ""
attachments
AttachmentSchemaOut · object[]
record_status
enum<string>
default:posted
Available options:
draft,
posted,
archived
term_id
integer | null
customer_account_number
string
default:""
Maximum string length: 128
name_on_check
string
default:""
Maximum string length: 255
preferred_payment_method_id
integer | null
bank_account_number
string
default:""
Maximum string length: 34
bank_routing_number
string
default:""
Maximum string length: 9
bank_account_type
default:""
Allowed value: ""
default_expense_account_id
integer | null
default_ap_account_id
integer | null
allowed_company_ids
integer[] | null

Company IDs allowed to use this vendor. Empty list means global (all companies).

classification_line_ids
integer[] | null

Classification lines stored on this record.

Response

Created

created_at
string<date-time>
required
updated_at
string<date-time>
required
term_id
integer | null
required
term_name
string
required
preferred_payment_method_id
integer | null
required
preferred_payment_method_name
string
required
id
integer
required
address
AddressSchemaIn · object | null
required
vendor_type
string
required
name
string
required
Maximum string length: 255
gst_registration_numbers
GstRegistrationItemSchemaOut · object[]
vat_registration_numbers
VatRegistrationItemSchemaOut · object[]
classification_line_ids
integer[]
classifications
RecordClassificationsSchemaOut · object[]
custom_fields
CustomFieldValuePairOutputSchema · object[]
attachments
PublicAttachmentSchemaOut · 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
string | null
Maximum string length: 16
date_format_custom
string | null
Maximum string length: 16
is_withholding_tax_applicable
boolean
default:false

Shows that withholding tax applies to this vendor. DualEntry does not apply withholding tax from this value: send withholding_tax_rate_id on each line.

default_withholding_tax_rate_id
integer | null

ID of the withholding tax rate that the app suggests for the lines of this vendor. DualEntry does not copy it to lines that you send through the API.

default_withholding_tax_payable_account_id
integer | null

ID of the liability account that DualEntry uses when a bill or direct expense of this vendor has withholding tax and no withholding_tax_payable_account_id.

withholding_tax_agency_id
integer | null

ID of the vendor with vendor_type tax_agency that receives the withheld amounts. Use it as tax_agency_id on a remittance.

default_withholding_tax_rate
PublicVendorWithholdingTaxRateSchemaOut · object | null

The default withholding tax rate of the vendor, or null.

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.

company_id
integer | null
company_name
string | null
customer_account_number
string
default:""
name_on_check
string
default:""
bank_account_number
string
default:""
bank_routing_number
string
default:""
bank_account_type
default:""
Allowed value: ""
default_expense_account_id
integer | null
default_ap_account_id
integer | null
allowed_company_ids
integer[]
merged_into_id
integer | null

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

single_address
string | null
Maximum string length: 2048
country
default:""
Available options:
AA,
AB,
AC,
AD,
AE,
AF,
AG,
AH,
AI,
AJ,
AK,
AL,
AM,
AN,
AO,
AP,
AQ,
AR,
AS,
AT,
AU,
AV,
AW,
AX,
AY,
AZ,
BA,
BB,
BC,
BD,
BE,
BF,
BG,
BH,
BI,
BJ,
BK,
BL,
BM,
BN,
BO,
BP,
BQ,
BR,
BS,
BT,
BU,
BV,
BW,
BX,
BY,
BZ,
CA,
CB,
CC,
CD,
CE,
CF,
CG,
CH,
CI,
CJ,
CK,
CL,
CM,
CN,
CO,
CP,
CQ,
CR,
CS,
CT,
CU,
CV,
CW,
CX,
CY,
CZ,
DA,
DB,
DC,
DD,
DE,
DF,
DG,
DH,
DI,
DJ,
DK,
DL,
DM,
DN,
DO,
DP,
DQ,
DR,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WW,
WX,
WY,
WZ,
XA,
XB,
XC,
XD,
XE,
XF,
XG,
XH,
XI,
XJ,
XK,
XL,
XM,
XN,
XO,
XP,
XQ,
XR,
XS,
XT,
XU,
XV,
XW,
XX,
XY,
XZ,
YA,
YB,
YC,
YD,
YE,
YF,
YG,
YH,
YI,
YJ,
YK,
YL,
YM,
YN,
YO,
YP,
YQ,
YR,
YS,
YT,
YU,
YV,
YW,
YX,
YY,
YZ,
ZA,
ZB,
ZC,
ZD,
ZE,
ZF,
ZG,
ZH,
ZI,
ZJ,
ZK,
ZL,
ZM,
ZN,
ZO,
ZP,
ZQ,
ZR,
ZS,
ZT,
ZU,
ZV,
ZW,
ZX,
ZY,
ZZ
Maximum string length: 2
unique_id
string | null

External identifier supplied by the user to disambiguate vendors that share a display name (e.g. an ID from another system).

Maximum string length: 64
website
string | null
Maximum string length: 128
email
string | null
Maximum string length: 128
is_active
boolean
default:true
phone
string | null
Maximum string length: 64
is_1099_eligible
boolean
default:false
record_status
enum<string>
default:posted
Available options:
draft,
posted,
archived