# Product API Reference

Product resource object:

{
	"type": "products",
	"id": "(string)",
	"attributes": {
		"visibility": "string",
		"status": "string\|in:available,out-of-stock",
		"title": "string",
		"handle": "string",
		"description": "string",
		"content": "string",
		"price": (float|precision:2),
		"compare_at_price": (float|precision:2),
		"option1": "string",
		"option2": "string",
		"option3": "string",
		"options": Array,
		"group": "string",
		"vendor": "string (internal requests only)",
		"tags": Array,
		"created_at": "string|datetime",
		"updated_at": "string|datetime"
	},
	"relationships": {
		"variants": {
			"data": Array [Variant Resources]
		},
		"collections": {
			"data": Array [Collection Resources]
		},
		"image": {
			"data": Object (Image Resource) | null
		},
		"images": {
			"data": Array [Image Resources]
		}
	}
}

Related resources: Variant, Collection, Image

  • Note: collection and collections relationships are only available for getting a single product request.

# Writable fields

Field name Creating Updating
title required|max:255 max:255
visibility in:public,private,with-link in:public,private,with-link
status in:available,out-of-stock in:available,out-of-stock
slug max:255 max:255
description max:255 max:255
content max:60000 max:60000
price >= 0 >= 0
compare_at_price >= 0 >= 0
image_id uuid uuid
image_ids array array
option1 max:255 max:255
option2 max:255 max:255
option3 max:255 max:255
variant_data array array

# Writable relationships

Relationship name Relationship resource type Type Creating Updating
variants variants To-many No Yes
collections collections To-many Yes Yes
image images To-one Yes Yes
images images To-many Yes Yes

# Sortable

Field name
id
title
visibility
status
created_at
updated_at
price
compare_at_price

# Filters

Filter name Detail
id string
ids string, multiple ids accepted (max 100), separate by commas
visibility string (public/private/with-link)
status string (available/out-of-stock)
handle string
collection_id string
group string
vendor string
tags string, multiple tags accepted (max 10), separate by commas
any_tags string, multiple tags accepted (max 10), separate by commas
title string, support 4 operators. "=" (equal), "!=" (not equal), ">" (starts with), "<" (ends with)
title_search string, To exclude a word, you can prepend a “-” character. For example, to find all products with title containing “foo” but not “bar”, use: foo -bar
price float
compare_at_price float