{
	"info": {
		"_postman_id": "product-tree-api-2026",
		"name": "Product Tree API",
		"description": "Comprehensive API collection for Product Tree endpoints.\n\n## Features\n- Hierarchical tree view: Category > CategoryItem > Product > Variants/Aliases/Components\n- Lazy loading of children nodes\n- Smart search across products, variants, and aliases\n- Filtering by manufacturer, brand, country, product_type, status, price\n- Price history summary (last 5 entries)\n\n## Base URL\n`{{BASE_URL}}/products/tree`",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "1. Get Root Categories",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?paginated=true&perPage=10",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "paginated",
							"value": "true",
							"description": "Enable pagination (default: true)"
						},
						{
							"key": "perPage",
							"value": "10",
							"description": "Items per page (default: 10)"
						}
					]
				},
				"description": "Get root level categories with children counts.\n\n**Returns:**\n- List of root categories (parent_id = null)\n- Each category includes:\n  - `has_children`: boolean\n  - `children_count`: number of subcategories\n  - `items_count`: number of category items\n  - `expandable`: whether it can be expanded"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree?paginated=true&perPage=10",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree"
							],
							"query": [
								{
									"key": "paginated",
									"value": "true"
								},
								{
									"key": "perPage",
									"value": "10"
								}
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Tree loaded successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"type\": \"category\",\n            \"name\": \"Pumps\",\n            \"code\": \"PUMP-001\",\n            \"slug\": \"pumps\",\n            \"is_active\": true,\n            \"has_children\": true,\n            \"children_count\": 3,\n            \"items_count\": 5,\n            \"parent_id\": null,\n            \"icon\": \"folder\",\n            \"expandable\": true\n        }\n    ],\n    \"pagination\": {\n        \"current_page\": 1,\n        \"per_page\": 10,\n        \"total\": 1\n    }\n}"
				}
			]
		},
		{
			"name": "2. Get Category Children (Subcategories)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?parent_id=1&parent_type=category&paginated=true&perPage=10",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "parent_id",
							"value": "1",
							"description": "Parent category ID"
						},
						{
							"key": "parent_type",
							"value": "category",
							"description": "Type: category | category_item | product"
						},
						{
							"key": "paginated",
							"value": "true"
						},
						{
							"key": "perPage",
							"value": "10"
						}
					]
				},
				"description": "Get children of a specific category (subcategories + category items).\n\n**Query Parameters:**\n- `parent_id`: ID of parent category\n- `parent_type`: \"category\"\n\n**Returns:**\n- Subcategories with children counts\n- Category items under this category"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree?parent_id=1&parent_type=category",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree"
							],
							"query": [
								{
									"key": "parent_id",
									"value": "1"
								},
								{
									"key": "parent_type",
									"value": "category"
								}
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Tree loaded successfully\",\n    \"data\": [\n        {\n            \"id\": 2,\n            \"type\": \"category\",\n            \"name\": \"Centrifugal Pumps\",\n            \"code\": \"PUMP-CENT\",\n            \"slug\": \"centrifugal-pumps\",\n            \"is_active\": true,\n            \"has_children\": true,\n            \"children_count\": 0,\n            \"items_count\": 3,\n            \"parent_id\": 1,\n            \"icon\": \"folder\",\n            \"expandable\": true\n        },\n        {\n            \"id\": 10,\n            \"type\": \"category_item\",\n            \"name\": \"General Pump Items\",\n            \"code\": \"ITEM-001\",\n            \"item_type\": \"product_type\",\n            \"visibility\": \"public\",\n            \"is_active\": true,\n            \"has_children\": true,\n            \"children_count\": 5,\n            \"category_id\": 1,\n            \"icon\": \"category_item\",\n            \"expandable\": true\n        }\n    ]\n}"
				}
			]
		},
		{
			"name": "3. Get CategoryItem Children (Products)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?parent_id=10&parent_type=category_item&paginated=true&perPage=10",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "parent_id",
							"value": "10",
							"description": "Parent category item ID"
						},
						{
							"key": "parent_type",
							"value": "category_item",
							"description": "Type: category_item"
						},
						{
							"key": "paginated",
							"value": "true"
						},
						{
							"key": "perPage",
							"value": "10"
						}
					]
				},
				"description": "Get products under a specific category item.\n\n**Query Parameters:**\n- `parent_id`: ID of parent category item\n- `parent_type`: \"category_item\"\n\n**Returns:**\n- Products with variants, aliases, and bundle information"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree?parent_id=10&parent_type=category_item",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree"
							],
							"query": [
								{
									"key": "parent_id",
									"value": "10"
								},
								{
									"key": "parent_type",
									"value": "category_item"
								}
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Tree loaded successfully\",\n    \"data\": [\n        {\n            \"id\": 100,\n            \"type\": \"product\",\n            \"name\": {\n                \"en\": \"Grundfos CR5-4 Pump\",\n                \"ar\": \"مضخة جروندفوس CR5-4\"\n            },\n            \"brand\": \"Grundfos\",\n            \"manufacturer\": \"Grundfos\",\n            \"product_type\": \"physical\",\n            \"status\": \"active\",\n            \"is_bundle\": false,\n            \"is_unavailable\": false,\n            \"has_alternatives\": true,\n            \"has_children\": true,\n            \"variants_count\": 3,\n            \"aliases_count\": 2,\n            \"children_count\": 0,\n            \"catalog_item_id\": 10,\n            \"parent_id\": null,\n            \"icon\": \"product\",\n            \"expandable\": true,\n            \"indicators\": {\n                \"bundle\": null,\n                \"alternatives\": \"alt\",\n                \"unavailable\": null\n            }\n        }\n    ]\n}"
				}
			]
		},
		{
			"name": "4. Get Product Children (Variants/Aliases)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?parent_id=100&parent_type=product&paginated=true&perPage=10",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "parent_id",
							"value": "100",
							"description": "Parent product ID"
						},
						{
							"key": "parent_type",
							"value": "product",
							"description": "Type: product"
						},
						{
							"key": "paginated",
							"value": "true"
						},
						{
							"key": "perPage",
							"value": "10"
						}
					]
				},
				"description": "Get children of a product (variants, aliases, bundle components).\n\n**Query Parameters:**\n- `parent_id`: ID of parent product\n- `parent_type`: \"product\"\n\n**Returns:**\n- Product variants\n- Product aliases (alternatives)\n- Bundle components (if product is a bundle)"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree?parent_id=100&parent_type=product",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree"
							],
							"query": [
								{
									"key": "parent_id",
									"value": "100"
								},
								{
									"key": "parent_type",
									"value": "product"
								}
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Tree loaded successfully\",\n    \"data\": [\n        {\n            \"id\": 1001,\n            \"type\": \"variant\",\n            \"name\": \"Power: 2HP, Voltage: 220V\",\n            \"sku\": \"CR5-4-2HP-220V\",\n            \"barcode\": \"1234567890123\",\n            \"origin_country\": \"Denmark\",\n            \"quality_grade\": \"oem\",\n            \"is_preferred\": true,\n            \"product_id\": 100,\n            \"has_children\": false,\n            \"icon\": \"variant\",\n            \"expandable\": false\n        },\n        {\n            \"id\": 1002,\n            \"type\": \"variant\",\n            \"name\": \"Power: 2HP, Voltage: 380V\",\n            \"sku\": \"CR5-4-2HP-380V\",\n            \"barcode\": \"1234567890124\",\n            \"origin_country\": \"Denmark\",\n            \"quality_grade\": \"oem\",\n            \"is_preferred\": false,\n            \"product_id\": 100,\n            \"has_children\": false,\n            \"icon\": \"variant\",\n            \"expandable\": false\n        },\n        {\n            \"id\": 501,\n            \"type\": \"alias\",\n            \"name\": \"Grundfos Vertical Multi-Stage\",\n            \"alias_type\": \"market_name\",\n            \"language\": \"en\",\n            \"source\": \"manual\",\n            \"priority\": 100,\n            \"product_id\": 100,\n            \"has_children\": false,\n            \"icon\": \"alternative\",\n            \"expandable\": false\n        }\n    ]\n}"
				}
			]
		},
		{
			"name": "5. Search Products (with breadcrumb)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?search=pump&paginated=true&perPage=10",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "search",
							"value": "pump",
							"description": "Search term (searches name, SKU, barcode, aliases)"
						},
						{
							"key": "paginated",
							"value": "true"
						},
						{
							"key": "perPage",
							"value": "10"
						}
					]
				},
				"description": "Smart search across products, variants, and aliases with full breadcrumb path.\n\n**Searches in:**\n- Product canonical_name (en/ar)\n- Product brand, manufacturer\n- ProductVariant SKU, barcode\n- ProductAlias alias_name (where is_searchable=true)\n\n**Returns:**\n- Matching nodes\n- Full path array from root to node\n- Formatted breadcrumb string\n- Match type (name, sku_barcode, alias)"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree?search=pump",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree"
							],
							"query": [
								{
									"key": "search",
									"value": "pump"
								}
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Tree loaded successfully\",\n    \"data\": [\n        {\n            \"node\": {\n                \"id\": 100,\n                \"type\": \"product\",\n                \"name\": \"Grundfos CR5-4 Pump\",\n                \"brand\": \"Grundfos\",\n                \"manufacturer\": \"Grundfos\",\n                \"product_type\": \"physical\",\n                \"status\": \"active\",\n                \"is_bundle\": false,\n                \"has_children\": true,\n                \"variants_count\": 3,\n                \"icon\": \"product\",\n                \"expandable\": true\n            },\n            \"path\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Pumps\",\n                    \"type\": \"category\"\n                },\n                {\n                    \"id\": 2,\n                    \"name\": \"Centrifugal Pumps\",\n                    \"type\": \"category\"\n                },\n                {\n                    \"id\": 10,\n                    \"name\": \"General Pump Items\",\n                    \"type\": \"category_item\"\n                },\n                {\n                    \"id\": 100,\n                    \"name\": \"Grundfos CR5-4 Pump\",\n                    \"type\": \"product\"\n                }\n            ],\n            \"breadcrumb\": \"Pumps > Centrifugal Pumps > General Pump Items > Grundfos CR5-4 Pump\",\n            \"match_type\": \"name\",\n            \"matched_alias\": null\n        }\n    ],\n    \"pagination\": {\n        \"current_page\": 1,\n        \"per_page\": 10,\n        \"total\": 1\n    }\n}"
				}
			]
		},
		{
			"name": "6. Search with Filters",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree?search=pump&manufacturer=Grundfos&product_type=physical&status=active&min_price=100&max_price=1000",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree"
					],
					"query": [
						{
							"key": "search",
							"value": "pump"
						},
						{
							"key": "manufacturer",
							"value": "Grundfos",
							"description": "Filter by manufacturer"
						},
						{
							"key": "brand",
							"value": "",
							"description": "Filter by brand",
							"disabled": true
						},
						{
							"key": "country",
							"value": "",
							"description": "Filter by origin country",
							"disabled": true
						},
						{
							"key": "product_type",
							"value": "physical",
							"description": "Filter by product type (physical, digital, spare_part)"
						},
						{
							"key": "status",
							"value": "active",
							"description": "Filter by status (active, draft, discontinued, pending)"
						},
						{
							"key": "min_price",
							"value": "100",
							"description": "Minimum price filter"
						},
						{
							"key": "max_price",
							"value": "1000",
							"description": "Maximum price filter"
						}
					]
				},
				"description": "Search with multiple filters applied.\n\n**Available Filters:**\n- `manufacturer`: Filter by manufacturer name\n- `brand`: Filter by brand name\n- `country`: Filter by origin country (from variants)\n- `product_type`: physical, digital, spare_part\n- `status`: active, draft, discontinued, pending\n- `min_price`: Minimum price (from variant prices)\n- `max_price`: Maximum price (from variant prices)"
			},
			"response": []
		},
		{
			"name": "7. Get Filter Options",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree/filters",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree",
						"filters"
					]
				},
				"description": "Get all available filter options to populate filter dropdowns.\n\n**Returns:**\n- Manufacturers (distinct list)\n- Brands (distinct list)\n- Countries (distinct list from variants)\n- Product types (enum values)\n- Statuses (enum values)\n- Quality grades (enum values)"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree/filters",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree",
								"filters"
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Filter options loaded successfully\",\n    \"data\": {\n        \"manufacturers\": [\n            \"Grundfos\",\n            \"Wilo\",\n            \"KSB\",\n            \"Ebara\"\n        ],\n        \"brands\": [\n            \"Grundfos\",\n            \"Wilo Premium\",\n            \"KSB Pro\"\n        ],\n        \"countries\": [\n            \"Denmark\",\n            \"Germany\",\n            \"Japan\",\n            \"China\"\n        ],\n        \"product_types\": [\n            {\n                \"value\": \"physical\",\n                \"label\": \"PHYSICAL\"\n            },\n            {\n                \"value\": \"digital\",\n                \"label\": \"DIGITAL\"\n            },\n            {\n                \"value\": \"spare_part\",\n                \"label\": \"SPARE_PART\"\n            }\n        ],\n        \"statuses\": [\n            {\n                \"value\": \"active\",\n                \"label\": \"ACTIVE\"\n            },\n            {\n                \"value\": \"draft\",\n                \"label\": \"DRAFT\"\n            },\n            {\n                \"value\": \"discontinued\",\n                \"label\": \"DISCONTINUED\"\n            },\n            {\n                \"value\": \"pending\",\n                \"label\": \"PENDING\"\n            }\n        ],\n        \"quality_grades\": [\n            {\n                \"value\": \"oem\",\n                \"label\": \"OEM\"\n            },\n            {\n                \"value\": \"compatible\",\n                \"label\": \"COMPATIBLE\"\n            },\n            {\n                \"value\": \"aftermarket\",\n                \"label\": \"AFTERMARKET\"\n            },\n            {\n                \"value\": \"refurbished\",\n                \"label\": \"REFURBISHED\"\n            }\n        ]\n    }\n}"
				}
			]
		},
		{
			"name": "8. Get Expand Path",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree/expand-path/100/product",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree",
						"expand-path",
						"100",
						"product"
					]
				},
				"description": "Get the path of parent IDs needed to expand the tree to reach a specific node.\n\n**Path Parameters:**\n- `nodeId`: The target node ID\n- `nodeType`: Type of node (category, category_item, product, variant)\n\n**Use Case:**\nWhen you want to navigate directly to a specific product/variant, this endpoint tells you which nodes to expand to reach it.\n\n**Returns:**\n- Array of parent IDs to expand\n- The target node data"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree/expand-path/100/product",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree",
								"expand-path",
								"100",
								"product"
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Expand path loaded successfully\",\n    \"data\": {\n        \"expand_path\": [\n            {\n                \"id\": 1,\n                \"type\": \"category\"\n            },\n            {\n                \"id\": 2,\n                \"type\": \"category\"\n            },\n            {\n                \"id\": 10,\n                \"type\": \"category_item\"\n            }\n        ],\n        \"node\": {\n            \"id\": 100,\n            \"type\": \"product\",\n            \"name\": \"Grundfos CR5-4 Pump\",\n            \"brand\": \"Grundfos\",\n            \"manufacturer\": \"Grundfos\",\n            \"has_children\": true,\n            \"expandable\": true\n        }\n    }\n}"
				}
			]
		},
		{
			"name": "9. Bulk Get Children",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"requests\": [\n        {\n            \"parent_id\": 1,\n            \"parent_type\": \"category\"\n        },\n        {\n            \"parent_id\": 2,\n            \"parent_type\": \"category\"\n        },\n        {\n            \"parent_id\": 10,\n            \"parent_type\": \"category_item\"\n        }\n    ]\n}"
				},
				"url": {
					"raw": "{{BASE_URL}}/products/tree/bulk-children",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree",
						"bulk-children"
					]
				},
				"description": "Load children for multiple parents in a single request.\n\n**Use Case:**\nWhen you need to expand multiple nodes at once (e.g., restoring a previously expanded tree state).\n\n**Request Body:**\n```json\n{\n  \"requests\": [\n    { \"parent_id\": 1, \"parent_type\": \"category\" },\n    { \"parent_id\": 10, \"parent_type\": \"category_item\" }\n  ]\n}\n```\n\n**Returns:**\nObject with keys like \"category_1\", \"category_item_10\" containing children arrays."
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"requests\": [\n        {\n            \"parent_id\": 1,\n            \"parent_type\": \"category\"\n        },\n        {\n            \"parent_id\": 10,\n            \"parent_type\": \"category_item\"\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/products/tree/bulk-children",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree",
								"bulk-children"
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Bulk children loaded successfully\",\n    \"data\": {\n        \"category_1\": [\n            {\n                \"id\": 2,\n                \"type\": \"category\",\n                \"name\": \"Centrifugal Pumps\",\n                \"has_children\": true\n            },\n            {\n                \"id\": 10,\n                \"type\": \"category_item\",\n                \"name\": \"General Pump Items\",\n                \"has_children\": true\n            }\n        ],\n        \"category_item_10\": [\n            {\n                \"id\": 100,\n                \"type\": \"product\",\n                \"name\": \"Grundfos CR5-4 Pump\",\n                \"has_children\": true\n            }\n        ]\n    }\n}"
				}
			]
		},
		{
			"name": "10. Get Price History Summary",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/products/tree/100/price-history-summary",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [

						"products",
						"tree",
						"100",
						"price-history-summary"
					]
				},
				"description": "Get the last 5 price changes for a product with supplier information.\n\n**Path Parameters:**\n- `productId`: Product ID\n\n**Returns:**\n- Last 5 price history entries\n- Each entry includes:\n  - date\n  - old_price, new_price\n  - price_change (absolute)\n  - price_change_percentage\n  - supplier (id, name)\n  - purchase_price\n  - change_reason\n  - changed_by (user name)"
			},
			"response": [
				{
					"name": "Success Response",
					"originalRequest": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/products/tree/100/price-history-summary",
							"host": [
								"{{BASE_URL}}"
							],
							"path": [

								"products",
								"tree",
								"100",
								"price-history-summary"
							]
						}
					},
					"status": "OK",
					"code": 200,
					"_postman_previewlanguage": "json",
					"header": [],
					"cookie": [],
					"body": "{\n    \"success\": true,\n    \"message\": \"Price history loaded successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"date\": \"2026-02-01\",\n            \"old_price\": 850.00,\n            \"new_price\": 900.00,\n            \"price_change\": 50.00,\n            \"price_change_percentage\": 5.88,\n            \"supplier\": {\n                \"id\": 5,\n                \"name\": \"Grundfos Middle East\"\n            },\n            \"purchase_price\": 900.00,\n            \"change_reason\": \"Price update\",\n            \"changed_by\": \"John Doe\"\n        },\n        {\n            \"id\": 2,\n            \"date\": \"2026-01-15\",\n            \"old_price\": 800.00,\n            \"new_price\": 850.00,\n            \"price_change\": 50.00,\n            \"price_change_percentage\": 6.25,\n            \"supplier\": {\n                \"id\": 5,\n                \"name\": \"Grundfos Middle East\"\n            },\n            \"purchase_price\": 850.00,\n            \"change_reason\": \"Supplier price increase\",\n            \"changed_by\": \"Jane Smith\"\n        }\n    ]\n}"
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
	]
}
