curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/products{
"data": [
{
"id": "1",
"type": "product",
"attributes": {
"name": "Example product",
"description": "Example description",
"available_on": "2012-10-17T03:43:57Z",
"slug": "example-product",
"price": "15.99",
"currency": "USD",
"display_price": "$15.99",
"purchasable": true,
"in_stock": true,
"backorderable": true,
"meta_description": "Example product",
"meta_keywords": "example, product",
"updated_at": "2020-02-16T07:14:54.617Z",
"sku": "9238-WS",
"available": true,
"compare_at_price": "49.99",
"display_compare_at_price": "$49.99",
"localized_slugs": {},
"tags": [
"<string>"
],
"labels": [
"<string>"
]
},
"relationships": {
"variants": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"option_types": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"product_properties": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"taxons": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"images": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"default_variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"primary_variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
}
],
"meta": {
"count": 7,
"total_count": 145,
"total_pages": 10
},
"links": {
"self": "<string>",
"next": "<string>",
"prev": "<string>",
"last": "<string>",
"first": "<string>"
},
"included": [
{
"id": "1",
"type": "payment_method",
"attributes": {
"type": "Spree::Gateway::StripeGateway",
"name": "Stripe",
"description": "Stripe Payments",
"preferences": {}
}
}
]
}Returns a list of products for the current Store.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/products{
"data": [
{
"id": "1",
"type": "product",
"attributes": {
"name": "Example product",
"description": "Example description",
"available_on": "2012-10-17T03:43:57Z",
"slug": "example-product",
"price": "15.99",
"currency": "USD",
"display_price": "$15.99",
"purchasable": true,
"in_stock": true,
"backorderable": true,
"meta_description": "Example product",
"meta_keywords": "example, product",
"updated_at": "2020-02-16T07:14:54.617Z",
"sku": "9238-WS",
"available": true,
"compare_at_price": "49.99",
"display_compare_at_price": "$49.99",
"localized_slugs": {},
"tags": [
"<string>"
],
"labels": [
"<string>"
]
},
"relationships": {
"variants": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"option_types": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"product_properties": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"taxons": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"images": {
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
},
"default_variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"primary_variant": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
}
],
"meta": {
"count": 7,
"total_count": 145,
"total_pages": 10
},
"links": {
"self": "<string>",
"next": "<string>",
"prev": "<string>",
"last": "<string>",
"first": "<string>"
},
"included": [
{
"id": "1",
"type": "payment_method",
"attributes": {
"type": "Spree::Gateway::StripeGateway",
"name": "Stripe",
"description": "Stripe Payments",
"preferences": {}
}
}
]
}Fetch only resources with corresponding IDs
Fetch only resources with corresponding SKUs
Filter Products based on price (minimum, maximum range)
Filter Products based on taxons (IDs of categories, brands, etc)
Fetch products from specified Vendors (Sellers) - only available in Enterprise Edition
Find Products with matching name (supports wild-card, partial-word match search)
Find Products with Variants that have the specified option (eg. color, size) and value (eg. red, XS)
Find Products with Property Brand Name with value Alpha
Returns also deleted products
Returns also discontinued products
Returns only in stock products
Returns only backorderable products
Returns only in stock or backorderable products
Sort products based on:
-sign to set descending sort, eg.
-updated_at
Number of requested page when paginating collection
Number of requested records per page when paginating collection
Specify what related resources (relationships) you would like to receive in the response body. Eg.
default_variant,variants,option_types,product_properties,taxons,images,primary_variant
Specify the fields you would like returned in the response body. More information.
Specifies dimensions for included images at transformed_url attribute.
Specifies quality for included images at transformed_url attribute
200 Success - Returns an array of product objects.
Show child attributes
"1"
Show child attributes
"Example product"
"Example description"
"2012-10-17T03:43:57Z"
"example-product"
"15.99"
"USD"
"$15.99"
Indicates if any of Variants are in stock or backorderable
Indicates if any of Variants are in stock
Indicates if any of Variants are backeorderable
"Example product"
"example, product"
"2020-02-16T07:14:54.617Z"
"9238-WS"
"49.99"
"$49.99"
Provides product's slugs in other locales
List of tags associated with the product
List of labels associated with the product
Show child attributes
Show child attributes
"1"
Was this page helpful?