{
	"info": {
		"_postman_id": "0fe01985-ff46-45de-9876-c6e9561375eb",
		"name": "Consolidated Quotes API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Consolidated Quotes",
			"item": [
				{
					"name": "List Quotes by Order",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_MODEL}}/supply/orders/:order_id/consolidated-quotes",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"orders",
								":order_id",
								"consolidated-quotes"
							],
							"variable": [
								{
									"key": "order_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Consolidated Quote",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"supplier_id\": 10,\n    \"items\": [\n        {\n            \"supply_order_item_id\": 5,\n            \"unit_price\": 150.50,\n            \"quantity\": 2,\n            \"total_price\": 301.00\n        },\n        {\n            \"supply_order_item_id\": 6,\n            \"unit_price\": 45.00,\n            \"quantity\": 10,\n            \"total_price\": 450.00\n        }\n    ],\n    \"currency\": \"SAR\",\n    \"notes\": \"Initial quote for spare parts\"\n}"
						},
						"url": {
							"raw": "{{BASE_MODEL}}/supply/orders/:order_id/consolidated-quotes",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"orders",
								":order_id",
								"consolidated-quotes"
							],
							"variable": [
								{
									"key": "order_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Save as Draft",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"notes\": \"Updated terms for the consolidated quote\",\n    \"total_price\": 751.00,\n    \"lead_time_days\": 5,\n    \"payment_method\": \"Cash\"\n}"
						},
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/save-draft",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"save-draft"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Finalize Quote",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"finalized_at\": \"2024-03-14 10:00:00\"\n}"
						},
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/finalize",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"finalize"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Export to PDF",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/export-pdf",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"export-pdf"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Download PDF URL",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/download-pdf",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"download-pdf"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Reset to Draft",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/reset-to-draft",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"reset-to-draft"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Action Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_MODEL}}/supply/consolidated-quotes/:quote_id/action-status",
							"host": [
								"{{BASE_MODEL}}"
							],
							"path": [
								"supply",
								"consolidated-quotes",
								":quote_id",
								"action-status"
							],
							"variable": [
								{
									"key": "quote_id",
									"value": "1"
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_MODEL",
			"value": "http://localhost/api/v1"
		}
	]
}
