curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/products/{product_slug}
{
"data": {
"id": "96",
"type": "product",
"attributes": {
"name": "Bomber Jacket",
"description": "Dolorem nulla odit nostrum placeat soluta non vitae praesentium. Neque asperiores quos necessitatibus sint placeat. Voluptas aliquid atque veniam iste assumenda blanditiis. Excepturi odit recusandae laboriosam sunt temporibus corrupti. Tempore necessitatibus recusandae eligendi occaecati nesciunt sed illum similique.",
"available_on": "2021-10-02T11:02:29.288Z",
"slug": "bomber-jacket",
"meta_description": null,
"meta_keywords": null,
"updated_at": "2021-10-02T11:03:14.681Z",
"sku": "JacketsandCoats_bomberjacket_38.99",
"purchasable": true,
"in_stock": true,
"backorderable": false,
"available": true,
"currency": "USD",
"price": "38.99",
"display_price": "$38.99",
"compare_at_price": null,
"display_compare_at_price": null,
"localized_slugs": {
"en": "bomber-jacket",
"de": "bomberjacke",
"fr": "blouson"
}
},
"relationships": {
"variants": {
"data": [
{
"id": "212",
"type": "variant"
}
]
},
"option_types": {
"data": [
{
"id": "1",
"type": "option_type"
},
{
"id": "3",
"type": "option_type"
}
]
},
"product_properties": {
"data": [
{
"id": "639",
"type": "product_property"
},
{
"id": "640",
"type": "product_property"
},
{
"id": "641",
"type": "product_property"
},
{
"id": "642",
"type": "product_property"
},
{
"id": "643",
"type": "product_property"
},
{
"id": "644",
"type": "product_property"
},
{
"id": "645",
"type": "product_property"
},
{
"id": "646",
"type": "product_property"
}
]
},
"taxons": {
"data": [
{
"id": "19",
"type": "taxon"
},
{
"id": "14",
"type": "taxon"
},
{
"id": "24",
"type": "taxon"
},
{
"id": "3",
"type": "taxon"
}
]
},
"images": {
"data": []
},
"default_variant": {
"data": {
"id": "212",
"type": "variant"
}
},
"primary_variant": {
"data": {
"id": "96",
"type": "variant"
}
}
}
}
}
Returns Product details. You can use product permalink:
GET /api/v2/storefront/products/knitted-high-neck-sweater
Or Product ID:
GET /api/v2/storefront/products/21
Note API will attempt a permalink lookup before an ID lookup.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/products/{product_slug}
{
"data": {
"id": "96",
"type": "product",
"attributes": {
"name": "Bomber Jacket",
"description": "Dolorem nulla odit nostrum placeat soluta non vitae praesentium. Neque asperiores quos necessitatibus sint placeat. Voluptas aliquid atque veniam iste assumenda blanditiis. Excepturi odit recusandae laboriosam sunt temporibus corrupti. Tempore necessitatibus recusandae eligendi occaecati nesciunt sed illum similique.",
"available_on": "2021-10-02T11:02:29.288Z",
"slug": "bomber-jacket",
"meta_description": null,
"meta_keywords": null,
"updated_at": "2021-10-02T11:03:14.681Z",
"sku": "JacketsandCoats_bomberjacket_38.99",
"purchasable": true,
"in_stock": true,
"backorderable": false,
"available": true,
"currency": "USD",
"price": "38.99",
"display_price": "$38.99",
"compare_at_price": null,
"display_compare_at_price": null,
"localized_slugs": {
"en": "bomber-jacket",
"de": "bomberjacke",
"fr": "blouson"
}
},
"relationships": {
"variants": {
"data": [
{
"id": "212",
"type": "variant"
}
]
},
"option_types": {
"data": [
{
"id": "1",
"type": "option_type"
},
{
"id": "3",
"type": "option_type"
}
]
},
"product_properties": {
"data": [
{
"id": "639",
"type": "product_property"
},
{
"id": "640",
"type": "product_property"
},
{
"id": "641",
"type": "product_property"
},
{
"id": "642",
"type": "product_property"
},
{
"id": "643",
"type": "product_property"
},
{
"id": "644",
"type": "product_property"
},
{
"id": "645",
"type": "product_property"
},
{
"id": "646",
"type": "product_property"
}
]
},
"taxons": {
"data": [
{
"id": "19",
"type": "taxon"
},
{
"id": "14",
"type": "taxon"
},
{
"id": "24",
"type": "taxon"
},
{
"id": "3",
"type": "taxon"
}
]
},
"images": {
"data": []
},
"default_variant": {
"data": {
"id": "212",
"type": "variant"
}
},
"primary_variant": {
"data": {
"id": "96",
"type": "variant"
}
}
}
}
}
Product Slug
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 the product
object.
The response is of type object
.
Was this page helpful?