Get child products
GEThttps://euwest.api.elasticpath.com/pcm/products/:productID/children
Get child products
Request
Path Parameters
productID stringrequired
A unique identifier for the product.
Responses
- 200
- 400
- 500
Returns a list of child products for the specified parent product ID.
- application/json
- Schema
- Example (from schema)
- list-products
Schema
data object[]
included object
meta object
{
"data": [
{
"id": "string",
"type": "product",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"sku": "string",
"status": "live",
"commodity_type": "physical",
"upc_ean": "string",
"mpn": "string",
"external_ref": "string",
"locales": {},
"tags": [
"string"
],
"extensions": {},
"custom_inputs": {},
"build_rules": {
"default": "include",
"include": [
[
"string"
]
],
"exclude": [
[
"string"
]
]
},
"components": {}
},
"meta": {
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "organization",
"variations": [
{
"id": "string",
"name": "string",
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
],
"child_variations": [
{
"id": "string",
"name": "string",
"sort_order": 0,
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
],
"option": {
"id": "string",
"name": "string",
"description": "string"
}
}
],
"product_types": [
"parent"
],
"variation_matrix": {}
},
"relationships": {}
}
],
"included": {
"component_products": [
{
"id": "string",
"type": "product",
"attributes": {
"name": "string",
"description": "string",
"slug": "string",
"sku": "string",
"status": "live",
"commodity_type": "physical",
"upc_ean": "string",
"mpn": "string",
"external_ref": "string",
"locales": {},
"tags": [
"string"
],
"extensions": {},
"custom_inputs": {},
"build_rules": {
"default": "include",
"include": [
[
"string"
]
],
"exclude": [
[
"string"
]
]
},
"components": {}
},
"meta": {
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"owner": "organization",
"variations": [
{
"id": "string",
"name": "string",
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
],
"child_variations": [
{
"id": "string",
"name": "string",
"sort_order": 0,
"options": [
{
"id": "string",
"name": "string",
"description": "string"
}
],
"option": {
"id": "string",
"name": "string",
"description": "string"
}
}
],
"product_types": [
"parent"
],
"variation_matrix": {}
},
"relationships": {}
}
]
},
"meta": {
"results": {
"total": 2
}
}
}
{
"data": [
{
"type": "product",
"id": "4d32b816-4397-4a71-b875-4e4ea3ce6745",
"attributes": {
"commodity_type": "physical",
"name": "Jeans",
"sku": "jeansRed",
"slug": "jeansRed",
"status": "live"
},
"relationships": {
"base_product": {
"data": {
"type": "product",
"id": "571e366f-17e6-4e51-8239-b3cc8ee1144d"
}
},
"children": {
"data": []
},
"component_products": {
"data": [],
"links": {
"self": "/products/4d32b816-4397-4a71-b875-4e4ea3ce6745/relationships/component_products"
}
},
"files": {
"data": [],
"links": {
"self": "/products/4d32b816-4397-4a71-b875-4e4ea3ce6745/relationships/files"
}
},
"main_image": {
"data": null
},
"templates": {
"data": [],
"links": {
"self": "/products/4d32b816-4397-4a71-b875-4e4ea3ce6745/relationships/templates"
}
},
"variations": {
"data": [],
"links": {
"self": "/products/4d32b816-4397-4a71-b875-4e4ea3ce6745/relationships/variations"
}
}
},
"meta": {
"created_at": "2024-01-05T10:29:44.603Z",
"owner": "store",
"product_types": [
"child"
],
"updated_at": "2024-01-05T10:29:45.155Z",
"variation_matrix": {},
"child_variations": [
{
"id": "119b2b76-0014-4077-826e-ae80ff207393",
"name": "Size",
"options": null,
"option": {
"id": "fad253ad-4485-4b35-8e3b-b475ad28e78d",
"name": "Medium",
"description": "Medium"
}
},
{
"id": "10ceafef-7ac9-4352-9797-4825a1671482",
"name": "Colour",
"options": null,
"option": {
"id": "b8128e51-1b0a-4b16-9eda-bb783b17026b",
"name": "Red",
"description": "#EE2238"
}
}
]
}
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
errors undefined[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Bad Request",
"detail": "Could not parse the supplied filter",
"status": "400"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors undefined[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'https://euwest.api.elasticpath.com/pcm/products/:productID/children' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear