Interactive API Documentation

Explore all endpoints interactively with our Swagger UI documentation.

Open Swagger Documentation

Definitions & Enums

Get available enum values for DateFilter, Status, Role, and other enum fields used in API requests.

POST
/Definition/ListEnums

Get all available enum values including DateFilter, Status, Role, ProjectStatus, TaskStatus, and other enum types used throughout the API. Enum values are returned as integer mappings.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Definition/ListEnums?x_api_key=YOUR_API_KEY"

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "DateFilters": [
      {
        "Value": 0,
        "Name": "Today"
      },
      {
        "Value": 1,
        "Name": "Yesterday"
      },
      {
        "Value": 2,
        "Name": "ThisWeek"
      },
      {
        "Value": 3,
        "Name": "LastWeek"
      },
      {
        "Value": 4,
        "Name": "ThisMonth"
      },
      {
        "Value": 5,
        "Name": "LastMonth"
      },
      {
        "Value": 6,
        "Name": "Custom"
      }
    ],
    "Roles": [
      {
        "Value": 0,
        "Name": "Admin"
      },
      {
        "Value": 1,
        "Name": "Manager"
      },
      {
        "Value": 2,
        "Name": "Employee"
      }
    ],
    "Statuses": [
      {
        "Value": 0,
        "Name": "Pending"
      },
      {
        "Value": 1,
        "Name": "Approved"
      },
      {
        "Value": 2,
        "Name": "Rejected"
      }
    ]
  }
}

Authentication & Base URL

All API requests require authentication using an API key.

https://open-api.useworktivity.com
Query Parameter: x_api_key
5/sec • 100/min • 1000/hour

Getting Your API Key

  1. Navigate to Worktivity Dashboard
  2. Go to OrganizationSettingsAPI Access
  3. Click Generate API Key
  4. Copy your API key and keep it secure

Using Your API Key

Include your API key in every request as a query parameter:

curl
curl -X POST "https://open-api.useworktivity.com/Employee/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "Page": 1,
    "PageSize": 50,
    "SearchText": "john",
    "TeamId": "team-id-optional",
    "IncludeBlocked": false
  }'

Response Format

Success Response

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {},
  "ValidationErrors": null
}

Error Response

{
  "Success": false,
  "Message": "Error description",
  "Data": null,
  "ValidationErrors": [
    {
      "Key": "Email",
      "Value": "Email is required"
    },
    {
      "Key": "Name",
      "Value": "Name must be at least 3 characters"
    }
  ]
}

HTTP Status Codes

200 OK - Request succeeded
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
403 Forbidden - Insufficient permissions
404 Not Found - Resource not found
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Employee Management

Manage employees, track settings, and handle invitations.

POST
/Employee/List

Get a list of all employees in your organization.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)
SearchText string body No Search text to filter employees by name or email
TeamId string body No Filter by team ID (empty for all teams)
IncludeBlocked boolean body No Include blocked employees (default: false)

Request Example

{
  "Page": 1,
  "PageSize": 50,
  "SearchText": "john",
  "TeamId": "team-id-optional",
  "IncludeBlocked": false
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Employee/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Page": 1,
  "PageSize": 50,
  "SearchText": "john",
  "TeamId": "team-id-optional",
  "IncludeBlocked": false
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "employee-id-123",
        "Name": "John Doe",
        "Email": "john.doe@example.com",
        "IsActive": true,
        "CreatedAt": "2024-01-15T10:30:00Z"
      }
    ],
    "TotalCount": 1,
    "Page": 1,
    "PageSize": 50
  }
}
POST
/Employee/Create

Create a new employee and send them an invitation.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Name string body Yes Employee full name
Email string body Yes Employee email address
TeamId string body Yes Team ID to assign employee to
Role string body Yes Employee role (use Definition/ListEnums to get available roles)
HourlyRate number body No Hourly pay rate for the employee

Request Example

{
  "Name": "Jane Smith",
  "Email": "jane.smith@example.com",
  "TeamId": "team-id-1",
  "Role": "Employee",
  "HourlyRate": 25
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Employee/Create?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Name": "Jane Smith",
  "Email": "jane.smith@example.com",
  "TeamId": "team-id-1",
  "Role": "Employee",
  "HourlyRate": 25
}'

Response Example

{
  "Success": true,
  "Message": "Employee created successfully",
  "Data": {
    "Id": "employee-id-456",
    "Name": "Jane Smith",
    "Email": "jane.smith@example.com"
  }
}
POST
/Employee/Update

Update employee information and settings.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Id string body Yes Employee ID to update
Name string body Yes Employee full name
Email string body Yes Employee email address
TeamId string body Yes Team ID to assign employee to
Role string body Yes Employee role (use Definition/ListEnums to get available roles)
HourlyRate number body Yes Hourly pay rate for the employee
IsActive boolean body Yes Whether the employee is active

Request Example

{
  "Id": "employee-id-123",
  "Name": "John Doe Updated",
  "Email": "john.updated@example.com",
  "TeamId": "team-id-1",
  "Role": "Employee",
  "HourlyRate": 30,
  "IsActive": true
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Employee/Update?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Id": "employee-id-123",
  "Name": "John Doe Updated",
  "Email": "john.updated@example.com",
  "TeamId": "team-id-1",
  "Role": "Employee",
  "HourlyRate": 30,
  "IsActive": true
}'

Response Example

{
  "Success": true,
  "Message": "Employee updated successfully",
  "Data": {
    "Id": "employee-id-123",
    "Name": "John Doe Updated"
  }
}
POST
/Employee/Delete

Delete an employee from your organization.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Id string body Yes Employee ID to delete

Request Example

{
  "Id": "employee-id-123"
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Employee/Delete?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Id": "employee-id-123"
}'

Response Example

{
  "Success": true,
  "Message": "Employee deleted successfully",
  "Data": null
}

Time Tracking

Retrieve timesheets, time entries, and activity logs.

POST
/Timesheet/List

Get timesheet data with filtering options for date range, employees, and projects.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
StartDate string body No Start date for custom range (ISO 8601 format)
EndDate string body No End date for custom range (ISO 8601 format)
EmployeeId string body No Filter by employee ID (empty for all)
ProjectId string body No Filter by project ID (empty for all)
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "DateFilter": "ThisMonth",
  "StartDate": "2024-01-01T00:00:00Z",
  "EndDate": "2024-01-31T23:59:59Z",
  "EmployeeId": "",
  "ProjectId": "",
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Timesheet/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisMonth",
  "StartDate": "2024-01-01T00:00:00Z",
  "EndDate": "2024-01-31T23:59:59Z",
  "EmployeeId": "",
  "ProjectId": "",
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "EmployeeId": "employee-id-123",
        "EmployeeName": "John Doe",
        "Date": "2024-01-15",
        "TotalHours": 8.5,
        "ProjectHours": [
          {
            "ProjectId": "project-id-1",
            "ProjectName": "Website Redesign",
            "Hours": 6
          }
        ]
      }
    ],
    "TotalCount": 1,
    "Page": 1,
    "PageSize": 50
  }
}
POST
/TimeEntry/List

Get detailed time entries with approval status and notes.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
ProjectId string body No Filter by project ID (empty for all)
Status enum body No Filter by status enum (integer). Use Definition/ListEnums endpoint to get available enum values
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "DateFilter": "Today",
  "EmployeeId": "",
  "ProjectId": "",
  "Status": "All",
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/TimeEntry/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "Today",
  "EmployeeId": "",
  "ProjectId": "",
  "Status": "All",
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "entry-id-123",
        "EmployeeId": "employee-id-123",
        "ProjectId": "project-id-1",
        "StartTime": "2024-01-15T09:00:00Z",
        "EndTime": "2024-01-15T17:00:00Z",
        "Duration": 28800,
        "Description": "Working on API documentation",
        "Status": "Approved"
      }
    ],
    "TotalCount": 1
  }
}
POST
/ActivityLogs/List

Get employee activity logs including app usage, websites, screenshots, and productivity metrics.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
HasScreenshot boolean body No Filter by screenshots available (true/false)
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "DateFilter": "Today",
  "EmployeeId": "employee-id-optional",
  "HasScreenshot": true,
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/ActivityLogs/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "Today",
  "EmployeeId": "employee-id-optional",
  "HasScreenshot": true,
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "log-id-123",
        "EmployeeId": "employee-id-123",
        "Timestamp": "2024-01-15T14:30:00Z",
        "Applications": [
          {
            "Name": "Visual Studio Code",
            "Duration": 1800,
            "IsProductive": true
          }
        ],
        "Websites": [
          {
            "Url": "https://github.com",
            "Domain": "github.com",
            "Duration": 900
          }
        ],
        "ScreenshotUrl": "https://cdn.useworktivity.com/screenshots/...",
        "ProductivityScore": 85,
        "KeyboardActivity": 1200,
        "MouseActivity": 800
      }
    ],
    "TotalCount": 1,
    "Page": 1,
    "PageSize": 50
  }
}

Projects & Tasks

Manage projects, tasks, customers, and team assignments.

POST
/Project/List

Get a list of all projects with their details and status.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)
SearchTerm string body No Search term to filter projects

Request Example

{
  "Page": 1,
  "PageSize": 50,
  "SearchTerm": ""
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Project/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Page": 1,
  "PageSize": 50,
  "SearchTerm": ""
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "project-id-1",
        "Name": "Website Redesign",
        "Description": "Complete redesign of company website",
        "CustomerId": "customer-id-1",
        "Status": "InProgress",
        "CreatedAt": "2024-01-01T00:00:00Z"
      }
    ],
    "TotalCount": 1
  }
}
POST
/Project/AddUpdateProject

Create a new project or update an existing one.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Id string body No Project ID (empty for new project)
Name string body Yes Project name
Description string body No Project description
CustomerId string body No Customer ID for the project
TeamIds array body No Array of team IDs assigned to project
Status string body No Project status (NotStarted, InProgress, Completed, OnHold)

Request Example

{
  "Id": "",
  "Name": "New Project",
  "Description": "Project description",
  "CustomerId": "customer-id-1",
  "TeamIds": [
    "team-id-1"
  ],
  "Status": "NotStarted"
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Project/AddUpdateProject?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Id": "",
  "Name": "New Project",
  "Description": "Project description",
  "CustomerId": "customer-id-1",
  "TeamIds": [
    "team-id-1"
  ],
  "Status": "NotStarted"
}'

Response Example

{
  "Success": true,
  "Message": "Project created successfully",
  "Data": {
    "Id": "project-id-new",
    "Name": "New Project"
  }
}
POST
/Project/ListTasks

Get all tasks for a specific project.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
ProjectId string body Yes Project ID to get tasks for
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "ProjectId": "project-id-1",
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Project/ListTasks?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ProjectId": "project-id-1",
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "task-id-1",
        "Title": "Design homepage",
        "Description": "Create initial design mockups",
        "Status": "InProgress",
        "Priority": "High",
        "AssigneeIds": [
          "employee-id-123"
        ],
        "DueDate": "2024-01-20T00:00:00Z"
      }
    ],
    "TotalCount": 1
  }
}
POST
/Project/AddUpdateTask

Create a new task or update an existing one within a project.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Id string body No Task ID (empty for new task)
ProjectId string body Yes Project ID to create task in
Title string body Yes Task title
Description string body No Task description
Status string body No Task status (NotStarted, InProgress, Completed, OnHold)
Priority string body No Task priority (Low, Medium, High, Critical)
AssigneeIds array body No Array of employee IDs assigned to task
DueDate string body No Task due date (ISO 8601 format)

Request Example

{
  "Id": "",
  "ProjectId": "project-id-1",
  "Title": "New Task",
  "Description": "Task description",
  "Status": "NotStarted",
  "Priority": "Medium",
  "AssigneeIds": [
    "employee-id-123"
  ],
  "DueDate": "2024-01-25T00:00:00Z"
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Project/AddUpdateTask?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Id": "",
  "ProjectId": "project-id-1",
  "Title": "New Task",
  "Description": "Task description",
  "Status": "NotStarted",
  "Priority": "Medium",
  "AssigneeIds": [
    "employee-id-123"
  ],
  "DueDate": "2024-01-25T00:00:00Z"
}'

Response Example

{
  "Success": true,
  "Message": "Task created successfully",
  "Data": {
    "Id": "task-id-new",
    "Title": "New Task"
  }
}

Insights & Reports

Get productivity insights, work times, and application usage analytics.

POST
/Insights/Productivity

Get productivity insights and analytics for employees or teams.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
TeamId string body No Filter by team ID (empty for all)

Request Example

{
  "DateFilter": "ThisMonth",
  "EmployeeId": "",
  "TeamId": ""
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Insights/Productivity?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisMonth",
  "EmployeeId": "",
  "TeamId": ""
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "AverageProductivityScore": 78.5,
    "TotalActiveTime": 14400,
    "TotalIdleTime": 3600,
    "Employees": [
      {
        "EmployeeId": "employee-id-123",
        "EmployeeName": "John Doe",
        "ProductivityScore": 85,
        "ActiveTime": 28800,
        "IdleTime": 1800
      }
    ]
  }
}
POST
/Insights/WorkTimes

Get work time statistics and analysis.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
TeamId string body No Filter by team ID (empty for all)

Request Example

{
  "DateFilter": "ThisWeek",
  "EmployeeId": "",
  "TeamId": ""
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Insights/WorkTimes?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisWeek",
  "EmployeeId": "",
  "TeamId": ""
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "TotalHours": 160.5,
    "AverageHoursPerDay": 8,
    "DailyBreakdown": [
      {
        "Date": "2024-01-15",
        "Hours": 8.5,
        "EmployeeCount": 3
      }
    ]
  }
}
POST
/Insights/AppsSummary

Get a summary of application usage across employees or teams.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
TeamId string body No Filter by team ID (empty for all)
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "DateFilter": "ThisMonth",
  "EmployeeId": "",
  "TeamId": "",
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Insights/AppsSummary?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisMonth",
  "EmployeeId": "",
  "TeamId": "",
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "ApplicationName": "Visual Studio Code",
        "TotalUsage": 72000,
        "UsagePercentage": 35.5,
        "IsProductive": true,
        "UserCount": 5
      }
    ],
    "TotalCount": 1
  }
}

Screenshots & Timelapse Videos

Retrieve and manage screenshots and timelapse videos.

POST
/Screenshots/List

Get screenshots captured during work sessions with filtering options.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)

Request Example

{
  "DateFilter": "Today",
  "EmployeeId": "employee-id-123",
  "Page": 1,
  "PageSize": 50
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/Screenshots/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "Today",
  "EmployeeId": "employee-id-123",
  "Page": 1,
  "PageSize": 50
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "screenshot-id-123",
        "EmployeeId": "employee-id-123",
        "EmployeeName": "John Doe",
        "Url": "https://cdn.useworktivity.com/screenshots/...",
        "ThumbnailUrl": "https://cdn.useworktivity.com/screenshots/thumbnails/...",
        "Timestamp": "2024-01-15T14:30:00Z",
        "ProductivityScore": 85
      }
    ],
    "TotalCount": 1
  }
}
POST
/TimelapseVideos/List

Get timelapse videos created from screenshot sequences.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
EmployeeId string body No Filter by employee ID (empty for all)
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 20, max: 100)

Request Example

{
  "DateFilter": "ThisWeek",
  "EmployeeId": "employee-id-123",
  "Page": 1,
  "PageSize": 20
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/TimelapseVideos/List?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisWeek",
  "EmployeeId": "employee-id-123",
  "Page": 1,
  "PageSize": 20
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "video-id-123",
        "EmployeeId": "employee-id-123",
        "EmployeeName": "John Doe",
        "VideoUrl": "https://cdn.useworktivity.com/videos/...",
        "ThumbnailUrl": "https://cdn.useworktivity.com/videos/thumbnails/...",
        "Date": "2024-01-15",
        "Duration": 3600,
        "ScreenshotCount": 120
      }
    ],
    "TotalCount": 1
  }
}

Cost Management & Payroll

Calculate payroll, manage invoices, and track costs.

POST
/CostManagement/Payroll

Calculate payroll for employees based on work hours and pay rates.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
DateFilter enum body No Date filter enum (integer). Use Definition/ListEnums endpoint to get available enum values
StartDate string body No Start date for custom range (ISO 8601 format)
EndDate string body No End date for custom range (ISO 8601 format)
EmployeeId string body No Filter by employee ID (empty for all)
TeamId string body No Filter by team ID (empty for all)
IncludePaid boolean body No Include already paid periods (default: false)

Request Example

{
  "DateFilter": "ThisMonth",
  "StartDate": "2024-01-01T00:00:00Z",
  "EndDate": "2024-01-31T23:59:59Z",
  "EmployeeId": "",
  "TeamId": "",
  "IncludePaid": false
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/CostManagement/Payroll?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "DateFilter": "ThisMonth",
  "StartDate": "2024-01-01T00:00:00Z",
  "EndDate": "2024-01-31T23:59:59Z",
  "EmployeeId": "",
  "TeamId": "",
  "IncludePaid": false
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "EmployeeId": "employee-id-123",
        "EmployeeName": "John Doe",
        "TotalHours": 160,
        "HourlyRate": 25,
        "TotalAmount": 4000,
        "PaidAmount": 0,
        "UnpaidAmount": 4000
      }
    ],
    "TotalAmount": 4000,
    "TotalPaid": 0,
    "TotalUnpaid": 4000
  }
}
POST
/CostManagement/ListInvoices

Get a list of invoices with their status and details.

Parameters

Name Type Location Required Description
x_api_key string query Yes Your API authentication key
Page number body No Page number (default: 1)
PageSize number body No Items per page (default: 50, max: 100)
Status enum body No Filter by status enum (integer). Use Definition/ListEnums endpoint to get available enum values

Request Example

{
  "Page": 1,
  "PageSize": 50,
  "Status": "All"
}

Code Examples

curl
curl -X POST "https://open-api.useworktivity.com/CostManagement/ListInvoices?x_api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "Page": 1,
  "PageSize": 50,
  "Status": "All"
}'

Response Example

{
  "Success": true,
  "Message": "Operation completed successfully",
  "Data": {
    "Items": [
      {
        "Id": "invoice-id-123",
        "InvoiceNumber": "INV-2024-001",
        "CustomerId": "customer-id-1",
        "CustomerName": "ABC Company",
        "Amount": 5000,
        "Status": "Sent",
        "DueDate": "2024-02-15T00:00:00Z",
        "CreatedAt": "2024-01-15T00:00:00Z"
      }
    ],
    "TotalCount": 1
  }
}
Free Trial

Start Your 14 Day Trial

No credit card required

Get Started Free