> ## Documentation Index
> Fetch the complete documentation index at: https://terminal49.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: DocumentManager

# Class: DocumentManager

## Extends

* [`BaseManager`](/docs/sdk/reference/client/managers/classes/BaseManager)

## Constructors

### Constructor

> **new DocumentManager**(`transport`, `defaultFormat?`): `DocumentManager`

#### Parameters

| Parameter | Type | Default value |
| - | - | - |
| `transport` | [`Transport`](/docs/sdk/reference/client/transport/classes/Transport) | `undefined` |
| `defaultFormat` | [`ResponseFormat`](/docs/sdk/reference/types/options/type-aliases/ResponseFormat) | `'raw'` |

#### Returns

`DocumentManager`

#### Inherited from

[`BaseManager`](/docs/sdk/reference/client/managers/classes/BaseManager).[`constructor`](/docs/sdk/reference/client/managers/classes/BaseManager#constructor)

## Methods

### create()

> **create**(`params`, `options?`): `Promise`\<`any`>

Create a document from a previously direct-uploaded blob.

#### Parameters

| Parameter | Type |
| - | - |
| `params` | [`CreateDocumentParams`](/docs/sdk/reference/client/managers/interfaces/CreateDocumentParams) |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### delete()

> **delete**(`id`, `options?`): `Promise`\<`any`>

Delete a document.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### downloadUrl()

> **downloadUrl**(`id`, `options?`): `Promise`\<`any`>

Get a short-lived download URL for a document's file.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### get()

> **get**(`id`, `options?`): `Promise`\<`any`>

Fetch a document by ID.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) & `object` |

#### Returns

`Promise`\<`any`>

***

### list()

> **list**(`filters?`, `options?`): `Promise`\<`any`>

List documents with optional filters and pagination.

#### Parameters

| Parameter | Type |
| - | - |
| `filters` | [`DocumentListFilters`](/docs/sdk/reference/client/managers/interfaces/DocumentListFilters) |
| `options?` | [`ListOptions`](/docs/sdk/reference/types/options/interfaces/ListOptions) |

#### Returns

`Promise`\<`any`>

***

### reclassify()

> **reclassify**(`id`, `options?`): `Promise`\<`any`>

Re-run classification on a document.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### reextract()

> **reextract**(`id`, `options?`): `Promise`\<`any`>

Re-run data extraction on a document.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### relink()

> **relink**(`id`, `options?`): `Promise`\<`any`>

Re-run shipment/container linking on a document.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### rotate()

> **rotate**(`id`, `degrees`, `options?`): `Promise`\<`any`>

Rotate a document's pages by 90, 180, or 270 degrees.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `degrees` | [`DocumentRotation`](/docs/sdk/reference/client/managers/type-aliases/DocumentRotation) |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### types()

> **types**(`options?`): `Promise`\<`any`>

List the document types Terminal49 can classify.

#### Parameters

| Parameter | Type |
| - | - |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>

***

### update()

> **update**(`id`, `params`, `options?`): `Promise`\<`any`>

Override a document's type or extracted data.

#### Parameters

| Parameter | Type |
| - | - |
| `id` | `string` |
| `params` | [`UpdateDocumentParams`](/docs/sdk/reference/client/managers/interfaces/UpdateDocumentParams) |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.