Skip to content

Project Management API

The Project Management API provides comprehensive functionality for managing projects, project assignments, financial tracking, and business operations in the Stratpoint Timesheet Application. These APIs are designed for complex enterprise project management with extensive business logic and integration capabilities.

Authentication Headers

All project management endpoints require authentication:

Authorization: Bearer {jwt_token}
galingsa: timesheetweb
Content-Type: application/json

Core Project Operations

Get Projects List

Retrieves a filtered list of projects with comprehensive filtering options.

POST /api/v2/projects/index

Permission Required: Permission ID 94

Request Body:

{
  "projectId": 123,
  "startYearMonth": "2024-01",
  "endYearMonth": "2024-12",
  "selectBusinessUnit": "1,2,3",
  "selectBusinessLine": "1,2",
  "selectClient": "456,789",
  "selectCompany": "1",
  "selectProject": "123,456",
  "selectProjectManager": "999,888",
  "selectProjectStatus": "1,2,7",
  "selectProjectType": "1,2",
  "selectEngagementManager": "777",
  "selectPriceGroup": "1,2",
  "selectReportType": "revenue,budgeted,assigned,actual"
}

Response:

{
  "header": {
    "status": 200,
    "title": "Project",
    "description": "Data Successfully Retrieved"
  },
  "body": {
    "total": 25,
    "data": [
      {
        "id": 123,
        "name": "Client Portal Development",
        "code": "CPD-2024-001",
        "clientName": "ABC Corporation",
        "projectManagerName": "Smith, Jane A.",
        "status": "Active",
        "startDate": "2024-01-15",
        "endDate": "2024-06-15",
        "budgetAmount": "150000.00",
        "actualAmount": "85000.00",
        "isTemplate": false,
        "businessUnit": "Digital Solutions",
        "projectType": "Software Development"
      }
    ],
    "filters": {
      "businessUnits": [...],
      "clients": [...],
      "projectManagers": [...],
      "projectStatuses": [...]
    }
  }
}

Get Project Details

Retrieves detailed information for a specific project.

POST /api/v2/projects/getdetails/{id}/{returnAsJson?}

Parameters: - id: Project ID (required) - returnAsJson: Optional, returns JSON format if set to 1

Response:

{
  "header": {
    "status": 200,
    "title": "Project",
    "description": "Data Successfully Retrieved"
  },
  "body": {
    "data": {
      "project": {
        "id": 123,
        "name": "Client Portal Development",
        "description": "Development of client-facing portal with authentication",
        "clientId": 456,
        "clientName": "ABC Corporation",
        "startDate": "2024-01-15",
        "endDate": "2024-06-15",
        "projectManagerId": 999,
        "projectManagerName": "Smith, Jane A.",
        "status": "Active",
        "budgetAmount": "150000.00",
        "actualCost": "85000.00"
      },
      "phases": [
        {
          "id": 1,
          "name": "Analysis",
          "startDate": "2024-01-15",
          "endDate": "2024-02-15",
          "budgetHours": "160.00",
          "actualHours": "150.00"
        }
      ],
      "assignments": [
        {
          "id": 789,
          "userId": 123,
          "userName": "Doe, John M.",
          "position": "Senior Developer",
          "startDate": "2024-01-15",
          "endDate": "2024-06-15",
          "allocation": 80,
          "hourlyRate": "25.00"
        }
      ],
      "estimates": [...],
      "expenses": [...],
      "milestones": [...]
    }
  }
}

Create Project

Creates a new project.

POST /api/v2/projects

Request Body:

{
  "name": "New Client Project",
  "description": "Project description",
  "client_id": 456,
  "projectManager_id": 999,
  "startDate": "2024-02-01",
  "endDate": "2024-08-01",
  "budgetAmount": "200000.00",
  "projectType_id": 1,
  "businessUnit_id": 1,
  "sowType_id": 1
}

Update Project

Updates an existing project.

PUT /api/v2/projects/{id}

Delete Project

Deletes a project.

DELETE /api/v2/projects/{id}

Project Status Management

Change Project Status

Changes the status of a project with business rule validation.

POST /api/v2/projects/changestatus

Request Body:

{
  "projectId": 123,
  "newStatus": 7,
  "actualEndDate": "2024-05-15",
  "proceedWithoutValidatingRules": false
}

Status Values: - 1: Draft - 2: For Approval - 3: Active - 7: Completed

Response:

{
  "header": {
    "status": 200,
    "title": "Project",
    "description": "Status Successfully Changed"
  },
  "body": {
    "data": {
      "projectId": 123,
      "oldStatus": 3,
      "newStatus": 7,
      "actualEndDate": "2024-05-15"
    }
  }
}

Validate Business Rules

Validates business rules before status change.

GET /api/v2/projects/validateBusinessRules/{projectId}/{newStatus}

Change Project Owner

Changes the project owner/manager.

POST /api/v2/projects/changeOwner

Request Body:

{
  "projectId": 123,
  "newOwnerId": 888,
  "reason": "Manager change due to resource allocation"
}

Project Financial Management

Get Project Cost Report

Retrieves comprehensive cost report for a project.

GET /api/v2/projects/getProjectCostReport/{projectId}

Response:

{
  "header": {
    "status": 200,
    "title": "Project",
    "description": "Data Successfully Retrieved"
  },
  "body": {
    "data": {
      "projectId": 123,
      "projectName": "Client Portal Development",
      "budgeted": {
        "totalHours": "800.00",
        "totalCost": "150000.00",
        "laborCost": "130000.00",
        "expenseCost": "20000.00"
      },
      "actual": {
        "totalHours": "650.00",
        "totalCost": "125000.00",
        "laborCost": "110000.00",
        "expenseCost": "15000.00"
      },
      "variance": {
        "hours": "-150.00",
        "cost": "-25000.00",
        "percentage": -16.67
      },
      "breakdown": [
        {
          "position": "Senior Developer",
          "budgetedHours": "400.00",
          "actualHours": "380.00",
          "budgetedCost": "100000.00",
          "actualCost": "95000.00"
        }
      ]
    }
  }
}

Get Project Cost Report Prorated

Retrieves prorated cost report with date range filtering.

POST /api/v2/projects/getProjectCostReportProrated

Request Body:

{
  "projectId": 123,
  "startDate": "2024-01-01",
  "endDate": "2024-03-31",
  "includeEstimates": true
}

Update Project End Date

Updates the project end date.

PUT /api/v2/projects/enddate/{projectId}

Request Body:

{
  "endDate": "2024-07-15",
  "reason": "Scope extension requested by client"
}

Project Assignments and Resources

Modify Project Sub-components

Manages project sub-components (assignments, estimates, etc.).

POST /api/v2/projects/modifySub/{task}/{type}/{subId?}

Parameters: - task: Operation type (add, edit) - type: Component type (assignment, estimate, expense) - subId: Sub-component ID (for edit operations)

Request Body for Assignment:

{
  "projectId": 123,
  "userId": 456,
  "positionId": 2,
  "startDate": "2024-02-01",
  "endDate": "2024-05-01",
  "allocation": 75,
  "hourlyRate": "28.00"
}

Mass Modify Sub-components

Performs bulk operations on project sub-components.

POST /api/v2/projects/massModifySub/{type}

Delete Project Sub-component

Deletes a project sub-component.

DELETE /api/v2/projects/deleteSub/{type}/{projectId}/{subId}

Project Phases Management

Extend Last Phase

Extends the duration of the project's last phase.

POST /api/v2/projects/extendLastPhase

Request Body:

{
  "projectId": 123,
  "newEndDate": "2024-06-30",
  "extendEstimates": true
}

Add Blank Phase

Adds a new blank phase to the project.

POST /api/v2/projects/addBlankPhase

Delete Phase

Deletes a project phase.

DELETE /api/v2/projects/deletePhase/{projectId}/{phaseId}

Edit Phase Date

Updates phase dates.

POST /api/v2/projects/editPhaseDate

Project Reports and Analytics

Project Detailed Task Report

Generates detailed task report for a project.

POST /api/v2/projects/projectDetailedTaskReport

Request Body:

{
  "projectId": 123,
  "startDate": "2024-01-01",
  "endDate": "2024-03-31",
  "includeSubprojects": true,
  "groupBy": "user"
}

Get Project Assignment Report

Retrieves project assignment report.

POST /api/v2/projects/getProjectAssignmentReport

Export Project Assignments

Exports project assignments to file.

GET /api/v2/projects/exportAssignments/{projectId}

Export Assignments by Position

Exports assignment data grouped by position.

POST /api/v2/projects/exportAssignmentsByPosition

Project Templates

Get Project Templates

Retrieves available project templates.

POST /api/v2/projects/templates

Permission Required: Permission ID 165

Response:

{
  "header": {
    "status": 200,
    "title": "Project",
    "description": "Templates Retrieved"
  },
  "body": {
    "total": 5,
    "data": [
      {
        "id": 999,
        "name": "Standard Web Development Template",
        "description": "Template for typical web development projects",
        "estimatedDuration": "4 months",
        "phases": 4,
        "standardPositions": ["Project Manager", "Senior Developer", "Junior Developer", "QA Tester"]
      }
    ]
  }
}

Mark Project as Template

Converts an existing project into a template.

GET /api/v2/projects/markAsTemplate/{projectId}

Permission Required: Permission ID 164

Copy Project

Copies an existing project with all configurations.

GET /api/v2/projects/copyProjectAsIs/{baseProjectId}

Copy Project with New Dates

Copies a project with adjusted dates.

POST /api/v2/projects/copyProjectNewDate

Request Body:

{
  "baseProjectId": 999,
  "newName": "Q2 Client Portal Enhancement",
  "newStartDate": "2024-04-01",
  "newEndDate": "2024-07-01",
  "adjustPhases": true
}

Document Management

Upload Project Documents

Uploads documents to a project.

POST /api/v2/projects/uploadDocs/{projectId}

Request (Multipart Form Data):

Content-Type: multipart/form-data

file: [binary file data]
description: "Project requirements document"
documentType: "requirements"

Adds a file link reference to a project.

POST /api/v2/projects/addFileLink/{projectId}

Request Body:

{
  "url": "https://docs.google.com/document/d/abc123",
  "description": "Project specifications",
  "documentType": "specifications"
}

Tag Document Type

Tags uploaded documents with specific types.

POST /api/v2/projects/tagDocumentType/{projectId}

Delete Uploaded Document

Deletes an uploaded document.

POST /api/v2/projects/deleteUploaded

Integration APIs

NetSuite Integration

Update NetSuite Fields

Updates NetSuite-related fields for a project.

POST /api/v2/projects/updateNetSuiteFields/{projectId}

Request Body:

{
  "netsuiteCustomer_id": "12345",
  "netsuiteBranch_id": "67890",
  "netsuiteMainId": "ABCD-2024-001"
}

Get NetSuite Data

Retrieves NetSuite integration data.

GET /api/v2/projects/getNetSuiteDataSpecial/{withExtensions?}

Export for NetSuite

Exports project list in NetSuite-compatible format.

POST /api/v2/projects/exportProjectListForNetSuite

Pipedrive Integration

Import from Pipedrive

Imports project data from Pipedrive.

POST /api/v2/projects/import_pipedrive

Business Rules and Permissions

Permission Requirements

Core Operations: - Permission 94: View projects - Permission 164: Mark as template - Permission 165: View templates

Status Changes: Projects follow a strict status workflow with validation: 1. Draft → For Approval 2. For Approval → Active or Draft 3. Active → Completed

Business Rule Validation

Automatic Validations: - End date must be after start date - Resource assignments cannot exceed project duration - Budget constraints and approval workflows - Phase date consistency

Error Handling

Common Validation Errors:

{
  "header": {
    "status": 412,
    "title": "Project",
    "description": "Validation error encountered"
  },
  "body": {
    "errors": {
      "endDate": ["End date must be after start date"],
      "budgetAmount": ["Budget amount is required for active projects"]
    }
  }
}

Access Control Errors:

{
  "header": {
    "status": 401,
    "title": "Project",
    "description": "Access not allowed"
  },
  "body": []
}

Key Implementation Notes

  1. Complex Business Logic: Extensive validation and business rule enforcement
  2. Financial Integration: Comprehensive cost tracking and budgeting
  3. Phase Management: Detailed project phase and milestone tracking
  4. Resource Management: Sophisticated assignment and allocation tracking
  5. Template System: Project template creation and reuse capabilities
  6. Document Management: File upload and link management
  7. External Integrations: NetSuite and Pipedrive integration support
  8. Status Workflows: Structured project lifecycle management
  9. Permission-Based Access: Granular permissions for different operations
  10. Multi-Company Support: Business unit and company-specific filtering

This Project Management API is designed for enterprise-level project management with comprehensive financial tracking, resource management, and business process integration.