# Repzo API - Route

OpenAPI specification for Repzo Route endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/route`

#### GET /route

**Summary:** Find routes

##### Parameters

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

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

##### Responses

**200** - A list of routes

Content-Type: `application/json`

---

#### POST /route

**Summary:** Create a route

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Route created

Content-Type: `application/json`

---

### `/route/{id}`

#### GET /route/{id}

**Summary:** Get a route by ID

##### Parameters

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

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

##### Responses

**200** - Route details

Content-Type: `application/json`

---

#### PUT /route/{id}

**Summary:** Update a route

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Route updated

Content-Type: `application/json`

---

#### DELETE /route/{id}

**Summary:** Remove a route

##### Parameters

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

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

##### Responses

**200** - Route removed

Content-Type: `application/json`

---

## Data Models

### RouteFindResult

Result of finding routes

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

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

| `total_result` | number | No | Total number of routes |

| `current_count` | number | No | Count of routes in current page |

| `total_pages` | number | No | Total number of pages |

| `current_page` | number | No | Current page number |

| `per_page` | number | No | Number of routes per page |

| `first_page_url` | string | No | URL for the first page |

| `last_page_url` | string | No | URL for the last page |

| `next_page_url` | string | No | URL for the next page |

| `prev_page_url` | string | No | URL for the previous page |

| `path` | string | No | Base URL path |

### RouteSchema

Route schema

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

| `_id` | string | No | Unique identifier for the route |

| `name` | string | No | Name of the route |

| `rep_id` | string | No | ID of the assigned rep |

| `day` | string | No | Day of the week for the route |

| `clients` | array | No | List of clients on this route |

| `disabled` | boolean | No | Whether the route is disabled |

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### RouteCreateBody

Body for creating a route

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

| `name` | string | Yes | Name of the route |

| `rep_id` | string | Yes | ID of the assigned rep |

| `day` | string | Yes | Day of the week for the route |

| `clients` | array | No | List of clients on this route |

| `disabled` | boolean | No | Whether the route is disabled |

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | Yes | Company namespaces |

### RouteCreateResult

Result of creating a route

### RouteGetResult

Result of getting a route

### RouteUpdateBody

Body for updating a route

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

| `name` | string | No | Name of the route |

| `rep_id` | string | No | ID of the assigned rep |

| `day` | string | No | Day of the week for the route |

| `clients` | array | No | List of clients on this route |

| `disabled` | boolean | No | Whether the route is disabled |

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

| `_id` | string | No | Unique identifier for the route |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### RouteUpdateResult

Result of updating a route

### RouteRemoveResult

Result of removing a route

## TypeScript Usage

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