{
  "info": {
    "_postman_id": "projects-maintenance-api",
    "name": "Maintenance Projects API",
    "description": "Complete API documentation for Maintenance Projects CRUD operations and detailed project information",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.0.0"
  },
  "item": [
    {
      "name": "Projects",
      "item": [
        {
          "name": "Get All Projects",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects?page=1",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                }
              ]
            },
            "description": "Retrieve paginated list of all maintenance projects"
          },
          "response": []
        },
        {
          "name": "Create Project",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Building Maintenance Project\",\n  \"description\": \"Comprehensive maintenance for office building\",\n  \"customer_id\": 1,\n  \"contract_number\": \"MNT-2026-001\",\n  \"contract_start_date\": \"2026-01-01\",\n  \"contract_end_date\": \"2026-12-31\",\n  \"status\": \"active\",\n  \"terms_and_conditions\": \"Standard maintenance terms apply\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects"
              ]
            },
            "description": "Create a new maintenance project"
          },
          "response": []
        },
        {
          "name": "Get Project Details",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects/{{project_id}}/details",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects",
                "{{project_id}}",
                "details"
              ]
            },
            "description": "Get comprehensive project details including:\n- Project header information\n- Overview statistics (visits, reports, delays)\n- Contracted assets\n- Maintenance visits (top 10)\n- Visit reports (top 10)\n- Maintenance requests (top 10)\n- Customer proposals/offers\n- Supply orders\n- Attachments/media files\n- Timeline of events"
          },
          "response": []
        },
        {
          "name": "Get Project (Simple)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects/{{project_id}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects",
                "{{project_id}}"
              ]
            },
            "description": "Get simple project information with basic statistics"
          },
          "response": []
        },
        {
          "name": "Update Project",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Updated Building Maintenance Project\",\n  \"description\": \"Updated maintenance for office building\",\n  \"status\": \"active\",\n  \"contract_end_date\": \"2027-12-31\"\n}"
            },
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects/{{project_id}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects",
                "{{project_id}}"
              ]
            },
            "description": "Update existing maintenance project"
          },
          "response": []
        },
        {
          "name": "Delete Project",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{access_token}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{BASE_URL}}/maintenance/projects/{{project_id}}",
              "host": [
                "{{BASE_URL}}"
              ],
              "path": [
                
                "maintenance",
                "projects",
                "{{project_id}}"
              ]
            },
            "description": "Soft delete a maintenance project"
          },
          "response": []
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "http://localhost:8000",
      "type": "string"
    },
    {
      "key": "token",
      "value": "",
      "type": "string"
    },
    {
      "key": "project_id",
      "value": "1",
      "type": "string"
    }
  ]
}
