# Repzo API - Approval Request

OpenAPI specification for Repzo Approval Request endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/approval-request`

#### GET /approval-request

**Summary:** Find approval requests

##### Parameters

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

| `params` | query | object | No | Query parameters for filtering approval requests |

##### Responses

**200** - A list of approval requests

Content-Type: `application/json`

---

#### POST /approval-request

**Summary:** Create an approval request

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Approval request created

Content-Type: `application/json`

---

### `/approval-request/{id}`

#### GET /approval-request/{id}

**Summary:** Get an approval request by ID

##### Parameters

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

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

##### Responses

**200** - Approval request details

Content-Type: `application/json`

---

#### PUT /approval-request/{id}

**Summary:** Update an approval request

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Approval request updated

Content-Type: `application/json`

---

#### DELETE /approval-request/{id}

**Summary:** Remove an approval request

##### Parameters

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

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

##### Responses

**200** - Approval request removed

Content-Type: `application/json`

---

## Data Models

### ApprovalRequestFindResult

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

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

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

### ApprovalRequestCreateBody

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

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

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

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

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

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

| `approvers` | array | No | No description |

| `requiredApprovals` | number | No | No description |

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

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

### ApprovalRequestCreateResult

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

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

### ApprovalRequestGetResult

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

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

### ApprovalRequestUpdateBody

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

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

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

| `approvers` | array | No | No description |

| `requiredApprovals` | number | No | No description |

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

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

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

### ApprovalRequestUpdateResult

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

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

### ApprovalRequestRemoveResult

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

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

### ApprovalRequest

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

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

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

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

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

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

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

| `approvers` | array | No | No description |

| `requiredApprovals` | number | No | No description |

| `currentApprovals` | number | No | No description |

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

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

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

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

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

## TypeScript Usage

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