# Activity Feedback API

API for managing activity feedback

**Version:** 1.0.0

## Overview

### Base URLs

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

### API Categories

- **Activity Feedback**: Activity feedback management operations

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/activity-feedback`

#### GET /activity-feedback

**Summary:** Get all activity feedback

**Description:** Retrieve a list of all activity feedback with optional filtering and pagination

**Tags:** Activity Feedback

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

| `activity_type` | query | string | No | Filter by activity type |

| `rep` | query | string | No | Filter by representative ID |

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

| `rating` | query | integer | No | Filter by rating |

| `_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 /activity-feedback

**Summary:** Create new activity feedback

**Description:** Create a new activity feedback entry

**Tags:** Activity Feedback

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Activity feedback created successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**422** - No description

**500** - No description

---

### `/activity-feedback/{id}`

#### GET /activity-feedback/{id}

**Summary:** Get activity feedback by ID

**Description:** Retrieve a specific activity feedback by its ID

**Tags:** Activity Feedback

##### Parameters

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

| `id` | path | string | Yes | Activity feedback 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 /activity-feedback/{id}

**Summary:** Update activity feedback

**Description:** Update an existing activity feedback

**Tags:** Activity Feedback

##### Parameters

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

| `id` | path | string | Yes | Activity feedback ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Activity feedback 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 /activity-feedback/{id}

**Summary:** Delete activity feedback

**Description:** Delete an activity feedback by ID

**Tags:** Activity Feedback

##### Parameters

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

| `id` | path | string | Yes | Activity feedback ID |

##### Responses

**200** - Activity feedback deleted successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**404** - No description

**500** - No description

---

### `/activity-feedback/analytics`

#### GET /activity-feedback/analytics

**Summary:** Get feedback analytics

**Description:** Get analytics and statistics for activity feedback

**Tags:** Activity Feedback

##### Parameters

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

| `date_from` | query | string | No | Start date for analytics |

| `date_to` | query | string | No | End date for analytics |

| `activity_type` | query | string | No | Filter by activity type |

| `rep` | query | string | No | Filter by representative ID |

##### Responses

**200** - Analytics data retrieved successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**403** - No description

**500** - No description

---

## Data Models

### ActivityFeedback

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

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

| `activity_type` | string | Yes | Type of activity this feedback is for |

| `activity_id` | string | No | ID of the related activity |

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

| `client` | string | No | Client ID |

| `rating` | integer | Yes | Feedback rating (1-5 scale) |

| `feedback_text` | string | No | Detailed feedback text |

| `feedback_categories` | array | No | Categories of feedback |

| `sentiment` | string | No | Overall sentiment of the feedback |

| `is_anonymous` | boolean | No | Whether the feedback is anonymous |

| `source` | string | No | Source of the feedback |

| `response_time` | integer | No | Time taken to provide feedback (in seconds) |

| `attachments` | array | No | No description |

| `follow_up_required` | boolean | No | Whether follow-up is required |

| `follow_up_notes` | string | No | Notes for follow-up actions |

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

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

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

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

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

### CreateActivityFeedbackRequest

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

| `activity_type` | string | Yes | Type of activity this feedback is for |

| `activity_id` | string | No | ID of the related activity |

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

| `client` | string | No | Client ID |

| `rating` | integer | Yes | Feedback rating (1-5 scale) |

| `feedback_text` | string | No | Detailed feedback text |

| `feedback_categories` | array | No | Categories of feedback |

| `is_anonymous` | boolean | No | Whether the feedback is anonymous |

| `source` | string | No | Source of the feedback |

| `response_time` | integer | No | Time taken to provide feedback (in seconds) |

| `attachments` | array | No | No description |

| `follow_up_required` | boolean | No | Whether follow-up is required |

| `follow_up_notes` | string | No | Notes for follow-up actions |

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

### UpdateActivityFeedbackRequest

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

| `rating` | integer | No | Feedback rating (1-5 scale) |

| `feedback_text` | string | No | Detailed feedback text |

| `feedback_categories` | array | No | Categories of feedback |

| `follow_up_required` | boolean | No | Whether follow-up is required |

| `follow_up_notes` | string | No | Notes for follow-up actions |

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

### 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 [activity-feedback-examples.md](./activity-feedback-examples.md) for detailed TypeScript usage examples.
