Vendor

Canonical contract for persisted vendor payloads.

Identity source_id, connection_id

Attributes

Field
Type
Description
id
string
Canonical ID — Backfill canonical record ID assigned after persistence. This is distinct from the source-system ID.
source_idrequiredidentity
string
Source ID — Stable external record ID from the source system. Backfill uses this with source_system and, when present, connection_id for idempotent imports and upserts.
source_system
string
Source System — Connector or provider that supplied the record, such as stripe, shopify, qbo, csv_upload, or manual.
connection_ididentity
string
Connection ID — Backfill tenant connection ID that scopes records to a specific external account, store, realm, or integration instance. It may participate in source identity without being required on every create payload.
namerequired
string
Name
email
string
Email
phone
string
Phone
currency
string
Currency
company_name
string
Company Name
entity_type
string
Entity Type
individualcompany
parent_id
string
Parent ID — Source-system ID of another vendor record that this record rolls up to (e.g. a parent company or master vendor). Leave blank for top-level vendors.
subsidiary_of_id
string
Subsidiary Of ID — Source-system ID of the parent business entity or subsidiary that this vendor belongs to in multi-entity accounting setups. Leave blank when the tenant does not use subsidiaries.
default_expense_account_id
uuid
Default Expense Account ID — Backfill account identifier for a related account record. Use account_id for lookups; account_code is display-only when referring to general ledger accounts and may be absent.
accounts_payable_account_id
uuid
Accounts Payable Account ID — Backfill account identifier for a related account record. Use account_id for lookups; account_code is display-only when referring to general ledger accounts and may be absent.
category_ids
array<string>
Category IDs
payment_terms
string
Payment Terms
payment_method
string
Payment Method
is_1099_eligible
boolean
1099 Eligible
w9_on_file
boolean
W-9 On File
address
object
Address
line1
string
Line 1
line2
string
Line 2
city
string
City
state
string
State
postal_code
string
Postal Code
country
string
Country
country_code
string
Country Code
address_type
string
Address Type
billingshippingmailing
metadata
map
Metadata
billing_address
object
Billing Address
line1
string
Line 1
line2
string
Line 2
city
string
City
state
string
State
postal_code
string
Postal Code
country
string
Country
country_code
string
Country Code
address_type
string
Address Type
billingshippingmailing
metadata
map
Metadata
shipping_address
object
Shipping Address
line1
string
Line 1
line2
string
Line 2
city
string
City
state
string
State
postal_code
string
Postal Code
country
string
Country
country_code
string
Country Code
address_type
string
Address Type
billingshippingmailing
metadata
map
Metadata
contacts[]
array<object>
Contacts
name
string
Name
email
string
Email
phone
string
Phone
title
string
Title
role
string
Role
is_primary
boolean
Primary
metadata
map
Metadata
tax_ids[]
array<object>
Tax IDs — Government-issued tax identifiers for the vendor, such as US EIN, SSN, or ITIN (used for 1099 reporting), or country-specific VAT, GST, or ABN registrations.
type
string
Type — Tax ID kind, such as ein, ssn, itin, vat, gst, abn, or another country-specific identifier.
value
string
Value — Tax identifier value as registered with the issuing authority, for example 12-3456789 for a US EIN.
country
string
Country — ISO 3166-1 alpha-2 country code of the issuing authority, such as US for an EIN or GB for a UK VAT number.
dimensions
map
Dimensions
metadata
map
Metadata
default: %{}

TypeScript SDK

Import

Every canonical resource is exposed as a top-level entity global on @backfill-io/sdk.

import { Vendor } from "@backfill-io/sdk";

Create

Pass an object matching VendorCreateInput. Required fields are shown below.

const vendor = Vendor.create({
  source_id: "source_id_123",
  name: "Acme Corp",
});

Get and query

Look up a single record by canonical ID, or query with filters and pagination.

const vendor = Vendor.get("vendor_123");

const results = Vendor.query({
  where: { },
  orderBy: [{ field: "inserted_at", direction: "desc" }],
  limit: 50,
});

Update

Partial update — pass only the fields you want to change.

Vendor.update("vendor_123", {
  // …fields to update
});

Delete

Vendor.delete("vendor_123");