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.

name
string

The item variation's name.

item_id
string

The ID of the variation's associated item.

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

pricing_type
string

Indicates whether the item variation's price is fixed or determined at the time of sale. See V1VariationPricingType for possible values

price_money
Money

The item variation's price, if any.

sku
string

The item variation's SKU, if any.

track_inventory
boolean

If true, inventory tracking is active for the variation.

inventory_alert_type
string

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

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.

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.

name
string

The item variation's name.

item_id
string

The ID of the variation's associated item.

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

pricing_type
string

Indicates whether the item variation's price is fixed or determined at the time of sale. See V1VariationPricingType for possible values

price_money
Money

The item variation's price, if any.

sku
string

The item variation's SKU, if any.

track_inventory
boolean

If true, inventory tracking is active for the variation.

inventory_alert_type
string

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

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.

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' \
  -H 'Content-Type: application/json'

Share Feedback

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