{
    "info":  {
                 "name":  "Admin Products - Complete Create Update Delete",
                 "description":  "Complete product create/update contracts with recommendation_sections appended. No separate recommendation API. display_limit is calculated by the backend: manual uses product_ids count; category resolves 5 to 15 eligible products.",
                 "schema":  "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
             },
    "variable":  [
                     {
                         "key":  "base_url",
                         "value":  "http://127.0.0.1:8001/api/v1"
                     },
                     {
                         "key":  "admin_token",
                         "value":  ""
                     },
                     {
                         "key":  "product_id",
                         "value":  "1"
                     }
                 ],
    "item":  [
                 {
                     "name":  "Create Product",
                     "request":  {
                                     "method":  "POST",
                                     "header":  [
                                                    {
                                                        "key":  "Accept",
                                                        "value":  "application/json"
                                                    },
                                                    {
                                                        "key":  "Content-Type",
                                                        "value":  "application/json"
                                                    },
                                                    {
                                                        "key":  "Authorization",
                                                        "value":  "Bearer {{admin_token}}"
                                                    }
                                                ],
                                     "body":  {
                                                  "mode":  "raw",
                                                  "options":  {
                                                                  "raw":  {
                                                                              "language":  "json"
                                                                          }
                                                              },
                                                  "raw":  "{\n  \"name\": \"Recommendation Test Product 20260921-02\",\n  \"slug\": \"recommendation-test-product-20260921-02\",\n  \"is_active\": true,\n  \"is_special_offer\": false,\n  \"sku\": \"REC-20260921-02\",\n  \"stock\": 20,\n  \"original_price\": 1850000,\n  \"description\": \"Product description for admin create\",\n  \"detailed_description\": \"Detailed product description\",\n  \"embed_code\": null,\n  \"product_accounting_code\": \"ACC-20260921-02\",\n  \"label_id\": null,\n  \"category_ids\": [574],\n  \"brand_id\": null,\n  \"unit_id\": null,\n  \"display_order\": 1,\n  \"is_unlimited\": false,\n  \"meta\": {\n    \"meta_title\": \"Recommendation test product\",\n    \"meta_description\": \"SEO description for recommendation test product\",\n    \"meta_keywords\": [\"product\", \"recommendation\"],\n    \"canonical\": \"/products/recommendation-test-product\"\n  },\n  \"recommendation_sections\": [\n    {\n      \"id\": \"rs_others_bought\",\n      \"title\": \"Others Bought\",\n      \"position\": 0,\n      \"is_active\": true,\n      \"source\": \"manual\",\n      \"product_ids\": [50, 51, 52, 53, 54]\n    },\n    {\n      \"id\": \"rs_similar\",\n      \"title\": \"Similar Products\",\n      \"position\": 1,\n      \"is_active\": true,\n      \"source\": \"category\",\n      \"category\": {\n        \"category_ids\": [574],\n        \"include_descendants\": true,\n        \"sort\": \"best_selling\",\n        \"only_available\": true,\n        \"exclude_product_ids\": []\n      }\n    }\n  ]\n}"
                                              },
                                     "url":  "{{base_url}}/admin/products",
                                     "description":  "Complete existing create-product payload with recommendation_sections appended. No separate recommendation endpoint."
                                 }
                 },
                 {
                     "name":  "Update Product",
                     "request":  {
                                     "method":  "PATCH",
                                     "header":  [
                                                    {
                                                        "key":  "Accept",
                                                        "value":  "application/json"
                                                    },
                                                    {
                                                        "key":  "Content-Type",
                                                        "value":  "application/json"
                                                    },
                                                    {
                                                        "key":  "Authorization",
                                                        "value":  "Bearer {{admin_token}}"
                                                    }
                                                ],
                                     "body":  {
                                                  "mode":  "raw",
                                                  "options":  {
                                                                  "raw":  {
                                                                              "language":  "json"
                                                                          }
                                                              },
                                                  "raw":  "{\n  \"name\": \"Current Product Name\",\n  \"slug\": \"current-product-slug\",\n  \"is_active\": true,\n  \"is_special_offer\": false,\n  \"sku\": \"CURRENT-SKU\",\n  \"stock\": 20,\n  \"original_price\": 1850000,\n  \"description\": \"Updated product description\",\n  \"detailed_description\": \"Updated detailed product description\",\n  \"embed_code\": null,\n  \"product_accounting_code\": \"CURRENT-ACC\",\n  \"label_id\": null,\n  \"category_ids\": [574],\n  \"brand_id\": null,\n  \"unit_id\": null,\n  \"display_order\": 1,\n  \"is_unlimited\": false,\n  \"meta\": {\n    \"meta_title\": \"Updated product title\",\n    \"meta_description\": \"Updated SEO description\",\n    \"meta_keywords\": [\"updated\", \"recommendation\"],\n    \"canonical\": \"/products/current-product-slug\"\n  },\n  \"discount\": {\n    \"discount_percent\": 10,\n    \"start_date\": \"2027-01-01 00:00:00\",\n    \"end_date\": \"2030-01-01 00:00:00\",\n    \"is_visible\": true\n  },\n  \"recommendation_sections\": [\n    {\n      \"id\": \"rs_others_bought\",\n      \"title\": \"Updated Recommendations\",\n      \"position\": 0,\n      \"is_active\": true,\n      \"source\": \"manual\",\n      \"product_ids\": [50, 51, 52, 53, 54]\n    },\n    {\n      \"id\": \"rs_similar\",\n      \"title\": \"Similar Products\",\n      \"position\": 1,\n      \"is_active\": true,\n      \"source\": \"category\",\n      \"category\": {\n        \"category_ids\": [574],\n        \"include_descendants\": true,\n        \"sort\": \"newest\",\n        \"only_available\": true,\n        \"exclude_product_ids\": []\n      }\n    }\n  ]\n}"
                                              },
                                     "url":  "{{base_url}}/admin/products/{{product_id}}",
                                     "description":  "Complete existing update-product payload with recommendation_sections appended. Set product variables to the current saved values."
                                 }
                 },
                 {
                     "name":  "Delete Product",
                     "request":  {
                                     "method":  "DELETE",
                                     "header":  [
                                                    {
                                                        "key":  "Accept",
                                                        "value":  "application/json"
                                                    },
                                                    {
                                                        "key":  "Authorization",
                                                        "value":  "Bearer {{admin_token}}"
                                                    }
                                                ],
                                     "url":  "{{base_url}}/admin/products/{{product_id}}",
                                     "description":  "Deletes the product; its recommendation sections are deleted automatically."
                                 }
                 }
             ]
}