You are viewing an old version of the API
Create variation
V1

Deprecated

Note We recommend using the Square API (V2) for all new development when possible.

Creates an item variation for an existing item



Required permissions ITEMS_WRITE

Path Parameters

Name Description
location_id
string

Required

The ID of the item's associated location.

item_id
string

Required

The item's ID.

Request Body

Name Description
id
string

The item variation's unique ID.

inventory_alert_threshold
integer

If the inventory quantity for the variation is less than or equal to this value and inventoryalerttype is LOW_QUANTITY, the variation displays an alert in the merchant dashboard.

inventory_alert_type
string

Indicates whether the item variation displays an alert when its inventory quantity is less than or equal to its inventoryalertthreshold.

item_id
string

The ID of the variation's associated item.

name
string

The item variation's name.

ordinal
integer

Indicates the variation's list position when displayed in Square Point of Sale and the merchant dashboard. If more than one variation for the same item has the same ordinal value, those variations are displayed in alphabetical order

price_money
V1​Money

The item variation's price, if any.

pricing_type
string

Indicates whether the item variation's price is fixed or determined at the time of sale.

sku
string

The item variation's SKU, if any.

track_inventory
boolean

If true, inventory tracking is active for the variation.

user_data
string

Arbitrary metadata associated with the variation. Cannot exceed 255 characters.

v2_id
string

The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.

Response Fields

Name Description
id
string

The item variation's unique ID.

inventory_alert_threshold
integer

If the inventory quantity for the variation is less than or equal to this value and inventoryalerttype is LOW_QUANTITY, the variation displays an alert in the merchant dashboard.

inventory_alert_type
string

Indicates whether the item variation displays an alert when its inventory quantity is less than or equal to its inventoryalertthreshold.

item_id
string

The ID of the variation's associated item.

name
string

The item variation's name.

ordinal
integer

Indicates the variation's list position when displayed in Square Point of Sale and the merchant dashboard. If more than one variation for the same item has the same ordinal value, those variations are displayed in alphabetical order

price_money
V1​Money

The item variation's price, if any.

pricing_type
string

Indicates whether the item variation's price is fixed or determined at the time of sale.

sku
string

The item variation's SKU, if any.

track_inventory
boolean

If true, inventory tracking is active for the variation.

user_data
string

Arbitrary metadata associated with the variation. Cannot exceed 255 characters.

v2_id
string

The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.

Examples

You are viewing an old version of the API
POST /v1/{location_id}/items/{item_id}/variations
cURL
  • cURL
curl https://connect.squareup.com/v1/{location_id}/items/{item_id}/variations \
  -X POST \
  -H 'Authorization: Bearer ACCESS_TOKEN'

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?