{
  "info": {
    "name": "Supply Quotation Pricing System API",
    "description": "Complete API collection for Advanced Pricing Management System - Strategies, Bulk Operations, Target Pricing & Distribution",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "BASE_URL",
      "value": "http://localhost:8000/api/v1",
      "type": "string"
    },
    {
      "key": "access_token",
      "value": "your_auth_token_here",
      "type": "string"
    },
    {
      "key": "quotationId",
      "value": "1",
      "type": "string"
    },
    {
      "key": "strategyId",
      "value": "1",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "1. Pricing Strategies - CRUD Operations",
      "item": [
        {
          "name": "List All Pricing Strategies",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing?page=1&per_page=15",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "per_page",
                  "value": "15"
                }
              ]
            },
            "description": "Retrieve paginated list of all pricing strategies for a quotation"
          }
        },
        {
          "name": "Create Pricing Strategy - Percentage",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_id\": 1,\n  \"strategy_type\": \"percentage\",\n  \"strategy_value\": 25,\n  \"cost_price\": 100,\n  \"notes\": \"25% markup strategy for standard suppliers\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing"
              ]
            },
            "description": "Create a new pricing strategy with percentage markup"
          }
        },
        {
          "name": "Create Pricing Strategy - Fixed Amount",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_id\": 2,\n  \"strategy_type\": \"fixed_amount\",\n  \"strategy_value\": 50,\n  \"cost_price\": 100,\n  \"notes\": \"Fixed $50 markup for this supplier\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing"
              ]
            },
            "description": "Create a new pricing strategy with fixed amount markup"
          }
        },
        {
          "name": "Create Pricing Strategy - Manual",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_id\": 3,\n  \"strategy_type\": \"manual\",\n  \"cost_price\": 100,\n  \"calculated_selling_price\": 150,\n  \"notes\": \"Manual pricing based on market analysis\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing"
              ]
            },
            "description": "Create a new pricing strategy with manual price setting"
          }
        },
        {
          "name": "Create Pricing Strategy - Cost Based",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_id\": 4,\n  \"strategy_type\": \"cost_based\",\n  \"cost_price\": 100,\n  \"notes\": \"Selling at cost price (no margin)\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing"
              ]
            },
            "description": "Create a new pricing strategy with cost-based pricing (no profit)"
          }
        },
        {
          "name": "Get Pricing Strategy Details",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/{{strategyId}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "{{strategyId}}"
              ]
            },
            "description": "Retrieve detailed information of a specific pricing strategy"
          }
        },
        {
          "name": "Update Pricing Strategy",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"strategy_type\": \"percentage\",\n  \"strategy_value\": 30,\n  \"notes\": \"Updated to 30% markup\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/{{strategyId}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "{{strategyId}}"
              ]
            },
            "description": "Update an existing pricing strategy"
          }
        },
        {
          "name": "Delete Pricing Strategy",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/{{strategyId}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "{{strategyId}}"
              ]
            },
            "description": "Delete a pricing strategy"
          }
        }
      ]
    },
    {
      "name": "2. Strategy Locking - Lock & Unlock",
      "item": [
        {
          "name": "Lock Pricing Strategy",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/{{strategyId}}/lock",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "{{strategyId}}",
                "lock"
              ]
            },
            "description": "Lock a pricing strategy to prevent changes during distribution"
          }
        },
        {
          "name": "Unlock Pricing Strategy",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/{{strategyId}}/unlock",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "{{strategyId}}",
                "unlock"
              ]
            },
            "description": "Unlock a pricing strategy to allow modifications"
          }
        }
      ]
    },
    {
      "name": "3. Bulk Operations - Apply to Multiple Items",
      "item": [
        {
          "name": "Preview Bulk Pricing Application",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3, 4, 5],\n  \"strategy_type\": \"percentage\",\n  \"strategy_value\": 20,\n  \"cost_price\": null\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/bulk/preview",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "bulk",
                "preview"
              ]
            },
            "description": "Preview bulk pricing application without committing changes"
          }
        },
        {
          "name": "Apply Bulk Pricing Strategy",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3],\n  \"strategy_type\": \"percentage\",\n  \"strategy_value\": 25,\n  \"notes\": \"Bulk 25% markup for premium suppliers\",\n  \"force_override\": false\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/bulk/apply",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "bulk",
                "apply"
              ]
            },
            "description": "Apply pricing strategy to multiple supplier quotes simultaneously"
          }
        },
        {
          "name": "Lock Multiple Supplier Quotes",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3, 4],\n  \"reason\": \"approved_by_manager\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/bulk/lock",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "bulk",
                "lock"
              ]
            },
            "description": "Lock multiple supplier quotes to prevent pricing changes"
          }
        },
        {
          "name": "Unlock Multiple Supplier Quotes",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3, 4]\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/bulk/unlock",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "bulk",
                "unlock"
              ]
            },
            "description": "Unlock multiple supplier quotes to allow pricing modifications"
          }
        }
      ]
    },
    {
      "name": "4. Target Pricing & Distribution - Profit Optimization",
      "item": [
        {
          "name": "Apply Target Total Profit Pricing",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3, 4],\n  \"target_total_profit\": 5000,\n  \"distribution_method\": \"proportional_to_cost\",\n  \"notes\": \"Target profit of 5000 SAR across all items\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/target-profit",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "target-profit"
              ]
            },
            "description": "Distribute target profit across supplier quotes using selected distribution method"
          }
        },
        {
          "name": "Apply Target Average Margin Percentage",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3],\n  \"target_margin_percentage\": 30,\n  \"distribution_method\": \"equal_amount\",\n  \"notes\": \"Target 30% average margin across all items\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/target-margin-percentage",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "target-margin-percentage"
              ]
            },
            "description": "Apply target margin percentage across supplier quotes"
          }
        },
        {
          "name": "Apply Target Revenue Percentage",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"supplier_quote_ids\": [1, 2, 3, 4],\n  \"target_revenue_percentage\": 25,\n  \"distribution_method\": \"proportional_to_quantity\",\n  \"notes\": \"Target 25% of revenue as profit\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/target-revenue-percentage",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "target-revenue-percentage"
              ]
            },
            "description": "Distribute profit based on target revenue percentage across items"
          }
        },
        {
          "name": "Get Target Pricing Details",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/target-pricing",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "target-pricing"
              ]
            },
            "description": "Retrieve all target pricing configurations for a quotation"
          }
        },
        {
          "name": "Finalize Target Pricing",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approved_by_user_id\": 1,\n  \"approval_notes\": \"Pricing approved by operations manager\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/target-pricing/finalize",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "target-pricing",
                "finalize"
              ]
            },
            "description": "Lock in target pricing and prevent further modifications"
          }
        }
      ]
    },
    {
      "name": "5. Summary & Statistics - Quotation Overview",
      "item": [
        {
          "name": "Get Quotation Pricing Summary",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/supply/quotations/{{quotationId}}/pricing/summary",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                "supply",
                "quotations",
                "{{quotationId}}",
                "pricing",
                "summary"
              ]
            },
            "description": "Retrieve comprehensive quotation pricing summary with totals and statistics"
          }
        }
      ]
    }
  ]
}
