Coperniq workOrders API
The workOrders API from Coperniq — 9 operation(s) for workorders.
The workOrders API from Coperniq — 9 operation(s) for workorders.
openapi: 3.1.0
info:
title: API Key accounts workOrders API
version: 1.0.0
servers:
- url: https://api.coperniq.io/v1
description: Production server
tags:
- name: workOrders
paths:
/work-orders:
get:
operationId: list-work-orders
summary: List Work Orders
description: 'Retrieve a paginated list of work orders across all projects.
Supports:
- Pagination (`page_size`, `page`)
- Date filtering (`updated_after`, `updated_before`)
- Sorting (`order_by`)
'
tags:
- workOrders
parameters:
- name: page_size
in: query
description: Number of items per page (max 100)
required: false
schema:
type: integer
default: 20
- name: page
in: query
description: Page number (1-based)
required: false
schema:
type: integer
default: 1
- name: updated_after
in: query
description: Filter items updated after this timestamp (ISO 8601)
required: false
schema:
type: string
format: date-time
- name: updated_before
in: query
description: Filter items updated before this timestamp (ISO 8601)
required: false
schema:
type: string
format: date-time
- name: order_by
in: query
description: Sort order for results
required: false
schema:
$ref: '#/components/schemas/WorkOrdersGetParametersOrderBy'
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: List of work orders
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/WorkOrder'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/ListWorkOrdersRequestUnauthorizedError'
/projects/{projectId}/work-orders:
get:
operationId: list-project-work-orders
summary: List Project Work Orders
description: 'Retrieve work orders for a specific project.
Supports:
- Pagination (`page_size`, `page`)
- Date filtering (`updated_after`, `updated_before`)
- Sorting (`order_by`)
'
tags:
- workOrders
parameters:
- name: projectId
in: path
description: Project identifier
required: true
schema:
type: integer
- name: page_size
in: query
description: Number of items per page (max 100)
required: false
schema:
type: integer
default: 20
- name: page
in: query
description: Page number (1-based)
required: false
schema:
type: integer
default: 1
- name: updated_after
in: query
description: Filter items updated after this timestamp (ISO 8601)
required: false
schema:
type: string
format: date-time
- name: updated_before
in: query
description: Filter items updated before this timestamp (ISO 8601)
required: false
schema:
type: string
format: date-time
- name: order_by
in: query
description: Sort order for results
required: false
schema:
$ref: '#/components/schemas/ProjectsProjectIdWorkOrdersGetParametersOrderBy'
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: List of work orders
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/WorkOrder'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/ListProjectWorkOrdersRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ListProjectWorkOrdersRequestNotFoundError'
post:
operationId: create-project-work-order
summary: Create Project Work Order
description: 'Create a new work order in a project.
Notes:
- `templateId` is required.
- `phaseInstanceId` is optional; if provided the referenced phase must be started (active) for creation to succeed.
'
tags:
- workOrders
parameters:
- name: projectId
in: path
description: Project identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'201':
description: Work order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderCreateResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectWorkOrderRequestNotFoundError'
requestBody:
content:
application/json:
schema:
type: object
properties:
templateId:
type: integer
description: Template to use for the work order
phaseInstanceId:
type: integer
description: Optional. Phase instance id where the work order will be created (phase must be started). You can gather phase instance ids from the get project endpoint.
required:
- templateId
/opportunities/{opportunityId}/work-orders:
get:
operationId: list-opportunity-work-orders
summary: List Opportunity Work Orders
description: 'Retrieve work orders for a specific opportunity
**Note:** The `/requests` path is an alias for `/opportunities` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: opportunityId
in: path
description: Opportunity identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: List of work orders
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/WorkOrder'
post:
operationId: create-opportunity-work-order
summary: Create Opportunity Work Order
description: 'Create a new work order for an opportunity.
Notes:
- `templateId` is required.
- `phaseInstanceId` is optional. The phase does not need to be started to create an opportunity work order.
**Note:** The `/requests` path is an alias for `/opportunities` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: opportunityId
in: path
description: Opportunity identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'201':
description: Work order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderCreateResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOpportunityWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOpportunityWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOpportunityWorkOrderRequestNotFoundError'
requestBody:
content:
application/json:
schema:
type: object
properties:
templateId:
type: integer
description: The ID of the work order template to use
phaseInstanceId:
type: integer
description: Optional. The ID of the phase instance to use. If provided, the phase does not need to be started to create an opportunity work order. You can gather phase instance ids from the get opportunity endpoint.
required:
- templateId
/accounts/{accountId}/work-orders:
get:
operationId: list-account-work-orders
summary: List Account Work Orders
description: 'Retrieve work orders for a specific account
**Note:** The `/clients` path is an alias for `/accounts` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: accountId
in: path
description: Account identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: List of work orders
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/WorkOrder'
post:
operationId: create-account-work-order
summary: Create Account Work Order
description: 'Create a new work order for an account (no phases)
**Note:** The `/clients` path is an alias for `/accounts` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: accountId
in: path
description: Account identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'201':
description: Work order created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderCreateResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAccountWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAccountWorkOrderRequestUnauthorizedError'
requestBody:
content:
application/json:
schema:
type: object
properties:
templateId:
type: integer
required:
- templateId
/work-orders/{workOrderId}:
get:
operationId: get-work-order
summary: Get Work Order
description: 'Retrieve a specific work order by ID.
The `lineItems` property is returned **only** for service work orders on an **account** (parent project type `ACCOUNT`), and **only** when at least one line item exists. Otherwise the field is omitted from the JSON object.
'
tags:
- workOrders
parameters:
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Work order details
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrder'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkOrderRequestNotFoundError'
/work-orders/templates:
get:
operationId: list-work-order-templates
summary: List Work Order Templates
description: Retrieve available work order templates. Returns all templates (not paginated).
tags:
- workOrders
parameters:
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: List of work order templates
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/WorkOrderTemplate'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/ListWorkOrderTemplatesRequestUnauthorizedError'
/projects/{projectId}/work-orders/{workOrderId}:
patch:
operationId: update-project-work-order
summary: Update Project Work Order
description: "Update a project's work order. Supports partial updates.\n\nUpdatable fields:\n- title, description, priority\n- startDate, endDate, startDateAllDay, endDateAllDay\n- status (label string)\n- assigneeId\n- visits: Only applicable on field work orders. When provided, the `visits` array REPLACES the full set of visits for the work order. Include all existing visits you wish to keep or update (with their `id`), and include new visits without an `id`. Any existing visit not included in the request will be removed. Visit booleans default to false when omitted.\n- checklist: Update the checklist for the work order.\n When this field is provided, the `checklist` array REPLACES the full set of checklist items on the work order.\n - Include every existing item you want to keep or modify (identified by `id`). \n - Any existing item NOT included in this array will be removed.\n - Each item MUST include an `id`. Items without an `id` are ignored (checklist item creation is not supported).\n"
tags:
- workOrders
parameters:
- name: projectId
in: path
description: Project identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Work order updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrder'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateProjectWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateProjectWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateProjectWorkOrderRequestNotFoundError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderUpdate'
delete:
operationId: delete-project-work-order
summary: Delete Project Work Order
description: Delete a specific work order from a project
tags:
- workOrders
parameters:
- name: projectId
in: path
description: Project identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Successful response
'400':
description: Invalid request (missing or invalid parameters)
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteProjectWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteProjectWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteProjectWorkOrderRequestNotFoundError'
/opportunities/{opportunityId}/work-orders/{workOrderId}:
patch:
operationId: update-opportunity-work-order
summary: Update Opportunity Work Order
description: "Update an opportunity's work order. Supports partial updates.\n\n**Note:** The `/requests` path is an alias for `/opportunities` and will continue to work until users are individually notified and migrated.\n\nUpdatable fields:\n- title, description, priority\n- startDate, endDate, startDateAllDay, endDateAllDay\n- status (label string)\n- assigneeId\n- visits: Only applicable on field work orders. When provided, the `visits` array REPLACES the full set of visits for the work order. Include all existing visits you wish to keep or update (with their `id`), and include new visits without an `id`. Any existing visit not included in the request will be removed. Visit booleans default to false when omitted.\n- checklist: Update the checklist for the work order.\n When this field is provided, the `checklist` array REPLACES the full set of checklist items on the work order.\n - Include every existing item you want to keep or modify (identified by `id`). \n - Any existing item NOT included in this array will be removed.\n - Each item MUST include an `id`. Items without an `id` are ignored (checklist item creation is not supported).\n"
tags:
- workOrders
parameters:
- name: opportunityId
in: path
description: Opportunity identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Work order updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrder'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOpportunityWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOpportunityWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOpportunityWorkOrderRequestNotFoundError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderUpdate'
delete:
operationId: delete-opportunity-work-order
summary: Delete Opportunity Work Order
description: 'Delete an opportunity''s work order by ID
**Note:** The `/requests` path is an alias for `/opportunities` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: opportunityId
in: path
description: Opportunity identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Successful response
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteOpportunityWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteOpportunityWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteOpportunityWorkOrderRequestNotFoundError'
/accounts/{accountId}/work-orders/{workOrderId}:
patch:
operationId: update-account-work-order
summary: Update Account Work Order
description: "Update an account's work order. Supports partial updates.\n\n**Note:** The `/clients` path is an alias for `/accounts` and will continue to work until users are individually notified and migrated.\n\nUpdatable fields:\n- title, description, priority\n- startDate, endDate, startDateAllDay, endDateAllDay\n- status (label string)\n- assigneeId\n- visits: Only applicable on field work orders. When provided, the `visits` array REPLACES the full set of visits for the work order. Include all existing visits you wish to keep or update (with their `id`), and include new visits without an `id`. Any existing visit not included in the request will be removed. Visit booleans default to false when omitted.\n- checklist: Update the checklist for the work order.\n When this field is provided, the `checklist` array REPLACES the full set of checklist items on the work order.\n - Include every existing item you want to keep or modify (identified by `id`). \n - Any existing item NOT included in this array will be removed.\n - Each item MUST include an `id`. Items without an `id` are ignored (checklist item creation is not supported).\n\n**Line items** are not updated here. For account (service) work orders, replace quote line items with **`PUT /work-orders/{workOrderId}/line-items`** (see **Line Items** in this reference).\n"
tags:
- workOrders
parameters:
- name: accountId
in: path
description: Account identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Work order updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrder'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAccountWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAccountWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAccountWorkOrderRequestNotFoundError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkOrderUpdate'
delete:
operationId: delete-account-work-order
summary: Delete Account Work Order
description: 'Delete a specific work order for an account
**Note:** The `/clients` path is an alias for `/accounts` and will continue to work until users are individually notified and migrated.
'
tags:
- workOrders
parameters:
- name: accountId
in: path
description: Account identifier
required: true
schema:
type: integer
- name: workOrderId
in: path
description: Work order identifier
required: true
schema:
type: integer
- name: x-api-key
in: header
required: true
schema:
type: string
responses:
'200':
description: Successful response
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteAccountWorkOrderRequestBadRequestError'
'401':
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteAccountWorkOrderRequestUnauthorizedError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteAccountWorkOrderRequestNotFoundError'
components:
schemas:
WorkOrderVisits:
type: object
properties:
visits:
type: array
items:
$ref: '#/components/schemas/Visit'
description: List of visits
description: Site visits associated with the work order (legacy shape)
title: WorkOrderVisits
WorkOrderTemplate:
type: object
properties:
id:
type: integer
description: Template identifier
createdAt:
type:
- string
- 'null'
format: date-time
updatedAt:
type:
- string
- 'null'
format: date-time
title:
type:
- string
- 'null'
description: Template title
description:
type:
- string
- 'null'
description: Template description
instructions:
type:
- string
- 'null'
description: Template instructions (same text as description)
type:
type:
- string
- 'null'
description: Work order type (e.g. FIELD, OFFICE)
priority:
type:
- integer
- 'null'
dueDate:
type:
- string
- 'null'
description: Deadline for work orders created from this template
yellowSla:
type:
- integer
- 'null'
description: Yellow SLA threshold (days)
redSla:
type:
- integer
- 'null'
description: Red SLA threshold (days)
assignee:
oneOf:
- $ref: '#/components/schemas/TemplateUser'
- type: 'null'
assigneeProperty:
type:
- string
- 'null'
description: Set when the assignee is a role rather than a specific user (e.g. SALES_REP, PROJECT_MANAGER).
collaborators:
type: array
items:
$ref: '#/components/schemas/TemplateUser'
collaboratorProperties:
type: array
items:
type: string
description: Role-based collaborators (e.g. SALES_REP, PROJECT_MANAGER) as property keys.
labels:
type: array
items:
$ref: '#/components/schemas/WorkOrderTemplateLabelsItems'
checklists:
type: array
items:
$ref: '#/components/schemas/WorkOrderTemplateChecklistsItems'
lineItems:
type: array
items:
$ref: '#/components/schemas/WorkOrderTemplateLineItemsItems'
description: Present only when the template has line items.
title: WorkOrderTemplate
UpdateAccountWorkOrderRequestUnauthorizedError:
type: object
properties:
message:
type: string
code:
$ref: '#/components/schemas/AccountsAccountIdWorkOrdersWorkOrderIdPatchResponsesContentApplicationJsonSchemaCode'
title: UpdateAccountWorkOrderRequestUnauthorizedError
WorkOrderTemplateLabelsItems:
type: object
properties:
label:
$ref: '#/components/schemas/WorkOrderTemplateLabelsItemsLabel'
title: WorkOrderTemplateLabelsItems
TemplateUser:
type: object
properties:
id:
type: integer
firstName:
type:
- string
- 'null'
lastName:
type:
- string
- 'null'
description: A user reference reduced to non-sensitive identity fields.
title: TemplateUser
WorkOrderTemplateChecklistsItems:
type: object
properties:
id:
type: integer
detail:
type:
- string
- 'null'
title: WorkOrderTemplateChecklistsItems
ChecklistItemUpdate:
type: object
properties:
id:
type: integer
description: Checklist item identifier to update (required).
detail:
type: string
description: New detail text.
isCompleted:
type: boolean
description: Completion flag.
required:
- id
description: Checklist item update payload. Only fields provided are updated.
title: ChecklistItemUpdate
CreateProjectWorkOrderRequestNotFoundError:
type: object
properties:
message:
type: string
code:
$ref: '#/components/schemas/ProjectsProjectIdWorkOrdersPostResponsesContentApplicationJsonSchemaCode'
title: CreateProjectWorkOrderRequestNotFoundError
WorkOrderFormItemType:
type: string
enum:
- FORM
title: WorkOrderFormItemType
VisitUpsert:
type: object
properties:
id:
type: integer
description: Include to update an existing visit; omit to create new. When `visits` is sent, any existing visit not included will be deleted.
description:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
startDateAllDay:
type: boolean
default: false
endDateAllDay:
type: boolean
default: false
isCompleted:
type: boolean
description: Shape used to create or update visits in work order PATCH requests.
title: VisitUpsert
ProjectsProjectIdWorkOrdersPostResponsesContentApplication
# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coperniq/refs/heads/main/openapi/coperniq-workorders-api-openapi.yml