> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.coperniq.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coperniq.io/_mcp/server.

# List Work Order Templates

GET https://api.coperniq.io/v1/work-orders/templates

Retrieve available work order templates. Returns all templates (not paginated).

Reference: https://docs.coperniq.io/api-reference/work-orders/list-work-order-templates

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Response

### 200

List of work order templates

- `list of WorkOrderTemplate`

## Errors

### 401 Unauthorized Error

Authentication failed

- `message` (string, optional)
- `code` (enum, optional)
  - Allowed values: `UNAUTHORIZED`

## Types

### WorkOrderTemplate

- `id` (integer, optional) — Template identifier
- `createdAt` (string, optional, nullable)
- `updatedAt` (string, optional, nullable)
- `title` (string, optional, nullable) — Template title
- `description` (string, optional, nullable) — Template description
- `instructions` (string, optional, nullable) — Template instructions (same text as description)
- `type` (string, optional, nullable) — Work order type (e.g. FIELD, OFFICE)
- `priority` (integer, optional, nullable)
- `dueDate` (string, optional, nullable) — Deadline for work orders created from this template
- `yellowSla` (integer, optional, nullable) — Yellow SLA threshold (days)
- `redSla` (integer, optional, nullable) — Red SLA threshold (days)
- `assignee` (TemplateUser, optional, nullable) — A user reference reduced to non-sensitive identity fields.
- `assigneeProperty` (string, optional, nullable) — Set when the assignee is a role rather than a specific user (e.g. SALES_REP, PROJECT_MANAGER).
- `collaborators` (list of TemplateUser, optional)
- `collaboratorProperties` (list of string, optional) — Role-based collaborators (e.g. SALES_REP, PROJECT_MANAGER) as property keys.
- `labels` (list of WorkOrderTemplateLabelsItems, optional)
- `checklists` (list of WorkOrderTemplateChecklistsItems, optional)
- `lineItems` (list of WorkOrderTemplateLineItemsItems, optional) — Present only when the template has line items.

### TemplateUser

A user reference reduced to non-sensitive identity fields.

- `id` (integer, optional)
- `firstName` (string, optional, nullable)
- `lastName` (string, optional, nullable)

### WorkOrderTemplateLabelsItems

- `label` (WorkOrderTemplateLabelsItemsLabel, optional)

### WorkOrderTemplateChecklistsItems

- `id` (integer, optional)
- `detail` (string, optional, nullable)

### WorkOrderTemplateLineItemsItems

- `id` (integer, optional)
- `quantity` (double, optional)
- `description` (string, optional, nullable)
- `unitCost` (double, optional)
- `totalCost` (double, optional)
- `unitPrice` (double, optional)
- `totalPrice` (double, optional)
- `catalogItem` (CatalogItem, optional, nullable) — The linked catalog item, in the same shape as GET /catalog-items/\{catalogItemId}.

### WorkOrderTemplateLabelsItemsLabel

- `id` (integer, optional, nullable)
- `label` (string, optional, nullable)
- `color` (string, optional, nullable)

### CatalogItem

- `id` (integer, required) — Catalog item identifier
- `name` (string, required) — Catalog item name
- `catalog` (enum, required, nullable) — High-level trade group for this item.
  - Allowed values: `ENERGY`, `MECHANICAL`, `ELECTRICAL`, `PLUMBING`, `LOW_VOLTAGE`, `ENVELOPE`, `OTHER`
- `type` (enum, required) — Catalog item type
  - Allowed values: `PRODUCT`, `SERVICE`
- `category` (CatalogCategoryCode, required) — Catalog item category code (ProductCategory or ServiceCategory)
- `cost` (double, required, nullable) — Catalog item cost
- `price` (double, required, nullable) — Catalog item price
- `manufacturer` (string, optional, nullable) — Catalog item manufacturer
- `sku` (string, optional, nullable) — Catalog item SKU
- `code` (string, optional, nullable) — Catalog item code
- `description` (string, optional, nullable) — Catalog item description
- `image` (CatalogItemImage, optional, nullable)
- `isArchived` (boolean, optional, nullable) — Whether the catalog item is archived
- `createdById` (integer, optional) — Identifier of the user who created the catalog item
- `createdAt` (string, optional, nullable)
- `updatedAt` (string, optional, nullable)
- `preferredVendorId` (integer, optional, nullable) — ID of the preferred vendor (must be an existing active vendor for this company)
- `unit` (CatalogUnit, optional, nullable) — The unit this item is sold/measured in, if any. Set on write via `unitId`.
- `measurements` (list of Measurement, optional) — Measurements (and sub-measurements) linked to this item to drive its quantity calculation. A sub-measurement is a linked Measurement with `type SUB_CALCULATION`; at most one may be linked, and it must be the only link when present.
- `coverage` (double, optional, nullable) — Measurement units covered per item unit (e.g. a bundle covering ~33.33 SF). Used to size quantity from summed linked measurements; not used when the item is linked to a sub-calculation, which derives quantity from its own formula.
- `wasteFactorMode` (enum, optional, nullable) — Waste factor mode applied when computing this item's quantity. Currently only STATIC is supported. Paired with wasteFactorValue — both are set, or neither.
  - Allowed values: `STATIC`
- `wasteFactorValue` (double, optional, nullable) — Waste factor percentage (0-100) applied when computing this item's quantity. Paired with wasteFactorMode.

### CatalogCategoryCode

Catalog item category code. Must be: - one of `ProductCategory` when `type` is `PRODUCT`, or - one of `ServiceCategory` when `type` is `SERVICE`.

### CatalogItemImage

- `id` (integer, optional)
- `name` (string, optional)
- `url` (string, optional) — URL to download the image

### CatalogUnit

A unit of measure from the company's unit registry (e.g. Each, Square Feet, Linear Feet). Referenced by catalog items and measurements via `unitId`.

- `id` (integer, required) — Catalog unit identifier
- `code` (string, required) — Stable short code for the unit (e.g. "SF", "EA")
- `label` (string, required) — Human-readable label for the unit (e.g. "Square Feet")
- `dimension` (enum, optional, nullable) — The physical dimension this unit measures, if any. Null for packaging-style units (e.g. bundle, roll) that can't be used on a measurement.
  - Allowed values: `LENGTH`, `AREA`, `COUNT`
- `isCustom` (boolean, optional) — Whether this unit was defined by the company, as opposed to one of the seeded defaults.
- `isArchived` (boolean, optional) — Whether this unit has been archived.

### Measurement

A named measurement or sub-calculation that a catalog item can link to (via `measurementIds`) to drive its quantity. A "sub-measurement" is simply a Measurement with `type: SUB_CALCULATION` — not a separate structure.

- `id` (integer, required) — Measurement identifier
- `name` (string, required) — Measurement name
- `type` (enum, required) — A plain MEASUREMENT is a raw input value; a SUB_CALCULATION ("sub-measurement") derives its value from a formula over other measurements.
  - Allowed values: `MEASUREMENT`, `SUB_CALCULATION`
- `unit` (CatalogUnit, optional, nullable) — The unit this measurement is expressed in, if any.
- `minimumValue` (double, optional, nullable) — Minimum allowed value. Only meaningful for type MEASUREMENT.
- `formula` (MeasurementFormula, optional) — The formula driving a SUB\_CALCULATION measurement's quantity. Read-only — there is no API to create or edit a measurement's formula; it can only be authored in the app. Shape: `operands` names each referenced measurement (`{name, measurementId}`); `ast` is a binary-operation tree (`ADD`/`SUB`/`MUL`/`DIV`) whose leaves are either `{operandRef}` (referencing an entry in `operands` by name) or `{constant}` (a literal number); `sourceText` is the original formula text as authored.
- `isArchived` (boolean, optional) — Whether this measurement has been archived.

### MeasurementFormula

The formula driving a SUB\_CALCULATION measurement's quantity. Read-only — there is no API to create or edit a measurement's formula; it can only be authored in the app. Shape: `operands` names each referenced measurement (`{name, measurementId}`); `ast` is a binary-operation tree (`ADD`/`SUB`/`MUL`/`DIV`) whose leaves are either `{operandRef}` (referencing an entry in `operands` by name) or `{constant}` (a literal number); `sourceText` is the original formula text as authored.

- `operands` (list of MeasurementFormulaOperandsItems, optional)
- `ast` (MeasurementFormulaAst, optional) — Binary-operation AST node or leaf. See the formula description above.
- `sourceText` (string, optional) — The formula as originally authored (e.g. "( m1 + m2 ) / 100")

### MeasurementFormulaOperandsItems

- `name` (string, optional)
- `measurementId` (integer, optional)

### MeasurementFormulaAst

Binary-operation AST node or leaf. See the formula description above.

## Examples

**Response**

```json
[
  {
    "id": 1,
    "createdAt": "2024-01-15T09:30:00Z",
    "updatedAt": "2024-01-15T09:30:00Z",
    "title": "string",
    "description": "string",
    "instructions": "string",
    "type": "string",
    "priority": 1,
    "dueDate": "string",
    "yellowSla": 1,
    "redSla": 1,
    "assignee": {
      "id": 1,
      "firstName": "string",
      "lastName": "string"
    },
    "assigneeProperty": "string",
    "collaborators": [
      {
        "id": 1,
        "firstName": "string",
        "lastName": "string"
      }
    ],
    "collaboratorProperties": [
      "string"
    ],
    "labels": [
      {
        "label": {
          "id": 1,
          "label": "string",
          "color": "string"
        }
      }
    ],
    "checklists": [
      {
        "id": 1,
        "detail": "string"
      }
    ],
    "lineItems": [
      {
        "id": 1,
        "quantity": 1.1,
        "description": "string",
        "unitCost": 1.1,
        "totalCost": 1.1,
        "unitPrice": 1.1,
        "totalPrice": 1.1,
        "catalogItem": {
          "id": 1,
          "name": "string",
          "catalog": "ENERGY",
          "type": "PRODUCT",
          "category": "BATTERY_SYSTEM",
          "cost": 1.1,
          "price": 1.1,
          "manufacturer": "string",
          "sku": "string",
          "code": "string",
          "description": "string",
          "image": {
            "id": 1,
            "name": "string",
            "url": "string"
          },
          "isArchived": true,
          "createdById": 1,
          "createdAt": "2024-01-15T09:30:00Z",
          "updatedAt": "2024-01-15T09:30:00Z",
          "preferredVendorId": 1,
          "unit": {
            "id": 1,
            "code": "string",
            "label": "string",
            "dimension": "LENGTH",
            "isCustom": true,
            "isArchived": true
          },
          "measurements": [
            {
              "id": 1,
              "name": "string",
              "type": "MEASUREMENT",
              "unit": {
                "id": 1,
                "code": "string",
                "label": "string",
                "dimension": "LENGTH",
                "isCustom": true,
                "isArchived": true
              },
              "minimumValue": 1.1,
              "formula": {
                "operands": [
                  {
                    "name": "string",
                    "measurementId": 1
                  }
                ],
                "ast": {},
                "sourceText": "string"
              },
              "isArchived": true
            }
          ],
          "coverage": 1.1,
          "wasteFactorMode": "STATIC",
          "wasteFactorValue": 1.1
        }
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.coperniq.io/v1/work-orders/templates"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.coperniq.io/v1/work-orders/templates';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.coperniq.io/v1/work-orders/templates"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/work-orders/templates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.coperniq.io/v1/work-orders/templates")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.coperniq.io/v1/work-orders/templates', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/work-orders/templates");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/work-orders/templates")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```