# Repzo API - Client

OpenAPI specification for Repzo Client endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/client`

#### GET /client

**Summary:** Find clients

##### Parameters

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

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

##### Responses

**200** - A list of clients

Content-Type: `application/json`

---

#### POST /client

**Summary:** Create a client

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Client created

Content-Type: `application/json`

---

### `/client/{id}`

#### GET /client/{id}

**Summary:** Get a client by ID

##### Parameters

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

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

##### Responses

**200** - Client details

Content-Type: `application/json`

---

#### PUT /client/{id}

**Summary:** Update a client

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Client updated

Content-Type: `application/json`

---

#### DELETE /client/{id}

**Summary:** Remove a client

##### Parameters

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

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

##### Responses

**200** - Client removed

Content-Type: `application/json`

---

## Data Models

### ClientFindResult

Result of finding clients

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

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

| `total_result` | number | No | Total number of clients |

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

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

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

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

### ClientSchema

Client schema

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

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

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

| `local_name` | string | No | Localized name of the client |

| `tags` | array | No | Tags associated with the client |

| `cell_phone` | string | No | Cell phone number |

| `city` | string | No | City |

| `client_code` | string | No | Client code |

| `contact_name` | string | No | Contact name |

| `contact_title` | string | No | Contact title |

| `contacts` | array | No | Associated contacts |

| `country` | string | No | Country |

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

| `formatted_address` | string | No | Formatted address |

| `lat` | number | No | Latitude coordinate |

| `lng` | number | No | Longitude coordinate |

| `location_verified` | boolean | No | Whether the location is verified |

| `phone` | string | No | Phone number |

| `state` | string | No | State |

| `zip` | string | No | Zip/Postal code |

| `assigned_to` | array | No | Representatives assigned to this client |

| `last_location_update` | number | No | Timestamp of last location update |

| `credit_limit` | number | No | Credit limit |

| `tax_number` | string | No | Tax number |

| `sync_id` | string | No | Sync identifier |

| `profile_pic` | string | No | Profile picture URL |

| `logo` | string | No | Logo URL |

| `website` | string | No | Website URL |

| `email` | string | No | Email address |

| `comment` | string | No | Comments |

| `parent_client_id` | string | No | Parent client ID for hierarchical relationships |

| `target_visit` | number | No | Target number of visits |

| `geofencing_radius` | number | No | Geofencing radius |

| `price_tag` | string | No | Price tag |

| `status` | string | No | Status |

| `job_category` | array | No | Job categories |

| `territory` | string | No | Territory |

| `sv_priceList` | string | No | Price list ID |

| `customFields` | object | No | Custom fields |

| `paymentTerm` | string | No | Payment term ID |

| `speciality` | array | No | Specialities |

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

| `channel` | string | No | Channel ID |

| `isChain` | boolean | No | Whether this is a chain |

| `chain` | string | No | Chain ID |

| `teams` | array | No | Teams |

| `payment_type` | string | No | Payment type |

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

| `integrated_client_balance` | number | No | Integrated client balance |

| `invoice_balance_limit` | number | No | Invoice balance limit |

| `enable_invoice_balance_limit` | boolean | No | Whether invoice balance limit is enabled |

| `enable_payment_terms_grace_period_days` | boolean | No | Whether payment terms grace period days is enabled |

| `is_simplified` | boolean | No | Whether this is a simplified client |

| `last_login_time` | number | No | Last login timestamp |

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

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

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

### ClientCreateBody

Body for creating a client

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

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

| `local_name` | string | No | Localized name of the client |

| `tags` | array | No | Tags associated with the client |

| `cell_phone` | string | No | Cell phone number |

| `city` | string | No | City |

| `client_code` | string | No | Client code |

| `contact_name` | string | No | Contact name |

| `contact_title` | string | No | Contact title |

| `contacts` | array | No | Associated contacts |

| `country` | string | No | Country |

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

| `formatted_address` | string | No | Formatted address |

| `lat` | number | No | Latitude coordinate |

| `lng` | number | No | Longitude coordinate |

| `location_verified` | boolean | No | Whether the location is verified |

| `phone` | string | No | Phone number |

| `state` | string | No | State |

| `zip` | string | No | Zip/Postal code |

| `assigned_to` | array | No | Representatives assigned to this client |

| `credit_limit` | number | No | Credit limit |

| `tax_number` | string | No | Tax number |

| `sync_id` | string | No | Sync identifier |

| `profile_pic` | string | No | Profile picture URL |

| `logo` | string | No | Logo URL |

| `website` | string | No | Website URL |

| `email` | string | No | Email address |

| `comment` | string | No | Comments |

| `parent_client_id` | string | No | Parent client ID for hierarchical relationships |

| `target_visit` | number | No | Target number of visits |

| `geofencing_radius` | number | No | Geofencing radius |

| `price_tag` | string | No | Price tag |

| `status` | string | No | Status |

| `job_category` | array | No | Job categories |

| `territory` | string | No | Territory |

| `sv_priceList` | string | No | Price list ID |

| `customFields` | object | No | Custom fields |

| `paymentTerm` | string | No | Payment term ID |

| `speciality` | array | No | Specialities |

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

| `channel` | string | No | Channel ID |

| `isChain` | boolean | No | Whether this is a chain |

| `chain` | string | No | Chain ID |

| `teams` | array | No | Teams |

| `payment_type` | string | No | Payment type |

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

### ClientCreateResult

Result of creating a client

### ClientGetResult

Result of getting a client

### ClientUpdateBody

Body for updating a client

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

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

| `local_name` | string | No | Localized name of the client |

| `tags` | array | No | Tags associated with the client |

| `cell_phone` | string | No | Cell phone number |

| `city` | string | No | City |

| `client_code` | string | No | Client code |

| `contact_name` | string | No | Contact name |

| `contact_title` | string | No | Contact title |

| `contacts` | array | No | Associated contacts |

| `country` | string | No | Country |

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

| `formatted_address` | string | No | Formatted address |

| `lat` | number | No | Latitude coordinate |

| `lng` | number | No | Longitude coordinate |

| `location_verified` | boolean | No | Whether the location is verified |

| `phone` | string | No | Phone number |

| `state` | string | No | State |

| `zip` | string | No | Zip/Postal code |

| `assigned_to` | array | No | Representatives assigned to this client |

| `credit_limit` | number | No | Credit limit |

| `tax_number` | string | No | Tax number |

| `sync_id` | string | No | Sync identifier |

| `profile_pic` | string | No | Profile picture URL |

| `logo` | string | No | Logo URL |

| `website` | string | No | Website URL |

| `email` | string | No | Email address |

| `comment` | string | No | Comments |

| `parent_client_id` | string | No | Parent client ID for hierarchical relationships |

| `target_visit` | number | No | Target number of visits |

| `geofencing_radius` | number | No | Geofencing radius |

| `price_tag` | string | No | Price tag |

| `status` | string | No | Status |

| `job_category` | array | No | Job categories |

| `territory` | string | No | Territory |

| `sv_priceList` | string | No | Price list ID |

| `customFields` | object | No | Custom fields |

| `paymentTerm` | string | No | Payment term ID |

| `speciality` | array | No | Specialities |

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

| `channel` | string | No | Channel ID |

| `isChain` | boolean | No | Whether this is a chain |

| `chain` | string | No | Chain ID |

| `teams` | array | No | Teams |

| `payment_type` | string | No | Payment type |

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

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

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

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

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

### ClientUpdateResult

Result of updating a client

### ClientRemoveResult

Result of removing a client

## TypeScript Usage

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