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.
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.
Product tags are used to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. You can enhance your product list using tags, enabling you to refine your product list and run targeted promotions. 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 (from schema)
Schema
data 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"
}
}
},
"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": {}
},
"component_products": {},
"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"
}
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
The unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}
Authorization: Authorization
name: Authorizationtype: httpin: headerscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://euwest.api.elasticpath.com/catalog/products/:product_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'