# Repzo API - Rep

OpenAPI specification for Repzo Rep (Sales Representative) endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/rep`

#### GET /rep

**Summary:** Find reps

##### Parameters

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

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

##### Responses

**200** - A list of reps

Content-Type: `application/json`

---

#### POST /rep

**Summary:** Create a rep

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Rep created

Content-Type: `application/json`

---

### `/rep/{id}`

#### GET /rep/{id}

**Summary:** Get a rep by ID

##### Parameters

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

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

##### Responses

**200** - Rep details

Content-Type: `application/json`

---

#### PUT /rep/{id}

**Summary:** Update a rep

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Rep updated

Content-Type: `application/json`

---

#### DELETE /rep/{id}

**Summary:** Remove a rep

##### Parameters

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

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

##### Responses

**200** - Rep removed

Content-Type: `application/json`

---

## Data Models

### RepFindResult

Result of finding reps

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

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

| `total_result` | number | No | Total number of reps |

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

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

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

| `per_page` | number | No | Number of reps 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 |

### RepSchema

Rep schema

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

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

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

| `email` | string | No | Email of the rep |

| `username` | string | No | Username of the rep |

| `phone` | string | No | Phone number of the rep |

| `role` | string | No | Role of the rep |

| `team_id` | string | No | ID of the team the rep belongs to |

| `password` | string | No | Password for the rep account |

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

| `permissions` | object | No | Rep permissions |

| `settings` | object | No | Rep settings |

| `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 |

### RepCreateBody

Body for creating a rep

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

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

| `email` | string | Yes | Email of the rep |

| `username` | string | No | Username of the rep |

| `phone` | string | No | Phone number of the rep |

| `role` | string | Yes | Role of the rep |

| `team_id` | string | No | ID of the team the rep belongs to |

| `password` | string | Yes | Password for the rep account |

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

| `permissions` | object | No | Rep permissions |

| `settings` | object | No | Rep settings |

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

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

### RepCreateResult

Result of creating a rep

### RepGetResult

Result of getting a rep

### RepUpdateBody

Body for updating a rep

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

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

| `email` | string | No | Email of the rep |

| `username` | string | No | Username of the rep |

| `phone` | string | No | Phone number of the rep |

| `role` | string | No | Role of the rep |

| `team_id` | string | No | ID of the team the rep belongs to |

| `password` | string | No | Password for the rep account |

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

| `permissions` | object | No | Rep permissions |

| `settings` | object | No | Rep settings |

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

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

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

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

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

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

### RepUpdateResult

Result of updating a rep

### RepRemoveResult

Result of removing a rep

## TypeScript Usage

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