{
	"info": {
		"_postman_id": "f731750f-49b1-4d24-8703-4386c94a3519",
		"name": "Supply Chain - Branch Changes",
		"description": "This collection contains only the new and edited endpoints in the current branch, covering Unified Quotes, Consolidated Supplier Quotes, Repricing, and enhanced Supplier PO management.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Unified Quotes",
			"item": [
				{
					"name": "List Quotes (Supplier/Customer)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/quotes?offer_type=supplier",
							"host": ["{{BASE_URL}}"],
							"path": ["quotes"],
							"query": [
								{
									"key": "offer_type",
									"value": "supplier",
									"description": "Set to 'supplier' or 'customer'"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Quote",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"offer_type\": \"supplier\",\n    \"supplier_id\": 1,\n    \"supply_order_id\": 1,\n    \"items\": [\n        {\n            \"supply_order_item_id\": 1,\n            \"unit_price\": 120.00,\n            \"quantity\": 10,\n            \"unit_id\": 1\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/quotes",
							"host": ["{{BASE_URL}}"],
							"path": ["quotes"]
						}
					},
					"response": []
				},
				{
					"name": "Get Quote Details",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/quotes/{{quote_id}}?offer_type=supplier",
							"host": ["{{BASE_URL}}"],
							"path": ["quotes", "{{quote_id}}"],
							"query": [
								{
									"key": "offer_type",
									"value": "supplier"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Update Quote",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"offer_type\": \"supplier\",\n    \"items\": [\n        {\n            \"supply_order_item_id\": 1,\n            \"unit_price\": 115.00,\n            \"quantity\": 10\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/quotes/{{quote_id}}",
							"host": ["{{BASE_URL}}"],
							"path": ["quotes", "{{quote_id}}"]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Consolidated Supplier Quotes",
			"item": [
				{
					"name": "Store Consolidated Quote",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"supplier_id\": 1,\n    \"items\": [\n        {\n            \"supply_order_item_id\": 1,\n            \"unit_price\": 10.5,\n            \"quantity\": 100,\n            \"unit_id\": 1\n        },\n        {\n            \"supply_order_item_id\": 2,\n            \"unit_price\": 25.0,\n            \"quantity\": 50,\n            \"unit_id\": 1\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/consolidated-quotes",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "consolidated-quotes"]
						}
					},
					"response": []
				},
				{
					"name": "Compare Multi-Supplier Quotes",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/consolidated-quotes/compare",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "consolidated-quotes", "compare"]
						}
					},
					"response": []
				},
				{
					"name": "Save Draft",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/save-draft",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "save-draft"]
						}
					},
					"response": []
				},
				{
					"name": "Finalize & Confirm",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/finalize",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "finalize"]
						}
					},
					"response": []
				},
				{
					"name": "Export PDF",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/export-pdf",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "export-pdf"]
						}
					},
					"response": []
				},
				{
					"name": "Download PDF",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/download-pdf",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "download-pdf"]
						}
					},
					"response": []
				},
				{
					"name": "Reset to Draft",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/reset-to-draft",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "reset-to-draft"]
						}
					},
					"response": []
				},
				{
					"name": "Check Action Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/{{quote_id}}/action-status",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "{{quote_id}}", "action-status"]
						}
					},
					"response": []
				},
				{
					"name": "Get Consolidated Quote Statistics",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/consolidated-quotes/statistics",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "consolidated-quotes", "statistics"]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Repricing System",
			"item": [
				{
					"name": "Trigger Repricing",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/quotations/{{quotation_id}}/trigger-repricing",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "quotations", "{{quotation_id}}", "trigger-repricing"]
						}
					},
					"response": []
				},
				{
					"name": "Get Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/repricing-status",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "repricing-status"]
						}
					},
					"response": []
				},
				{
					"name": "Check Validity",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/items/{{item_id}}/check-validity",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "items", "{{item_id}}", "check-validity"]
						}
					},
					"response": []
				},
				{
					"name": "Approve New Quote",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"quote_id\": 123\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/items/{{item_id}}/approve-new-quote",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "items", "{{item_id}}", "approve-new-quote"]
						}
					},
					"response": []
				},
				{
					"name": "Complete Repricing",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/orders/{{order_id}}/complete-repricing",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "orders", "{{order_id}}", "complete-repricing"]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Quotation Pricing",
			"item": [
				{
					"name": "Bulk Apply Strategy",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"strategy\": \"markup\",\n    \"value\": 15\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/quotations/{{quotation_id}}/pricing/bulk/apply",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "quotations", "{{quotation_id}}", "pricing", "bulk", "apply"]
						}
					},
					"response": []
				},
				{
					"name": "Set Target Net Total",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"target_total\": 50000\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/quotations/{{quotation_id}}/pricing/target-net-total",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "quotations", "{{quotation_id}}", "pricing", "target-net-total"]
						}
					},
					"response": []
				},
				{
					"name": "Toggle Distribution Inclusion",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"item_ids\": [1, 2, 3],\n    \"included\": false\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/quotations/{{quotation_id}}/pricing/items/toggle-distribution",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "quotations", "{{quotation_id}}", "pricing", "items", "toggle-distribution"]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Supplier PO from Customer PO",
			"item": [
				{
					"name": "Ready for Creation",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/customer-purchase-orders/{{po_id}}/supplier-purchase-orders/ready",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "customer-purchase-orders", "{{po_id}}", "supplier-purchase-orders", "ready"]
						}
					},
					"response": []
				},
				{
					"name": "Create Single PO",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/supply/customer-purchase-orders/{{po_id}}/supplier-purchase-orders/create-single",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "customer-purchase-orders", "{{po_id}}", "supplier-purchase-orders", "create-single"]
						}
					},
					"response": []
				},
				{
					"name": "Create Partial PO",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"items\": [\n        {\n            \"customer_po_item_id\": 1,\n            \"quantity\": 5\n        }\n    ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/supply/customer-purchase-orders/{{po_id}}/supplier-purchase-orders/create-partial",
							"host": ["{{BASE_URL}}"],
							"path": ["supply", "customer-purchase-orders", "{{po_id}}", "supplier-purchase-orders", "create-partial"]
						}
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000/api/v1"
		},
		{
			"key": "order_id",
			"value": "1"
		},
		{
			"key": "quote_id",
			"value": "1"
		},
		{
			"key": "quotation_id",
			"value": "1"
		},
		{
			"key": "item_id",
			"value": "1"
		},
		{
			"key": "po_id",
			"value": "1"
		}
	]
}
