{
	"info": {
		"_postman_id": "catalog-products-collection",
		"name": "Catalog Products API",
		"description": "API endpoints for Catalog Products management.\n\nBase URL: {{BASE_URL}}/catalog\n\nAuthentication: Bearer Token required",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost/api/v1",
			"type": "string"
		},
		{
			"key": "product_id",
			"value": "1",
			"type": "string"
		}
	],
	"item": [
		{
			"name": "Catalog Products",
			"item": [
				{
					"name": "Get All Catalog Products",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								},
								{
									"key": "search",
									"value": "",
									"disabled": true
								},
								{
									"key": "status",
									"value": "",
									"disabled": true
								},
								{
									"key": "product_type",
									"value": "",
									"disabled": true
								}
							]
						},
						"description": "Get all catalog products with pagination.\n\nPermission: `catalog-sales-products.view`"
					},
					"response": []
				},
				{
					"name": "Get Catalog Products Statistics",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products/statistics",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products", "statistics"]
						},
						"description": "Get catalog products statistics.\n\nPermission: `catalog-sales-products.view`"
					},
					"response": []
				},
				{
					"name": "Get Create Form Data",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products/create",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products", "create"]
						},
						"description": "Get form data needed for creating a new catalog product (e.g., next code).\n\nPermission: `catalog-sales-products.get-code`"
					},
					"response": []
				},
				{
					"name": "Get Single Catalog Product",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products", "{{product_id}}"]
						},
						"description": "Get a single catalog product by ID.\n\nPermission: `catalog-sales-products.view`"
					},
					"response": []
				},
				{
					"name": "Create Catalog Product",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"title\": {\n        \"en\": \"Test Product\",\n        \"ar\": \"منتج تجريبي\"\n    },\n    \"description\": \"Product description\",\n    \"catalog_item_id\": 1,\n    \"product_type\": \"physical\",\n    \"sku\": \"SKU-001\",\n    \"quality_grade\": \"oem\",\n    \"brand\": \"Brand Name\",\n    \"manufacturer\": \"Manufacturer Name\",\n    \"origin_country\": \"US\",\n    \"certification\": \"ISO 9001\",\n    \"warranty_terms\": \"1 year warranty\",\n    \"is_preferred\": true,\n    \"status\": true,\n    \"track_stock\": true,\n    \"initial_stock_level\": 100,\n    \"min_qty\": 10,\n    \"barcode\": \"1234567890\",\n    \"barcode_type\": \"barcode\",\n    \"is_taxable\": true,\n    \"tax_id\": null,\n    \"is_returnable\": true,\n    \"prices\": [\n        {\n            \"unit_id\": 1,\n            \"purchasing_price\": 50.00,\n            \"selling_price\": 75.00,\n            \"min_selling_price\": 60.00,\n            \"is_main_price\": true,\n            \"currency\": \"SAR\"\n        }\n    ],\n    \"tags\": \"electronics,gadgets\",\n    \"notes\": \"Internal notes\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products"]
						},
						"description": "Create a new catalog product.\n\nPermission: `catalog-sales-products.create`\n\n**Required Fields:**\n- `title.en` - English title (required)\n- `catalog_item_id` - Category item ID (required)\n- `product_type` - physical | digital | spare_part (required)\n- `sku` - Stock Keeping Unit (required)\n- `quality_grade` - oem | compatible | aftermarket | refurbished (required)\n- `prices` - At least one price entry (required)\n\n**Optional Fields:**\n- `title.ar` - Arabic title\n- `description` - Product description\n- `brand` - Brand name\n- `manufacturer` - Manufacturer name\n- `origin_country` - Country of origin\n- `certification` - Certification info\n- `warranty_terms` - Warranty terms\n- `is_preferred` - Preferred product flag\n- `status` - Active status\n- `track_stock` - Track inventory\n- `initial_stock_level` - Initial stock\n- `min_qty` - Minimum quantity\n- `barcode` - Product barcode\n- `tax_id` - Tax ID\n- `is_taxable` - Taxable flag\n- `is_returnable` - Returnable flag"
					},
					"response": []
				},
				{
					"name": "Update Catalog Product",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"title\": {\n        \"en\": \"Updated Product Name\",\n        \"ar\": \"اسم المنتج المحدث\"\n    },\n    \"description\": \"Updated description\",\n    \"brand\": \"Updated Brand\",\n    \"status\": true,\n    \"prices\": [\n        {\n            \"unit_id\": 1,\n            \"purchasing_price\": 55.00,\n            \"selling_price\": 80.00,\n            \"min_selling_price\": 65.00,\n            \"is_main_price\": true,\n            \"currency\": \"SAR\"\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products", "{{product_id}}"]
						},
						"description": "Update an existing catalog product.\n\nPermission: `catalog-sales-products.edit`\n\nAll fields are optional for update. Only include fields you want to change."
					},
					"response": []
				},
				{
					"name": "Delete Catalog Product",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/catalog-products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "catalog-products", "{{product_id}}"]
						},
						"description": "Delete a catalog product (soft delete).\n\nPermission: `catalog-sales-products.delete`"
					},
					"response": []
				}
			],
			"description": "Catalog Products CRUD operations.\n\nBase: `/api/v1/catalog/catalog-products`"
		},
		{
			"name": "Products (Legacy)",
			"item": [
				{
					"name": "Get All Products",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Get all products with pagination.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Create Product",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"catalog_item_id\": 1,\n    \"parent_id\": null,\n    \"canonical_name\": {\n        \"en\": \"Product Name\",\n        \"ar\": \"اسم المنتج\"\n    },\n    \"description\": {\n        \"en\": \"Product description\",\n        \"ar\": \"وصف المنتج\"\n    },\n    \"brand\": \"Brand\",\n    \"manufacturer\": \"Manufacturer\",\n    \"product_type\": \"physical\",\n    \"status\": \"active\",\n    \"variants\": [\n        {\n            \"sku\": \"SKU-001\",\n            \"barcode\": \"123456789\",\n            \"origin_country\": \"US\",\n            \"quality_grade\": \"oem\",\n            \"is_preferred\": true,\n            \"attribute_options\": [1, 2],\n            \"prices\": [\n                {\n                    \"price_type_id\": 1,\n                    \"price\": 100.00,\n                    \"currency\": \"SAR\"\n                }\n            ]\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products"]
						},
						"description": "Create a new product with variants.\n\nPermission: `catalog.products.create`\n\n**Validation Notes:**\n- `parent_id` validates against `sales_products` table\n- `variants.*.sku` must be unique in `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Get Single Product",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}"]
						},
						"description": "Get a single product by ID.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Update Product",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"canonical_name\": {\n        \"en\": \"Updated Product Name\",\n        \"ar\": \"اسم المنتج المحدث\"\n    },\n    \"description\": {\n        \"en\": \"Updated description\",\n        \"ar\": \"وصف محدث\"\n    },\n    \"status\": \"active\",\n    \"variants\": [\n        {\n            \"id\": 1,\n            \"sku\": \"SKU-001-UPDATED\"\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}"]
						},
						"description": "Update an existing product.\n\nPermission: `catalog.products.edit`\n\n**Validation Notes:**\n- `parent_id` validates against `sales_products` table\n- `variants.*.id` validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Delete Product",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}"]
						},
						"description": "Soft delete a product.\n\nPermission: `catalog.products.delete`"
					},
					"response": []
				},
				{
					"name": "Force Delete Product",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/force-delete",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "force-delete"]
						},
						"description": "Permanently delete a product.\n\nPermission: `catalog.products.delete`"
					},
					"response": []
				},
				{
					"name": "Restore Product",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/restore",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "restore"]
						},
						"description": "Restore a soft-deleted product.\n\nPermission: `catalog.products.restore`"
					},
					"response": []
				},
				{
					"name": "Bulk Delete Products",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"ids\": [1, 2, 3]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/bulk-delete",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "bulk-delete"]
						},
						"description": "Bulk delete multiple products.\n\nPermission: `catalog.products.bulk-delete`"
					},
					"response": []
				},
				{
					"name": "Bulk Restore Products",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"ids\": [1, 2, 3]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/bulk-restore",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "bulk-restore"]
						},
						"description": "Bulk restore multiple soft-deleted products.\n\nPermission: `catalog.products.restore`"
					},
					"response": []
				}
			],
			"description": "Products CRUD operations (Legacy endpoints).\n\nBase: `/api/v1/catalog/products`"
		},
		{
			"name": "Product Variants",
			"item": [
				{
					"name": "Get All Variants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Get all product variants with pagination.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Create Variant",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"product_id\": 1,\n    \"variant_group_id\": null,\n    \"sku\": \"VAR-SKU-001\",\n    \"barcode\": \"123456789\",\n    \"origin_country\": \"US\",\n    \"quality_grade\": \"oem\",\n    \"manufacturer_location\": \"California\",\n    \"certification\": \"ISO 9001\",\n    \"warranty_terms\": \"1 year\",\n    \"is_preferred\": true,\n    \"notes\": \"Variant notes\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants"]
						},
						"description": "Create a new product variant.\n\nPermission: `catalog.products.create`\n\n**Validation Notes:**\n- `product_id` validates against `catalog_items` table\n- `variant_group_id` validates against `catalog_product_variant_groups` table\n- `sku` must be unique in `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Get Single Variant",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants", "{{product_id}}"]
						},
						"description": "Get a single product variant by ID.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Update Variant",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"sku\": \"VAR-SKU-001-UPDATED\",\n    \"barcode\": \"987654321\",\n    \"quality_grade\": \"compatible\",\n    \"is_preferred\": false\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants", "{{product_id}}"]
						},
						"description": "Update an existing product variant.\n\nPermission: `catalog.products.edit`\n\n**Validation Notes:**\n- `sku` must be unique in `sales_products` table (excluding current variant)"
					},
					"response": []
				},
				{
					"name": "Delete Variant",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants", "{{product_id}}"]
						},
						"description": "Delete a product variant.\n\nPermission: `catalog.products.delete`"
					},
					"response": []
				},
				{
					"name": "Restore Variant",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants/{{product_id}}/restore",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants", "{{product_id}}", "restore"]
						},
						"description": "Restore a deleted product variant.\n\nPermission: `catalog.products.restore`"
					},
					"response": []
				},
				{
					"name": "Get Variants by Product",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-variants/product/{{product_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-variants", "product", "{{product_id}}"]
						},
						"description": "Get all variants for a specific product.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				}
			],
			"description": "Product Variants CRUD operations.\n\nBase: `/api/v1/catalog/product-variants`\n\n**Note:** After product unification, variants now use `CatalogProduct` from `sales_products` table."
		},
		{
			"name": "Product Aliases",
			"item": [
				{
					"name": "Get All Aliases",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Get all product aliases with pagination.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Create Alias",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"product_id\": 1,\n    \"alias_name\": \"Alternative Product Name\",\n    \"alias_type\": \"common_name\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases"]
						},
						"description": "Create a new product alias.\n\nPermission: `catalog.products.create`\n\n**Validation Notes:**\n- `product_id` validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Get Single Alias",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases", "1"]
						},
						"description": "Get a single product alias by ID.\n\nPermission: `catalog.products.view`"
					},
					"response": []
				},
				{
					"name": "Update Alias",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"alias_name\": \"Updated Alias Name\",\n    \"alias_type\": \"brand_name\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases", "1"]
						},
						"description": "Update an existing product alias.\n\nPermission: `catalog.products.edit`\n\n**Validation Notes:**\n- `product_id` validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Delete Alias",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases", "1"]
						},
						"description": "Delete a product alias.\n\nPermission: `catalog.products.delete`"
					},
					"response": []
				},
				{
					"name": "Restore Alias",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/product-aliases/1/restore",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "product-aliases", "1", "restore"]
						},
						"description": "Restore a deleted product alias.\n\nPermission: `catalog.products.restore`"
					},
					"response": []
				}
			],
			"description": "Product Aliases CRUD operations.\n\nBase: `/api/v1/catalog/product-aliases`"
		},
		{
			"name": "Product Bundles",
			"item": [
				{
					"name": "Get All Bundles",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Get all product bundles with pagination."
					},
					"response": []
				},
				{
					"name": "Get Available Bundles",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/available",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "available"]
						},
						"description": "Get available bundles for customers (active and valid)."
					},
					"response": []
				},
				{
					"name": "Create Bundle",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": {\n        \"en\": \"Summer Bundle\",\n        \"ar\": \"حزمة الصيف\"\n    },\n    \"description\": {\n        \"en\": \"Special summer discount bundle\",\n        \"ar\": \"حزمة خصم صيفية خاصة\"\n    },\n    \"bundle_type\": \"fixed\",\n    \"status\": \"active\",\n    \"discount_type\": \"percentage\",\n    \"discount_value\": 15,\n    \"min_quantity\": 1,\n    \"max_quantity\": 10,\n    \"valid_from\": \"2024-06-01\",\n    \"valid_until\": \"2024-08-31\",\n    \"items\": [\n        {\n            \"product_id\": 1,\n            \"quantity\": 2,\n            \"is_required\": true\n        },\n        {\n            \"product_id\": 2,\n            \"quantity\": 1,\n            \"is_required\": false,\n            \"min_quantity\": 1,\n            \"max_quantity\": 3\n        }\n    ],\n    \"rules\": [\n        {\n            \"name\": \"Quantity Discount\",\n            \"rule_type\": \"discount\",\n            \"condition_field\": \"quantity\",\n            \"condition_operator\": \">=\",\n            \"condition_value\": \"5\",\n            \"action_type\": \"percentage_discount\",\n            \"action_value\": 5,\n            \"priority\": 1,\n            \"is_active\": true\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles"]
						},
						"description": "Create a new product bundle.\n\n**Validation Notes:**\n- `items.*.product_id` validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Get Single Bundle",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1"]
						},
						"description": "Get a single bundle with items and rules."
					},
					"response": []
				},
				{
					"name": "Get Bundle Pricing",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1/pricing?quantity=5",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1", "pricing"],
							"query": [
								{
									"key": "quantity",
									"value": "5"
								}
							]
						},
						"description": "Calculate bundle pricing with discounts and rules."
					},
					"response": []
				},
				{
					"name": "Get Bundle Stats",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1/stats",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1", "stats"]
						},
						"description": "Get bundle statistics (items count, pricing, etc.)."
					},
					"response": []
				},
				{
					"name": "Validate Bundle",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"items\": [\n        {\n            \"product_id\": 1,\n            \"quantity\": 2\n        },\n        {\n            \"product_id\": 2,\n            \"quantity\": 1\n        }\n    ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1/validate",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1", "validate"]
						},
						"description": "Validate bundle items for purchase."
					},
					"response": []
				},
				{
					"name": "Update Bundle",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": {\n        \"en\": \"Updated Bundle Name\"\n    },\n    \"discount_value\": 20,\n    \"status\": \"active\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1"]
						},
						"description": "Update an existing bundle.\n\n**Validation Notes:**\n- `items.*.product_id` validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Delete Bundle",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1"]
						},
						"description": "Delete a bundle."
					},
					"response": []
				},
				{
					"name": "Restore Bundle",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1/restore",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1", "restore"]
						},
						"description": "Restore a deleted bundle."
					},
					"response": []
				},
				{
					"name": "Duplicate Bundle",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/bundles/1/duplicate",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "bundles", "1", "duplicate"]
						},
						"description": "Duplicate an existing bundle."
					},
					"response": []
				}
			],
			"description": "Product Bundles CRUD operations.\n\nBase: `/api/v1/catalog/bundles`"
		},
		{
			"name": "Inventory",
			"item": [
				{
					"name": "Get All Inventory",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory?page=1&per_page=15",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "per_page",
									"value": "15"
								}
							]
						},
						"description": "Get all inventory records with pagination.\n\nPermission: `catalog.inventory.view`"
					},
					"response": []
				},
				{
					"name": "Create Inventory",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"sales_product_id\": 1,\n    \"warehouse_id\": 1,\n    \"inventory_type_id\": 1,\n    \"quantity\": 100,\n    \"min_stock_level\": 10,\n    \"max_stock_level\": 500\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory"]
						},
						"description": "Create a new inventory record.\n\nPermission: `catalog.inventory.create`\n\n**BREAKING CHANGE:**\n- Field renamed from `product_variant_id` to `sales_product_id`\n- Validates against `sales_products` table"
					},
					"response": []
				},
				{
					"name": "Get Single Inventory",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "1"]
						},
						"description": "Get a single inventory record.\n\nPermission: `catalog.inventory.view`"
					},
					"response": []
				},
				{
					"name": "Update Inventory",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"quantity\": 150,\n    \"min_stock_level\": 15,\n    \"max_stock_level\": 600\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "1"]
						},
						"description": "Update an inventory record.\n\nPermission: `catalog.inventory.edit`\n\n**BREAKING CHANGE:**\n- Field renamed from `product_variant_id` to `sales_product_id`"
					},
					"response": []
				},
				{
					"name": "Delete Inventory",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "1"]
						},
						"description": "Delete an inventory record.\n\nPermission: `catalog.inventory.delete`"
					},
					"response": []
				},
				{
					"name": "Adjust Inventory",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"adjustment\": 50,\n    \"reason\": \"stock_adjustment\",\n    \"notes\": \"Manual stock adjustment\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/1/adjust",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "1", "adjust"]
						},
						"description": "Adjust inventory quantity (positive or negative).\n\nPermission: `catalog.inventory.edit`"
					},
					"response": []
				},
				{
					"name": "Get Low Stock",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/low-stock",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "low-stock"]
						},
						"description": "Get inventory items below minimum stock level.\n\nPermission: `catalog.inventory.view`"
					},
					"response": []
				},
				{
					"name": "Get Inventory by Warehouse",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/warehouse/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "warehouse", "1"]
						},
						"description": "Get all inventory for a specific warehouse.\n\nPermission: `catalog.inventory.view`"
					},
					"response": []
				},
				{
					"name": "Get Inventory by Sales Product",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/inventory/sales-product/1",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "inventory", "sales-product", "1"]
						},
						"description": "Get all inventory for a specific sales product.\n\nPermission: `catalog.inventory.view`"
					},
					"response": []
				}
			],
			"description": "Inventory CRUD operations.\n\nBase: `/api/v1/catalog/inventory`\n\n**BREAKING CHANGES:**\n- Request field renamed: `product_variant_id` → `sales_product_id`\n- Response field renamed: `product_variant_id` → `sales_product_id`\n- Response relation renamed: `product_variant` → `sales_product`"
		},
		{
			"name": "Client Pricing",
			"item": [
				{
					"name": "Get Client Pricing",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/client-pricing",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "client-pricing"]
						},
						"description": "Get client pricing for a product.\n\nPermission: `catalog.products.pricing`"
					},
					"response": []
				},
				{
					"name": "Create Client Pricing",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"product_id\": 1,\n    \"client_id\": 1,\n    \"client_site_id\": null,\n    \"unit_id\": 1,\n    \"price\": 100.00,\n    \"discount_type\": \"percentage\",\n    \"discount_value\": 10,\n    \"valid_from\": \"2024-01-01\",\n    \"valid_to\": \"2024-12-31\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/client-pricing",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "client-pricing"]
						},
						"description": "Create client-specific pricing.\n\nPermission: `catalog.products.pricing`\n\n**Validation Notes:**\n- `product_id` validates against `sales_products` table"
					},
					"response": []
				}
			],
			"description": "Client-specific pricing for products.\n\nBase: `/api/v1/catalog/products/{product}/client-pricing`"
		},
		{
			"name": "Supplier Pricing",
			"item": [
				{
					"name": "Get Supplier Pricing",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/supplier-pricing",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "supplier-pricing"]
						},
						"description": "Get supplier pricing for a product.\n\nPermission: `catalog.products.pricing`"
					},
					"response": []
				},
				{
					"name": "Create Supplier Pricing",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{TOKEN}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"product_id\": 1,\n    \"supplier_id\": 1,\n    \"driver_id\": null,\n    \"unit_id\": 1,\n    \"price\": 75.00,\n    \"min_order_quantity\": 10,\n    \"lead_time_days\": 7,\n    \"valid_from\": \"2024-01-01\",\n    \"valid_to\": \"2024-12-31\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{BASE_URL}}/catalog/products/{{product_id}}/supplier-pricing",
							"host": ["{{BASE_URL}}"],
							"path": ["catalog", "products", "{{product_id}}", "supplier-pricing"]
						},
						"description": "Create supplier-specific pricing.\n\nPermission: `catalog.products.pricing`\n\n**Validation Notes:**\n- `product_id` validates against `sales_products` table"
					},
					"response": []
				}
			],
			"description": "Supplier-specific pricing for products.\n\nBase: `/api/v1/catalog/products/{product}/supplier-pricing`"
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{TOKEN}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}
