# Repzo API - Day

OpenAPI specification for Repzo Day endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

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

## Authentication

No authentication required.

## Endpoints

### `/day`

#### GET /day

**Summary:** Find days

##### Parameters

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

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

##### Responses

**200** - A list of days

Content-Type: `application/json`

---

#### POST /day

**Summary:** Create a day

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Day created

Content-Type: `application/json`

---

### `/day/{id}`

#### GET /day/{id}

**Summary:** Get a day by ID

##### Parameters

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

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

##### Responses

**200** - Day details

Content-Type: `application/json`

---

## Data Models

### DayFindResult

Result of finding days

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

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

| `total_result` | number | No | Total number of days |

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

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

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

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

### DaySchema

Day schema

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

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

| `rep` | string | No | Representative ID |

| `date` | string | No | Date of the working day |

| `startTime` | string | No | Start time of the day |

| `endTime` | string | No | End time of the day |

| `status` | string | No | Status of the day |

| `visits` | array | No | List of visit IDs for the day |

| `orders` | array | No | List of order IDs for the day |

| `activities` | array | No | List of activities for the day |

| `summary` | object | No | Day summary statistics |

| `notes` | string | No | Additional notes for the day |

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

### DayCreateBody

Body for creating a day

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

| `rep` | string | Yes | Representative ID |

| `date` | string | Yes | Date of the working day |

| `startTime` | string | No | Start time of the day |

| `notes` | string | No | Additional notes for the day |

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

### DayCreateResult

Result of creating a day

### DayGetResult

Result of getting a day

## TypeScript Usage

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