Get a Product
GEThttps://euwest.api.elasticpath.com/catalog/products/:product_id
Returns the specified product from the catalog. The product must be in the live
status.
If you have multiple catalog rules defined, the rule that best matches the shoppers context is used to determine which catalog is retrieved. For information about how rules are matched, see Resolving Catalog Rules.
You can see the parent nodes a product is associated with in the bread_crumbs
and bread_crumb_nodes
metadata for each product. This is useful if you want to improve how your shoppers search your store, for example. See Product and Node Associations in Breadcrumb Metadata.
Using the include
parameter, you can retrieve top-level resources, such as, files or main image, bundle component products and product attributes, such as SKU or slug.
Parameter | Required | Description |
---|---|---|
component_products | Optional | The component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle. |
main_image | Optional | The main images associated with a product. |
files | Optional | Any files associated with a product. |
See Including Resources.
Request
Path Parameters
The product ID.
Query Parameters
- Files or main image. For example,
include=files,main_image
. - Component product data. For example,
include=component_products
. - Key attribute data, such as SKU or slug.
Possible values: [files
, main_image
, component_products
]
Using the include parameter, you can retrieve top-level resources.
Header Parameters
The language and locale your storefront prefers. See Accept-Language.
The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the EP-Channel
header in your requests.
Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the EP-Context-Tag
header.
Responses
- 200
- default
The product of a catalog.
- application/json
- Schema
- Example (auto)
Schema
data object
included object
links object
{
"data": {
"attributes": {
"published_at": "1970-01-01T00:00:00.000",
"base_product": false,
"base_product_id": "cdf574bc-e36e-48fc-9eac-01c87839b285",
"commodity_type": "physical",
"curated_product": true,
"upc_ean": "0123456",
"manufacturer_part_num": "mfn1",
"tags": [
"tag-a"
],
"price_modifiers": [
"modifier-1"
],
"created_at": "1970-01-01T00:00:00.000",
"description": "This is a product",
"name": "Blue shirt",
"price": {},
"shopper_attributes": {},
"tiers": {},
"components": {},
"custom_inputs": {},
"sku": "blue-shirt",
"slug": "blue-shirt",
"status": "live",
"external_ref": "string",
"updated_at": "1970-01-01T00:00:00.000",
"extensions": {}
},
"id": "8fccaa19-dba9-4621-8d11-31a222a68c7c",
"relationships": {
"parent": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
},
"children": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"files": {
"data": [
{
"type": "file",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "1970-01-01T00:00:00.000"
}
]
},
"main_image": {
"data": {
"type": "main_image",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"component_products": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"custom_relationships": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {}
}
},
"type": "product",
"meta": {
"bread_crumbs": {},
"bread_crumb_nodes": [
"8dbb35b2-ef04-477e-974d-e5f3abe6faae"
],
"catalog_id": "362a16dc-f7c6-4280-83d6-4fcc152af091",
"pricebook_id": "f5466169-0037-460c-b181-b02682b6f4de",
"display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"catalog_source": "pim",
"sale_id": "string",
"sale_expires": "1970-01-01T00:00:00.000",
"original_price": {},
"original_display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"bundle_configuration": {
"selected_options": {
"games": {
"p292e1db-c919-4d2f-984a-c2ddc79df024": 2
},
"consoles": {
"759ce0d7-e248-4f57-8ee1-6fd81a1b3c0a": 1
}
}
},
"component_products": {},
"component_product_data": {},
"price_modifiers": {},
"tiers": {},
"variation_matrix": {},
"variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"child_option_ids": [
[
"8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"6ddf2a66-d805-449c-a0e1-8e81335e31a6"
]
],
"child_variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"product_types": [
"string"
],
"language": "en-GB",
"custom_relationships": [
[
"CRP-Cross-Sell-Products",
"CRP-Frequently-Bought-Together-Products"
]
]
}
},
"included": {
"main_images": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "file",
"file_name": "file_name.jpg",
"mime_type": "image/jpeg",
"file_size": 36000,
"public": true,
"meta": {
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z"
},
"dimensions": {
"width": 1800,
"height": 1000
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52"
},
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png",
"meta": {
"results": {
"total": 2
}
}
}
}
],
"component_products": [
{
"attributes": {
"published_at": "1970-01-01T00:00:00.000",
"base_product": false,
"base_product_id": "cdf574bc-e36e-48fc-9eac-01c87839b285",
"commodity_type": "physical",
"curated_product": true,
"upc_ean": "0123456",
"manufacturer_part_num": "mfn1",
"tags": [
"tag-a"
],
"price_modifiers": [
"modifier-1"
],
"created_at": "1970-01-01T00:00:00.000",
"description": "This is a product",
"name": "Blue shirt",
"price": {},
"shopper_attributes": {},
"tiers": {},
"components": {},
"custom_inputs": {},
"sku": "blue-shirt",
"slug": "blue-shirt",
"status": "live",
"external_ref": "string",
"updated_at": "1970-01-01T00:00:00.000",
"extensions": {}
},
"id": "8fccaa19-dba9-4621-8d11-31a222a68c7c",
"relationships": {
"parent": {
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
},
"children": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"files": {
"data": [
{
"type": "file",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "1970-01-01T00:00:00.000"
}
]
},
"main_image": {
"data": {
"type": "main_image",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"component_products": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {
"self": "string"
}
},
"custom_relationships": {
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "product"
}
],
"links": {}
}
},
"type": "product",
"meta": {
"bread_crumbs": {},
"bread_crumb_nodes": [
"8dbb35b2-ef04-477e-974d-e5f3abe6faae"
],
"catalog_id": "362a16dc-f7c6-4280-83d6-4fcc152af091",
"pricebook_id": "f5466169-0037-460c-b181-b02682b6f4de",
"display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"catalog_source": "pim",
"sale_id": "string",
"sale_expires": "1970-01-01T00:00:00.000",
"original_price": {},
"original_display_price": {
"with_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
},
"without_tax": {
"amount": "47500",
"currency": "USD",
"formatted": "$475.00"
}
},
"bundle_configuration": {
"selected_options": {
"games": {
"p292e1db-c919-4d2f-984a-c2ddc79df024": 2
},
"consoles": {
"759ce0d7-e248-4f57-8ee1-6fd81a1b3c0a": 1
}
}
},
"component_products": {},
"component_product_data": {},
"price_modifiers": {},
"tiers": {},
"variation_matrix": {},
"variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"child_option_ids": [
[
"8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"6ddf2a66-d805-449c-a0e1-8e81335e31a6"
]
],
"child_variations": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"option": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
},
"options": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"sort_order": 0,
"description": "string"
}
]
}
],
"product_types": [
"string"
],
"language": "en-GB",
"custom_relationships": [
[
"CRP-Cross-Sell-Products",
"CRP-Frequently-Bought-Together-Products"
]
]
}
}
],
"files": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "file",
"file_name": "file_name.jpg",
"mime_type": "image/jpeg",
"file_size": 36000,
"public": true,
"meta": {
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z"
},
"dimensions": {
"width": 1800,
"height": 1000
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/files/ddc28c74-a7df-46be-b262-8fa69a6e7d52"
},
"link": {
"href": "https://files-eu.epusercontent.com/e8c53cb0-120d-4ea5-8941-ce74dec06038/f8cf26b3-6d38-4275-937a-624a83994702.png",
"meta": {
"results": {
"total": 2
}
}
}
}
]
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
The unexpected error.
- application/json
- Schema
- Example (auto)
Schema
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/catalog/products/:product_id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <Authorization>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());