Create a product variant

Creates a new product variant for the given merchant. If a product-variant
already exists for the provided variant_id, the existing product-variant
is returned without modification. If a variant_id is not provided and a
product-variant already exists for the same SKU & barcode combination
provided, the existing product-variant is returned without modification.
Otherwise, a new product-variant will be created. Metadata is persisted
in the same database transaction as the variant. If a source image URL
is provided, CDN image processing is scheduled asynchronously after creation.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Product variant fields

Request body for creating or upserting a product variant. Optional fields will be set to null unless a default value is otherwise given.

string

Barcode (e.g. UPC/EAN) assigned to this variant by the merchant. Required if sku not provided.

boolean

Whether an expiration date must be recorded when receiving or grading. Default: false. Optional.

boolean

Whether a lot code must be recorded when receiving or grading. Default: false. Optional.

string

Currency used for MSRP pricing, as an ISO 4217 code (e.g. "usd"). Optional.

merchant
object
required

Prevents automated storefront syncs from overwriting this variant's data. Default: false.

metadata
object

Arbitrary key-value pairs attached to this variant. Optional.

number

Manufacturer's suggested retail price in the variant's local Currency. Optional.

string
required

Variant-level display name (e.g. "Blue / Large"). Required.

integer

Days this variant is sellable after being received. Zero means no restriction. Default: 0. Optional.

string

Stock-keeping unit identifier assigned by the merchant. Required if barcode not provided.

string

Source image URL for this variant; the system processes it and serves it via CDN. Optional.

string
enum

Lifecycle state. Accepted values: active, archived, do_not_use. Default: active. Optional but recommended.

Allowed:
string

Product category as defined by the originating storefront. Must map to a Two Boxes product category. Optional but recommended.

string

Product type as defined by the originating storefront. Can be any value, where a Two Boxes product alias
should be created to map this value to a known entry in the Two Boxes product type taxonomy. Optional but recommended if storefront_product_category not provided.

string

Parent product title from the originating storefront (e.g. "Vintage Denim Jacket"). Optional.

valid_lot_codes
array of strings

Accepted lot codes during receiving. An empty or nil slice means all lot codes are accepted. Optional.

valid_lot_codes
string

Variant-specific identifier from the originating storefront (e.g. Shopify variant ID). Optional.

number

Weight of this variant in ounces. Optional.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json