Manage Vendor Information on Item Variations

Learn how to set default unit costs, vendors, and vendor codes on catalog item variations with the Catalog API.

Applies to: Catalog API | Inventory API | Vendors API

Link to section

Overview

An item variation's vendor_information describes how the seller purchases that product: which vendors supply it, the usual cost per unit, and the product's identifier in each vendor's system. Square uses this information to prefill purchase orders and as the default cost when inventory movements need one - for example, when a physical count increases the in-stock quantity or when an untracked variation with a default cost is sold.

Note

Reading vendor_information works for any seller; writing it requires the seller to have an active Square for Retail Plus, Square for Restaurants Plus, or Square for Restaurants Premium subscription.

Link to section

The vendor_information field

CatalogItemVariation has a repeated vendor_information field. Each entry contains:

FieldDescription
unit_cost_moneyThe usual amount the seller pays per unit when purchasing from this vendor.
vendor_idOptional. The ID of a vendor managed with the Vendors API. Each entry must reference a different vendor.
vendor_codeOptional. The product's unique identifier (such as a SKU) in the vendor's own system. Used to prefill purchase orders.

Two rules give the list its meaning:

  • The first entry is the default. When Square needs a default cost or vendor for the variation (physical count increases, untracked sales with cost tracking, purchase order prefill), it uses the first entry in the list.
  • An entry can omit vendor_id. A single cost-only entry supports sellers who track what they pay for a product without tracking a vendor. Use this when the seller isn't tracking vendors for the variation - don't combine a vendorless cost entry with vendor-specific entries.
Link to section

Set vendor information on a variation

Write vendor_information as part of the variation in an UpsertCatalogObject (or batch upsert) request:

In this example, the variation can be purchased from two vendors. The first entry is the default: Square uses vendor 5ZW5RVANNKV3B3RB and its $10.50 unit cost when it needs a single default cost or vendor for the variation. The second entry (vendor V6C8QK4M2WX9YB7R at $12.00 per unit) appears on the variation in the Square Dashboard and prefills the unit cost when the seller creates a purchase order for that vendor.

As with other variation fields, the entire vendor_information list is replaced on write. To add or remove an entry, read the variation, modify the list, and upsert it back with the variation's current version.

Link to section

How vendor information connects to inventory

Vendor information supplies defaults; the actual cost of received stock is recorded on inventory adjustments:

  • When your application receives stock with the Inventory API, it can record the actual cost_money and vendor_id on the receiving adjustment. See Track Inventory Costs and Vendors.
  • When Square generates stock-increasing adjustments itself (for example, from a physical count), it uses the variation's default cost.