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

> ShipmentManager class in the Terminal49 TypeScript SDK, used to list shipments, fetch a shipment by ID, and include related containers, ports, and terminals.

# Class: ShipmentManager

## Extends

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

## Constructors

### Constructor

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

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

`ShipmentManager`

#### Inherited from

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

## Methods

### get()

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

#### Parameters

| Parameter           | Type                                                                            | Default value |
| ------------------- | ------------------------------------------------------------------------------- | ------------- |
| `id`                | `string`                                                                        | `undefined`   |
| `includeContainers` | `boolean`                                                                       | `true`        |
| `options?`          | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) & `object` | `undefined`   |

#### Returns

`Promise`\<`any`>

***

### iterate()

> **iterate**(`filters?`, `options?`): `AsyncGenerator`\<[`Shipment`](/docs/sdk/reference/types/models/interfaces/Shipment), `void`, `unknown`>

#### Parameters

| Parameter  | Type                                                                                                                                                                                                                                                                                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `filters`  | \{ `carrier?`: `string`; `include?`: [`IncludeParam`](/docs/sdk/reference/types/options/type-aliases/IncludeParam)\<[`ShipmentInclude`](/docs/sdk/reference/types/options/type-aliases/ShipmentInclude)>; `includeContainers?`: `boolean`; `number?`: `string`; `port?`: `string`; `status?`: `string`; `trackingStopped?`: `boolean`; `updatedAfter?`: `string`; } \| `undefined` |
| `options?` | `Omit`\<[`ListOptions`](/docs/sdk/reference/types/options/interfaces/ListOptions), `"page"`>                                                                                                                                                                                                                                                                                  |

#### Returns

`AsyncGenerator`\<[`Shipment`](/docs/sdk/reference/types/models/interfaces/Shipment), `void`, `unknown`>

***

### list()

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

#### Parameters

| Parameter                    | Type                                                                                                                                                                                                                                                                                                                                                      | Description                                                                                            |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `filters`                    | \{ `carrier?`: `string`; `include?`: [`IncludeParam`](/docs/sdk/reference/types/options/type-aliases/IncludeParam)\<[`ShipmentInclude`](/docs/sdk/reference/types/options/type-aliases/ShipmentInclude)>; `includeContainers?`: `boolean`; `number?`: `string`; `port?`: `string`; `status?`: `string`; `trackingStopped?`: `boolean`; `updatedAfter?`: `string`; } | -                                                                                                      |
| `filters.carrier?`           | `string`                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                      |
| `filters.include?`           | [`IncludeParam`](/docs/sdk/reference/types/options/type-aliases/IncludeParam)\<[`ShipmentInclude`](/docs/sdk/reference/types/options/type-aliases/ShipmentInclude)>                                                                                                                                                                                                 | -                                                                                                      |
| `filters.includeContainers?` | `boolean`                                                                                                                                                                                                                                                                                                                                                 | -                                                                                                      |
| `filters.number?`            | `string`                                                                                                                                                                                                                                                                                                                                                  | Search shipments by the original tracking `request_number`.                                            |
| `filters.port?`              | `string`                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                      |
| `filters.status?`            | `string`                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                      |
| `filters.trackingStopped?`   | `boolean`                                                                                                                                                                                                                                                                                                                                                 | Filter shipments by whether they are still tracking. Maps to the supported `filter[tracking_stopped]`. |
| `filters.updatedAfter?`      | `string`                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                      |
| `options?`                   | [`ListOptions`](/docs/sdk/reference/types/options/interfaces/ListOptions)                                                                                                                                                                                                                                                                                      | -                                                                                                      |

#### Returns

`Promise`\<`any`>

***

### resumeTracking()

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

#### Parameters

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

#### Returns

`Promise`\<`any`>

***

### stopTracking()

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

#### Parameters

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

#### Returns

`Promise`\<`any`>

***

### update()

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

#### Parameters

| Parameter  | Type                                                                 |
| ---------- | -------------------------------------------------------------------- |
| `id`       | `string`                                                             |
| `attrs`    | `Record`\<`string`, `any`>                                           |
| `options?` | [`CallOptions`](/docs/sdk/reference/types/options/interfaces/CallOptions) |

#### Returns

`Promise`\<`any`>
