# Work Order Settings

Work order settings: statuses, field definitions and their ordering.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /work-order-fields

Add a work-order custom field. The generated slug is what automation configs address the field by (see the create_work_orders action's `data` object), so read it back off the response.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-fields.md)

### POST /work-order-statuses

Create a work-order status.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-statuses.md)

### POST /work-order-templates

Add a templated work order to a product. The data object keys should match your work order field slugs (e.g. deliverable, scope, dependencies).

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-templates.md)

### DELETE /work-order-fields/:field_id

Delete a work-order field.

**Scopes:** `work-orders:delete` — [full detail](./work-order-config/delete-work-order-fields-field-id.md)

### DELETE /work-order-statuses/:status_id

Delete a work-order status.

**Scopes:** `work-orders:delete` — [full detail](./work-order-config/delete-work-order-statuses-status-id.md)

### DELETE /work-order-templates/:template_id

Delete a templated work order.

**Scopes:** `work-orders:delete` — [full detail](./work-order-config/delete-work-order-templates-template-id.md)

### GET /work-order-fields

List workspace work-order custom fields.

**Scopes:** `work-orders:read` — [full detail](./work-order-config/get-work-order-fields.md)

### GET /work-order-statuses

List workspace work-order statuses.

**Scopes:** `work-orders:read` — [full detail](./work-order-config/get-work-order-statuses.md)

### GET /work-order-templates

List the templated work orders for a product. These are stamped onto a real work order automatically the moment that product is added to an opportunity. Requires product_id.

**Scopes:** `work-orders:read` — [full detail](./work-order-config/get-work-order-templates.md)

### POST /work-order-fields/reorder

Reorder work-order fields.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-fields-reorder.md)

### POST /work-order-statuses/reorder

Reorder work-order statuses.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-statuses-reorder.md)

### POST /work-order-templates/reorder

Reorder the templated work orders for a product.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/post-work-order-templates-reorder.md)

### PATCH /work-order-fields/:field_id

Update a work-order field. `slug` is immutable after creation. Everything else can be changed.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/patch-work-order-fields-field-id.md)

### PATCH /work-order-statuses/:status_id

Update a work-order status.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/patch-work-order-statuses-status-id.md)

### PATCH /work-order-templates/:template_id

Update a templated work order.

**Scopes:** `work-orders:write` — [full detail](./work-order-config/patch-work-order-templates-template-id.md)
