# Repzo API - Workorder

OpenAPI specification for Repzo Workorder endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

- \*\*\*\*: `https://sv.api.repzo.me`

## Authentication

No authentication required.

## Endpoints

### `/workorder`

#### GET /workorder

**Summary:** Find workorders

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `params` | query | object | No | Query parameters for filtering workorders |

##### Responses

**200** - A list of workorders

Content-Type: `application/json`

---

#### POST /workorder

**Summary:** Create a workorder

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Workorder created

Content-Type: `application/json`

---

### `/workorder/{id}`

#### GET /workorder/{id}

**Summary:** Get a workorder by ID

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Workorder details

Content-Type: `application/json`

---

#### PUT /workorder/{id}

**Summary:** Update a workorder

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Workorder updated

Content-Type: `application/json`

---

#### DELETE /workorder/{id}

**Summary:** Remove a workorder

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | No description |

##### Responses

**200** - Workorder removed

Content-Type: `application/json`

---

## Data Models

### WorkorderFindResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | array | No | No description |

| `meta` | object | No | No description |

### WorkorderCreateBody

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `title` | string | No | No description |

| `description` | string | No | No description |

| `priority` | string | No | No description |

| `status` | string | No | No description |

| `assignedTo` | string | No | No description |

| `client` | string | No | No description |

| `asset` | string | No | No description |

| `category` | string | No | No description |

| `dueDate` | string | No | No description |

### WorkorderCreateResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | object | No | No description |

### WorkorderGetResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | object | No | No description |

### WorkorderUpdateBody

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `title` | string | No | No description |

| `description` | string | No | No description |

| `priority` | string | No | No description |

| `status` | string | No | No description |

| `assignedTo` | string | No | No description |

| `client` | string | No | No description |

| `asset` | string | No | No description |

| `category` | string | No | No description |

| `dueDate` | string | No | No description |

### WorkorderUpdateResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `data` | object | No | No description |

### WorkorderRemoveResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `success` | boolean | No | No description |

### Workorder

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `_id` | string | No | No description |

| `title` | string | No | No description |

| `description` | string | No | No description |

| `priority` | string | No | No description |

| `status` | string | No | No description |

| `assignedTo` | string | No | No description |

| `client` | string | No | No description |

| `asset` | string | No | No description |

| `category` | string | No | No description |

| `dueDate` | string | No | No description |

| `createdAt` | string | No | No description |

| `updatedAt` | string | No | No description |

## TypeScript Usage

See [workorder-examples.md](./workorder-examples.md) for detailed TypeScript usage examples.
