Simplify Workfeed schemas and endpoint descriptions:
- Removed unnecessary query parameters and pagination fields from `employees`, `shifts`, and `departments` endpoints. - Standardized `description` fields with explicit API request details. - Consolidated schema components (e.g., `WorkfeedPagination`) and enhanced examples for clarity. - Updated API URL from `https://api.workfeed.io` to the new production endpoint. - Improved shift schemas with granular fields for approvals, breaks, and comments.
This commit is contained in:
+137
-246
@@ -7682,42 +7682,8 @@ paths:
|
||||
tags:
|
||||
- Modules
|
||||
summary: List Workfeed employees
|
||||
description: List employees from Workfeed with optional filtering and pagination
|
||||
description: List employees from Workfeed (`GET /companies/{CompanyID}/employees`)
|
||||
operationId: workfeedListEmployees
|
||||
parameters:
|
||||
- name: search
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Search term for employee lookup
|
||||
- name: departmentId
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by Workfeed department identifier
|
||||
- name: includeInactive
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: boolean
|
||||
- type: string
|
||||
description: Include inactive employees (`true`/`false`)
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: Page size limit
|
||||
- name: cursor
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for paginated navigation
|
||||
responses:
|
||||
'200':
|
||||
description: Workfeed employees retrieved successfully
|
||||
@@ -7753,52 +7719,35 @@ paths:
|
||||
tags:
|
||||
- Modules
|
||||
summary: List Workfeed shifts
|
||||
description: List Workfeed shifts with optional timeframe and pagination filters
|
||||
description: List Workfeed shifts (`GET /companies/{CompanyID}/shifts`)
|
||||
operationId: workfeedListShifts
|
||||
parameters:
|
||||
- name: from
|
||||
- name: startFrom
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Only return shifts starting on or after this timestamp (ISO 8601)
|
||||
- name: startTo
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Only return shifts starting before this timestamp (ISO 8601)
|
||||
- name: employeeID
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Shift start range filter (provider-specific date/time format)
|
||||
- name: to
|
||||
description: Filter shifts by employee ID
|
||||
- name: released
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Shift end range filter (provider-specific date/time format)
|
||||
- name: departmentId
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by Workfeed department identifier
|
||||
- name: employeeId
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by Workfeed employee identifier
|
||||
- name: status
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by shift status
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: Page size limit
|
||||
- name: cursor
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for paginated navigation
|
||||
type: boolean
|
||||
description: Filter by released/published status
|
||||
responses:
|
||||
'200':
|
||||
description: Workfeed shifts retrieved successfully
|
||||
@@ -7834,28 +7783,8 @@ paths:
|
||||
tags:
|
||||
- Modules
|
||||
summary: List Workfeed departments
|
||||
description: List departments from Workfeed with optional filtering and pagination
|
||||
description: List departments from Workfeed (`GET /companies/{CompanyID}/departments`)
|
||||
operationId: workfeedListDepartments
|
||||
parameters:
|
||||
- name: search
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Search term for department lookup
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: Page size limit
|
||||
- name: cursor
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for paginated navigation
|
||||
responses:
|
||||
'200':
|
||||
description: Workfeed departments retrieved successfully
|
||||
@@ -8653,7 +8582,7 @@ paths:
|
||||
- module: workfeed
|
||||
variable: api_url
|
||||
type: string
|
||||
value: https://api.workfeed.io
|
||||
value: https://europe-west1-production-eu-327a3.cloudfunctions.net/api
|
||||
- module: workfeed
|
||||
variable: api_key
|
||||
type: string
|
||||
@@ -10145,7 +10074,7 @@ components:
|
||||
module: { type: string, enum: [workfeed] }
|
||||
variable: { type: string, enum: [api_url] }
|
||||
type: { type: string, enum: [string] }
|
||||
value: { type: string, example: "https://api.workfeed.io" }
|
||||
value: { type: string, example: "https://europe-west1-production-eu-327a3.cloudfunctions.net/api" }
|
||||
required: [module, variable, type, value]
|
||||
|
||||
WorkfeedConfigApiKeyEntry:
|
||||
@@ -10391,7 +10320,7 @@ components:
|
||||
- module: workfeed
|
||||
variable: api_url
|
||||
type: string
|
||||
value: https://api.workfeed.io
|
||||
value: https://europe-west1-production-eu-327a3.cloudfunctions.net/api
|
||||
- module: workfeed
|
||||
variable: api_key
|
||||
type: string
|
||||
@@ -10522,169 +10451,102 @@ components:
|
||||
additionalProperties: true
|
||||
required: [data]
|
||||
|
||||
WorkfeedPagination:
|
||||
type: object
|
||||
description: Cursor-based pagination metadata returned by Workfeed list endpoints
|
||||
properties:
|
||||
cursor:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Cursor used for the current page
|
||||
example: eyJpZCI6IjEyMyJ9
|
||||
nextCursor:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Cursor token for the next page
|
||||
example: eyJpZCI6IjEyNCJ9
|
||||
previousCursor:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Cursor token for the previous page (if provided)
|
||||
limit:
|
||||
type: integer
|
||||
nullable: true
|
||||
minimum: 1
|
||||
example: 50
|
||||
total:
|
||||
type: integer
|
||||
nullable: true
|
||||
minimum: 0
|
||||
example: 184
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedAddress:
|
||||
type: object
|
||||
properties:
|
||||
line1: { type: string, nullable: true, example: "Main Street 1" }
|
||||
line2: { type: string, nullable: true, example: "2nd floor" }
|
||||
postalCode: { type: string, nullable: true, example: "2100" }
|
||||
city: { type: string, nullable: true, example: "Copenhagen" }
|
||||
region: { type: string, nullable: true, example: "Hovedstaden" }
|
||||
country: { type: string, nullable: true, example: "DK" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedDepartment:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: string, example: "dep_01J5P2B0BC9Q2X7H8Y7JQ1M2N3" }
|
||||
externalId: { type: string, nullable: true, example: "truckwash_north" }
|
||||
name: { type: string, example: "North Facility" }
|
||||
timezone: { type: string, nullable: true, example: "Europe/Copenhagen" }
|
||||
active: { type: boolean, nullable: true, example: true }
|
||||
address:
|
||||
$ref: '#/components/schemas/WorkfeedAddress'
|
||||
createdAt: { type: string, format: date-time, nullable: true, example: "2026-03-10T08:15:00Z" }
|
||||
updatedAt: { type: string, format: date-time, nullable: true, example: "2026-03-22T14:05:31Z" }
|
||||
id: { type: string, example: "PKHaOSgFA4uguOqmLfWv" }
|
||||
name: { type: string, example: "API Testing Account 😎" }
|
||||
isDeleted: { type: boolean, example: false }
|
||||
createTime: { type: string, format: date-time, example: "2023-10-25T09:43:06.650Z" }
|
||||
updateTime: { type: string, format: date-time, example: "2023-10-25T09:43:06.650Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedEmployee:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: string, example: "emp_01J5P2F2A0CQKBBX4P8M3Y7R5P" }
|
||||
externalId: { type: string, nullable: true, example: "tw_10042" }
|
||||
firstName: { type: string, nullable: true, example: "Anne" }
|
||||
lastName: { type: string, nullable: true, example: "Nielsen" }
|
||||
fullName: { type: string, nullable: true, example: "Anne Nielsen" }
|
||||
email: { type: string, nullable: true, example: "anne.nielsen@example.com" }
|
||||
phone: { type: string, nullable: true, example: "+4540123456" }
|
||||
jobTitle: { type: string, nullable: true, example: "Shift Lead" }
|
||||
active: { type: boolean, nullable: true, example: true }
|
||||
departmentId: { type: string, nullable: true, example: "dep_01J5P2B0BC9Q2X7H8Y7JQ1M2N3" }
|
||||
departmentName: { type: string, nullable: true, example: "North Facility" }
|
||||
department:
|
||||
$ref: '#/components/schemas/WorkfeedDepartment'
|
||||
hourlyRate: { type: number, format: float, nullable: true, example: 185.5 }
|
||||
currency: { type: string, nullable: true, example: "DKK" }
|
||||
startDate: { type: string, format: date, nullable: true, example: "2025-09-01" }
|
||||
endDate: { type: string, format: date, nullable: true }
|
||||
createdAt: { type: string, format: date-time, nullable: true, example: "2026-03-10T08:15:00Z" }
|
||||
updatedAt: { type: string, format: date-time, nullable: true, example: "2026-03-22T14:05:31Z" }
|
||||
id: { type: string, example: "J9QAIiTG0nRC1OsC5YvHfLWdDHn1" }
|
||||
firstname: { type: string, example: "API 2" }
|
||||
lastname: { type: string, example: "Test 2" }
|
||||
email: { type: string, nullable: true, example: "test2@example.com" }
|
||||
phone: { type: string, nullable: true, example: "12345678" }
|
||||
roleIDs:
|
||||
type: array
|
||||
items: { type: string }
|
||||
example: ["hLbEKIPTlMh3ehotXl0w"]
|
||||
departmentIDs:
|
||||
type: array
|
||||
items: { type: string }
|
||||
example: ["PKHaOSgFA4uguOqmLfWv"]
|
||||
primaryDepartmentID: { type: string, nullable: true }
|
||||
street: { type: string, nullable: true, example: "" }
|
||||
city: { type: string, nullable: true, example: "" }
|
||||
zip: { type: string, nullable: true, example: "" }
|
||||
accessLevel: { type: string, nullable: true, example: "employee" }
|
||||
wage: { type: number, nullable: true }
|
||||
minHours: { type: number, nullable: true }
|
||||
maxHours: { type: number, nullable: true }
|
||||
isDeleted: { type: boolean, example: false }
|
||||
ssn: { type: string, nullable: true, example: "" }
|
||||
imageURL: { type: string, nullable: true, format: uri }
|
||||
createTime: { type: string, format: date-time, example: "2023-10-28T18:22:45.695Z" }
|
||||
updateTime: { type: string, format: date-time, example: "2023-10-28T18:34:37.191Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedShiftComment:
|
||||
type: object
|
||||
properties:
|
||||
message: { type: string, nullable: true, example: "Comments! 😍" }
|
||||
creatorID: { type: string, nullable: true, example: "API" }
|
||||
createdOn: { type: string, format: date-time, nullable: true, example: "2023-10-27T09:43:36.542Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedShiftCustomBreak:
|
||||
type: object
|
||||
properties:
|
||||
creatorID: { type: string, nullable: true, example: "automatic" }
|
||||
duration: { type: number, nullable: true, example: 1 }
|
||||
createdOn: { type: string, format: date-time, nullable: true, example: "2023-10-27T09:10:30.336Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedShiftApproval:
|
||||
type: object
|
||||
properties:
|
||||
approver: { type: string, nullable: true, example: "automatic" }
|
||||
date: { type: string, format: date-time, nullable: true, example: "2023-12-27T09:10:30.336Z" }
|
||||
originalStart: { type: string, format: date-time, nullable: true, example: "2023-12-07T09:10:30.336Z" }
|
||||
originalEnd: { type: string, format: date-time, nullable: true, example: "2023-12-08T09:10:30.336Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedShift:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: string, example: "shf_01J5P3X9D35R9C6BDZ1S0R4V6Q" }
|
||||
title: { type: string, nullable: true, example: "Morning Shift" }
|
||||
status: { type: string, nullable: true, example: "published" }
|
||||
employeeId: { type: string, nullable: true, example: "emp_01J5P2F2A0CQKBBX4P8M3Y7R5P" }
|
||||
employeeName: { type: string, nullable: true, example: "Anne Nielsen" }
|
||||
departmentId: { type: string, nullable: true, example: "dep_01J5P2B0BC9Q2X7H8Y7JQ1M2N3" }
|
||||
departmentName: { type: string, nullable: true, example: "North Facility" }
|
||||
startAt: { type: string, format: date-time, nullable: true, example: "2026-03-24T06:00:00Z" }
|
||||
endAt: { type: string, format: date-time, nullable: true, example: "2026-03-24T14:00:00Z" }
|
||||
breakMinutes: { type: integer, nullable: true, minimum: 0, example: 30 }
|
||||
durationMinutes: { type: integer, nullable: true, minimum: 0, example: 450 }
|
||||
published: { type: boolean, nullable: true, example: true }
|
||||
notes: { type: string, nullable: true, example: "Covering lane A and B" }
|
||||
createdAt: { type: string, format: date-time, nullable: true, example: "2026-03-20T12:00:00Z" }
|
||||
updatedAt: { type: string, format: date-time, nullable: true, example: "2026-03-23T11:42:19Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedEmployeeListData:
|
||||
type: object
|
||||
description: Employee list payload from Workfeed. Supports both normalized and provider-native collection keys.
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedEmployee'
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedEmployee'
|
||||
pagination:
|
||||
$ref: '#/components/schemas/WorkfeedPagination'
|
||||
cursor:
|
||||
type: string
|
||||
id: { type: string, example: "Trcu7MKFomu5y5zv1B8G" }
|
||||
start: { type: string, format: date-time, example: "2023-10-23T08:00:00.000Z" }
|
||||
end: { type: string, format: date-time, example: "2023-10-23T16:00:00.000Z" }
|
||||
employeeID: { type: string, nullable: true }
|
||||
roleID: { type: string, nullable: true, example: "hLbEKIPTlMh3ehotXl0w" }
|
||||
departmentID: { type: string, nullable: true, example: "PKHaOSgFA4uguOqmLfWv" }
|
||||
released: { type: boolean, example: false }
|
||||
isForSale: { type: boolean, nullable: true, example: false }
|
||||
comment:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/WorkfeedShiftComment'
|
||||
nullable: true
|
||||
nextCursor:
|
||||
type: string
|
||||
customBreak:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/WorkfeedShiftCustomBreak'
|
||||
nullable: true
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedShiftListData:
|
||||
type: object
|
||||
description: Shift list payload from Workfeed. Supports both normalized and provider-native collection keys.
|
||||
properties:
|
||||
items:
|
||||
overlappingLeaveID: { type: string, nullable: true }
|
||||
approval:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/WorkfeedShiftApproval'
|
||||
nullable: true
|
||||
grossPay: { type: number, nullable: true }
|
||||
tagIDs:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedShift'
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedShift'
|
||||
pagination:
|
||||
$ref: '#/components/schemas/WorkfeedPagination'
|
||||
cursor:
|
||||
type: string
|
||||
nullable: true
|
||||
nextCursor:
|
||||
type: string
|
||||
nullable: true
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedDepartmentListData:
|
||||
type: object
|
||||
description: Department list payload from Workfeed. Supports both normalized and provider-native collection keys.
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedDepartment'
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedDepartment'
|
||||
pagination:
|
||||
$ref: '#/components/schemas/WorkfeedPagination'
|
||||
cursor:
|
||||
type: string
|
||||
nullable: true
|
||||
nextCursor:
|
||||
type: string
|
||||
nullable: true
|
||||
items: { type: string }
|
||||
createTime: { type: string, format: date-time, example: "2023-10-27T09:10:30.336Z" }
|
||||
updateTime: { type: string, format: date-time, example: "2023-10-27T09:10:30.422Z" }
|
||||
additionalProperties: true
|
||||
|
||||
WorkfeedEmployeeListResponse:
|
||||
@@ -10693,7 +10555,9 @@ components:
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/WorkfeedEmployeeListData'
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedEmployee'
|
||||
required: [data]
|
||||
|
||||
WorkfeedEmployeeSingleResponse:
|
||||
@@ -10711,7 +10575,9 @@ components:
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/WorkfeedShiftListData'
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedShift'
|
||||
required: [data]
|
||||
|
||||
WorkfeedShiftSingleResponse:
|
||||
@@ -10729,7 +10595,9 @@ components:
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/WorkfeedDepartmentListData'
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/WorkfeedDepartment'
|
||||
required: [data]
|
||||
|
||||
DepartmentWeatherTimelineResponse:
|
||||
@@ -13356,6 +13224,29 @@ components:
|
||||
type: number
|
||||
description: Target value for the goal
|
||||
example: 100
|
||||
target_duration:
|
||||
type: string
|
||||
nullable: true
|
||||
description: |
|
||||
Optional advanced target duration mode.
|
||||
Accepted values: ENTIRE_DURATION, WEEKS, MONTHS, YEARS.
|
||||
When omitted, legacy target behavior is preserved for backward compatibility.
|
||||
The canonical field name is snake_case `target_duration`.
|
||||
For backward-compatibility the API also accepts camelCase `targetDuration` on input.
|
||||
enum: [ENTIRE_DURATION, WEEKS, MONTHS, YEARS]
|
||||
example: WEEKS
|
||||
target_duration_every:
|
||||
type: integer
|
||||
nullable: true
|
||||
minimum: 1
|
||||
description: |
|
||||
Optional cadence value used with `target_duration` WEEKS, MONTHS, or YEARS.
|
||||
Example: with `target_duration=WEEKS` and `target_duration_every=2`,
|
||||
the target applies every second week.
|
||||
Ignored when `target_duration=ENTIRE_DURATION`.
|
||||
The canonical field name is snake_case `target_duration_every`.
|
||||
For backward-compatibility the API also accepts camelCase `targetDurationEvery` on input.
|
||||
example: 1
|
||||
label:
|
||||
type: string
|
||||
description: Optional short label/title for this goal criteria (max 255 characters)
|
||||
|
||||
Reference in New Issue
Block a user