{
	"info": {
		"_postman_id": "77bd0a44-ae4f-4ea5-ad46-7435a7fb5ddd",
		"name": "Payroll Wizard 3-Step Process",
		"description": "Postman collection for the new 3-step payroll generation wizard.\n\nSteps:\n1. Preview calculations\n2. Generate Draft and Edit\n3. Finalize and Save",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Step 1: Preview Payroll",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"month\": 3,\n    \"year\": 2026,\n    \"department_id\": 1,\n    \"frequency\": \"monthly\",\n    \"components\": {\n        \"basic\": true,\n        \"allowances\": true,\n        \"deductions\": true,\n        \"rewards\": true,\n        \"penalties\": true,\n        \"overtime\": true,\n        \"tax\": true\n    }\n}"
				},
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/runs/preview",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"runs",
						"preview"
					]
				},
				"description": "Calculates and returns a preview of all eligible employees and their components without saving to database."
			},
			"response": []
		},
		{
			"name": "Step 2: Generate Draft (Preliminary)",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"month\": 3,\n    \"year\": 2026,\n    \"department_id\": 1,\n    \"frequency\": \"monthly\",\n    \"components\": {\n        \"basic\": true,\n        \"allowances\": true,\n        \"deductions\": true,\n        \"rewards\": true,\n        \"penalties\": true,\n        \"overtime\": true,\n        \"tax\": true\n    },\n    \"notes\": \"March 2026 Payroll Draft\"\n}"
				},
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/runs",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"runs"
					]
				},
				"description": "Creates a Payroll Run in DRAFT status and generates all salary slips."
			},
			"response": []
		},
		{
			"name": "Step 2: Edit Salary Slip (Manual)",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"basic_salary\": 5500.00,\n    \"allowances\": 200.00,\n    \"notes\": \"Manual adjustment during review\"\n}"
				},
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/salary-slips/{{SLIP_ID}}",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"salary-slips",
						"{{SLIP_ID}}"
					]
				},
				"description": "Update specific values for an individual employee's salary slip while in draft."
			},
			"response": []
		},
		{
			"name": "Step 2: Deselect Employee (Delete Slip)",
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/salary-slips/{{SLIP_ID}}",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"salary-slips",
						"{{SLIP_ID}}"
					]
				},
				"description": "Removes an employee from the current draft payroll run."
			},
			"response": []
		},
		{
			"name": "Step 3: Finalize and Save",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/runs/{{RUN_ID}}/finalize",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"runs",
						"{{RUN_ID}}",
						"finalize"
					]
				},
				"description": "Official completion of the payroll. Marks slips as GENERATED and run as VALIDATED."
			},
			"response": []
		},
		{
			"name": "Show Payroll Run Summary",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/runs/{{RUN_ID}}",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"runs",
						"{{RUN_ID}}"
					]
				},
				"description": "Retrieves the payroll run with its current totals and all slips."
			},
			"response": []
		},
		{
			"name": "List Payroll Runs",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json"
					}
				],
				"url": {
					"raw": "{{BASE_URL}}/api/payroll/runs",
					"host": [
						"{{BASE_URL}}"
					],
					"path": [
						"api",
						"payroll",
						"runs"
					]
				}
			},
			"response": []
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:8000"
		},
		{
			"key": "RUN_ID",
			"value": "1"
		},
		{
			"key": "SLIP_ID",
			"value": "1"
		}
	]
}
