# OCR Invoice Job Group API

API for managing OCR invoice job groups

**Version:** 1.0.0

## Overview

### Base URLs

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

- **Staging server**: `https://staging.sv.api.repzo.me`

### API Categories

- **OCR Invoice Job Group**: Operations related to OCR invoice job group management

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/ocr-invoice-job-group`

#### GET /ocr-invoice-job-group

**Summary:** Get all OCR invoice job groups

**Description:** Retrieve a list of all OCR invoice job groups with optional filtering and pagination

**Tags:** OCR Invoice Job Group

##### Parameters

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

| `limit` | query | integer | No | Maximum number of records to return |

| `offset` | query | integer | No | Number of records to skip for pagination |

| `sort` | query | string | No | Field to sort by |

| `order` | query | string | No | Sort order (asc or desc) |

| `filter` | query | string | No | Filter conditions in JSON format |

| `search` | query | string | No | Search term for text fields |

##### Responses

**200** - List of OCR invoice job groups retrieved successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

#### POST /ocr-invoice-job-group

**Summary:** Create a new OCR invoice job group

**Description:** Create a new OCR invoice job group with the provided data

**Tags:** OCR Invoice Job Group

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - OCR invoice job group created successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

### `/ocr-invoice-job-group/{id}`

#### GET /ocr-invoice-job-group/{id}

**Summary:** Get OCR invoice job group by ID

**Description:** Retrieve a specific OCR invoice job group by its ID

**Tags:** OCR Invoice Job Group

##### Parameters

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

| `id` | path | string | Yes | OCR invoice job group ID |

##### Responses

**200** - OCR invoice job group retrieved successfully

Content-Type: `application/json`

**404** - OCR invoice job group not found

**401** - Unauthorized

**500** - Internal server error

---

#### PUT /ocr-invoice-job-group/{id}

**Summary:** Update OCR invoice job group

**Description:** Update an existing OCR invoice job group with new data

**Tags:** OCR Invoice Job Group

##### Parameters

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

| `id` | path | string | Yes | OCR invoice job group ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - OCR invoice job group updated successfully

Content-Type: `application/json`

**400** - Bad request

**404** - OCR invoice job group not found

**401** - Unauthorized

**500** - Internal server error

---

#### DELETE /ocr-invoice-job-group/{id}

**Summary:** Delete OCR invoice job group

**Description:** Delete an existing OCR invoice job group

**Tags:** OCR Invoice Job Group

##### Parameters

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

| `id` | path | string | Yes | OCR invoice job group ID |

##### Responses

**200** - OCR invoice job group deleted successfully

Content-Type: `application/json`

**404** - OCR invoice job group not found

**401** - Unauthorized

**500** - Internal server error

---

### `/ocr-invoice-job-group/{id}/jobs`

#### GET /ocr-invoice-job-group/{id}/jobs

**Summary:** Get jobs in a group

**Description:** Retrieve all OCR jobs belonging to a specific group

**Tags:** OCR Invoice Job Group

##### Parameters

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

| `id` | path | string | Yes | OCR invoice job group ID |

##### Responses

**200** - OCR jobs in group retrieved successfully

Content-Type: `application/json`

**404** - OCR invoice job group not found

**401** - Unauthorized

**500** - Internal server error

---

## Data Models

### OcrInvoiceJobGroup

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

| `_id` | string | No | Unique identifier for the OCR invoice job group |

| `name` | string | Yes | Name of the job group |

| `description` | string | No | Description of the job group |

| `batchNumber` | string | No | Batch number for tracking |

| `template` | string | Yes | OCR template ID to use for this group |

| `totalJobs` | integer | No | Total number of jobs in the group |

| `completedJobs` | integer | No | Number of completed jobs |

| `pendingJobs` | integer | No | Number of pending jobs |

| `failedJobs` | integer | No | Number of failed jobs |

| `status` | string | No | Overall status of the job group |

| `priority` | string | No | Processing priority |

| `startedAt` | string | No | When processing started |

| `completedAt` | string | No | When processing completed |

| `estimatedCompletionTime` | string | No | Estimated completion time |

| `processingSettings` | object | No | No description |

| `statistics` | object | No | No description |

| `notifications` | object | No | No description |

| `createdBy` | string | No | User who created the job group |

| `assignedTo` | string | No | User assigned to manage this group |

| `tags` | array | No | Tags for categorization |

| `metadata` | object | No | Additional metadata |

| `createdAt` | string | No | Record creation timestamp |

| `updatedAt` | string | No | Record last update timestamp |

### OcrInvoiceJobGroupInput

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

| `name` | string | Yes | Name of the job group |

| `description` | string | No | Description of the job group |

| `batchNumber` | string | No | Batch number for tracking |

| `template` | string | Yes | OCR template ID to use for this group |

| `priority` | string | No | Processing priority |

| `processingSettings` | object | No | No description |

| `notifications` | object | No | No description |

| `createdBy` | string | No | User who created the job group |

| `assignedTo` | string | No | User assigned to manage this group |

| `tags` | array | No | Tags for categorization |

| `metadata` | object | No | Additional metadata |

## TypeScript Usage

See [ocr-invoice-job-group-examples.md](./ocr-invoice-job-group-examples.md) for detailed TypeScript usage examples.
