# Client Location API

API for managing client locations

**Version:** 1.0.0

## Overview

### Base URLs

- **Production server**: `https://api.repzo.me/v1`

### API Categories

- **Client Location**: Client location management operations

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/client-location`

#### GET /client-location

**Summary:** Get all client locations

**Description:** Retrieve a list of all client locations with optional filtering and pagination

**Tags:** Client Location

##### Parameters

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

| `page` | query | integer | No | Page number for pagination |

| `per_page` | query | integer | No | Number of items per page |

| `sort` | query | string | No | Sort field |

| `company_namespace` | query | array | No | Company namespace for filtering |

| `client` | query | string | No | Filter by client ID |

| `disabled` | query | boolean | No | Filter by disabled status |

| `_id` | query | array | No | Filter by ID |

##### Responses

**200** - Successful response

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**500** - No description

---

#### POST /client-location

**Summary:** Create a new client location

**Description:** Create a new client location entry

**Tags:** Client Location

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Client location created successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**422** - No description

**500** - No description

---

### `/client-location/{id}`

#### GET /client-location/{id}

**Summary:** Get client location by ID

**Description:** Retrieve a specific client location by its ID

**Tags:** Client Location

##### Parameters

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

| `id` | path | string | Yes | Client location ID |

##### Responses

**200** - Successful response

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**404** - No description

**500** - No description

---

#### PATCH /client-location/{id}

**Summary:** Update client location

**Description:** Update an existing client location

**Tags:** Client Location

##### Parameters

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

| `id` | path | string | Yes | Client location ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Client location updated successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**404** - No description

**422** - No description

**500** - No description

---

#### DELETE /client-location/{id}

**Summary:** Delete client location

**Description:** Delete a client location by ID

**Tags:** Client Location

##### Parameters

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

| `id` | path | string | Yes | Client location ID |

##### Responses

**200** - Client location deleted successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**404** - No description

**500** - No description

---

### `/client-location/remove`

#### POST /client-location/remove

**Summary:** Bulk delete client locations

**Description:** Delete multiple client locations by their IDs

**Tags:** Client Location

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Client locations deleted successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**500** - No description

---

## Data Models

### ClientLocation

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

| `_id` | string | No | Unique identifier |

| `client` | string | Yes | Client ID |

| `name` | string | Yes | Location name |

| `address` | string | Yes | Street address |

| `city` | string | No | City name |

| `state` | string | No | State or province |

| `postal_code` | string | No | Postal or ZIP code |

| `country` | string | No | Country name |

| `coordinates` | object | No | No description |

| `is_primary` | boolean | No | Whether this is the primary location |

| `location_type` | string | No | Type of location |

| `contact_info` | object | No | No description |

| `business_hours` | object | No | No description |

| `notes` | string | No | Additional notes about the location |

| `company_namespace` | array | No | Company namespace |

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

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

| `modifiedAt` | string | No | Last modification timestamp |

| `SVClient` | integer | No | Client version |

| `__v` | integer | No | Document version |

### BusinessHours

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

| `open` | string | No | Opening time (HH:MM format) |

| `close` | string | No | Closing time (HH:MM format) |

| `is_closed` | boolean | No | Whether the location is closed on this day |

### CreateClientLocationRequest

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

| `client` | string | Yes | Client ID |

| `name` | string | Yes | Location name |

| `address` | string | Yes | Street address |

| `city` | string | No | City name |

| `state` | string | No | State or province |

| `postal_code` | string | No | Postal or ZIP code |

| `country` | string | No | Country name |

| `coordinates` | object | No | No description |

| `is_primary` | boolean | No | Whether this is the primary location |

| `location_type` | string | No | Type of location |

| `contact_info` | object | No | No description |

| `business_hours` | object | No | No description |

| `notes` | string | No | Additional notes about the location |

| `company_namespace` | array | No | Company namespace |

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

### UpdateClientLocationRequest

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

| `name` | string | No | Location name |

| `address` | string | No | Street address |

| `city` | string | No | City name |

| `state` | string | No | State or province |

| `postal_code` | string | No | Postal or ZIP code |

| `country` | string | No | Country name |

| `coordinates` | object | No | No description |

| `is_primary` | boolean | No | Whether this is the primary location |

| `location_type` | string | No | Type of location |

| `contact_info` | object | No | No description |

| `business_hours` | object | No | No description |

| `notes` | string | No | Additional notes about the location |

| `company_namespace` | array | No | Company namespace |

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

### PagingInfo

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

| `total` | integer | No | Total number of items |

| `page` | integer | No | Current page number |

| `per_page` | integer | No | Items per page |

| `pages` | integer | No | Total number of pages |

## TypeScript Usage

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