Item
Canonical contract for persisted item payloads.
Identity
product_id
Attributes
Field
Type
Description
connection_id
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.
product_idrequiredidentity
string
Product ID — Provider-native ID for this resource. Backfill stores this as source_id on the canonical record.
namerequired
string
Name
description
string
Description
sku
string
SKU
active
boolean
Active
default:
truetype
string
Type
goodserviceunit_label
string
Unit
is_sold
boolean
Sold
is_purchased
boolean
Purchased
track_inventory
boolean
Track Inventory
unit_price
decimal
Price
purchase_cost
decimal
Cost
quantity_on_hand
decimal
Qty on Hand
reorder_point
decimal
Reorder Point
revenue_account_id
string
Revenue 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.
expense_account_id
string
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.
asset_account_id
string
Asset 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.
cogs_account_id
string
COGS 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.
preferred_vendor_id
string
Preferred Vendor ID — Identifier for the related preferred vendor record.
class_id
string
Class ID — Identifier for the related class record.
subsidiary_id
string
Subsidiary ID — Business entity or subsidiary identifier for multi-entity accounting. Leave blank when the tenant does not use subsidiaries.
locations[]array<object>Locations
location_id
string
Location ID — Identifier for the related location record.
quantity_on_hand
decimal
Quantity on Hand
reorder_point
decimal
Reorder Point
source_system
string
Source — Connector or provider that supplied the record, such as stripe, shopify, qbo, csv_upload, or manual.
metadata
map
default:
%{}TypeScript SDK
Import
Every canonical resource is exposed as a top-level entity global on @backfill-io/sdk.
import { Item } from "@backfill-io/sdk";Create
Pass an object matching ItemCreateInput. Required fields are shown below.
const item = Item.create({
product_id: "product_id_123",
name: "Acme Corp",
});Get and query
Look up a single record by canonical ID, or query with filters and pagination.
const item = Item.get("item_123");
const results = Item.query({
where: { },
orderBy: [{ field: "inserted_at", direction: "desc" }],
limit: 50,
});Update
Partial update — pass only the fields you want to change.
Item.update("item_123", {
// …fields to update
});Delete
Item.delete("item_123");