# OCR Invoice Job Template API

API for managing OCR invoice job templates

**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 Template**: Operations related to OCR invoice job template management

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/ocr-invoice-job-template`

#### GET /ocr-invoice-job-template

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

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

**Tags:** OCR Invoice Job Template

##### 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 templates retrieved successfully

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

#### POST /ocr-invoice-job-template

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

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

**Tags:** OCR Invoice Job Template

##### Request Body

**Content Types:**

- `application/json`

##### Responses

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

Content-Type: `application/json`

**400** - Bad request

**401** - Unauthorized

**500** - Internal server error

---

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

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

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

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

**Tags:** OCR Invoice Job Template

##### Parameters

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

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

##### Responses

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

Content-Type: `application/json`

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

**401** - Unauthorized

**500** - Internal server error

---

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

**Summary:** Update OCR invoice job template

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

**Tags:** OCR Invoice Job Template

##### Parameters

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

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

##### Request Body

**Content Types:**

- `application/json`

##### Responses

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

Content-Type: `application/json`

**400** - Bad request

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

**401** - Unauthorized

**500** - Internal server error

---

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

**Summary:** Delete OCR invoice job template

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

**Tags:** OCR Invoice Job Template

##### Parameters

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

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

##### Responses

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

Content-Type: `application/json`

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

**401** - Unauthorized

**500** - Internal server error

---

## Data Models

### OcrInvoiceJobTemplate

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

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

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

| `description` | string | No | Description of the template |

| `version` | string | No | Template version |

| `ocrEngine` | string | Yes | OCR engine to use |

| `documentType` | string | Yes | Type of document |

| `extractionRules` | object | Yes | No description |

| `preprocessingSettings` | object | No | No description |

| `postprocessingSettings` | object | No | No description |

| `supportedFormats` | array | No | Supported document formats |

| `languages` | array | No | Supported languages for OCR |

| `accuracy` | object | No | No description |

| `isActive` | boolean | No | Whether the template is active |

| `isDefault` | boolean | No | Whether this is the default template |

| `createdBy` | string | No | User who created the template |

| `lastModifiedBy` | string | No | User who last modified the template |

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

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

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

### OcrInvoiceJobTemplateInput

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

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

| `description` | string | No | Description of the template |

| `version` | string | No | Template version |

| `ocrEngine` | string | Yes | OCR engine to use |

| `documentType` | string | Yes | Type of document |

| `extractionRules` | object | Yes | No description |

| `preprocessingSettings` | object | No | No description |

| `postprocessingSettings` | object | No | No description |

| `supportedFormats` | array | No | Supported document formats |

| `languages` | array | No | Supported languages for OCR |

| `isActive` | boolean | No | Whether the template is active |

| `isDefault` | boolean | No | Whether this is the default template |

| `createdBy` | string | No | User who created the template |

| `lastModifiedBy` | string | No | User who last modified the template |

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

## TypeScript Usage

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