{
	"info": {
		"_postman_id": "84725391-4567-8901-abcd-ef0123456789",
		"name": "Maintenance Inline Execution - Changes Only",
		"description": "Collection focusing specifically on the refactored maintenance asset submission endpoint with nested faults and spare parts.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Save Asset Maintenance (Inline Faults & Parts)",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json",
						"type": "text"
					},
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"assets\": [\n        {\n            \"asset_id\": {{asset_id}},\n            \"checklist_data\": [\n                {\n                    \"checklist_item_id\": 110,\n                    \"result\": \"no\",\n                    \"is_compliant\": false,\n                    \"fault\": {\n                        \"description\": \"Control wiring damage found during inspection\",\n                        \"severity\": \"high\",\n                        \"spare_parts\": [\n                            {\n                                \"part_name\": \"Elevator control wire (5m)\",\n                                \"part_number\": \"EC-ELV-002\",\n                                \"brand\": \"OTIS\",\n                                \"model\": \"ELEVATOR-2024\",\n                                \"quantity\": 1,\n                                \"source\": \"stock\"\n                            }\n                        ]\n                    }\n                },\n                {\n                    \"checklist_item_id\": 111,\n                    \"result\": \"yes\",\n                    \"is_compliant\": true\n                }\n            ],\n            \"temporary_folders\": [\n                \"tmp_asset_inspection_123\"\n            ]\n        }\n    ]\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{baseUrl}}/api/maintenance/visits/{{visit_id}}/assets/maintenance",
					"host": [
						"{{baseUrl}}"
					],
					"path": [
						"api",
						"maintenance",
						"visits",
						"{{visit_id}}",
						"assets",
						"maintenance"
					]
				},
				"description": "Saves checklist results, inline faults, and associated spare parts for one or more assets in a single atomic operation."
			},
			"response": []
		}
	],
	"variable": [
		{
			"key": "baseUrl",
			"value": "http://localhost:8000"
		},
		{
			"key": "visit_id",
			"value": "1"
		},
		{
			"key": "asset_id",
			"value": "18"
		}
	]
}
