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

# ShipStation API (formerly ShipEngine) API reference

> API reference for ShipStation API (formerly ShipEngine): every `shipengine.api.*` operation with input and output types.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Account

### createAccountImage

`account.createAccountImage`

Create an Account Image

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.account.createAccountImage({
	body: { name: 'example', image_content_type: 'image/png', image_data: 'iVBORw0KGgo=' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

The provider expects image\_data as a Base64-encoded string in a JSON body (PNG or JPEG); this is not a multipart upload.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   is_default?: boolean,
>   image_content_type: image/png | image/jpeg,
>   image_data: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_image_id` | `string` | No | — |
| `name` | `string` | No | — |
| `is_default` | `boolean` | No | — |
| `image_content_type` | `image/png \| image/jpeg` | No | — |
| `image_data` | `string` | No | — |
| `created_at` | `string` | No | — |
| `modified_at` | `string` | No | — |

***

### deleteAccountImageById

`account.deleteAccountImageById`

Delete Account Image By Id

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.account.deleteAccountImageById({
	path: { label_image_id: 'img_DtBXupDBxREpHnwEXhTfgK' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete Account Image By Id deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_image_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getAccountSettingsImagesById

`account.getAccountSettingsImagesById`

Get Account Image By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.account.getAccountSettingsImagesById({
	path: { label_image_id: 'img_DtBXupDBxREpHnwEXhTfgK' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_image_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_image_id` | `string` | No | — |
| `name` | `string` | No | — |
| `is_default` | `boolean` | No | — |
| `image_content_type` | `image/png \| image/jpeg` | No | — |
| `image_data` | `string` | No | — |
| `created_at` | `string` | No | — |
| `modified_at` | `string` | No | — |

***

### listAccountImages

`account.listAccountImages`

List Account Images

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.account.listAccountImages({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |
| `images` | `object[]` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

> [accordion] images full type
>
> ```ts theme={null}
> {
>   label_image_id?: string,
>   name?: string,
>   is_default?: boolean,
>   image_content_type?: image/png | image/jpeg,
>   image_data?: string,
>   created_at?: string,
>   modified_at?: string
> }[]
> ```

***

### listAccountSettings

`account.listAccountSettings`

List Account Settings

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.account.listAccountSettings({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `default_label_layout` | `4x6 \| Letter` | No | — |

***

### updateAccountSettingsImagesById

`account.updateAccountSettingsImagesById`

Update Account Image By ID

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.account.updateAccountSettingsImagesById({
	path: { label_image_id: 'img_DtBXupDBxREpHnwEXhTfgK' },
	body: { is_default: false },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_image_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name?: string,
>   is_default: boolean,
>   image_content_type?: image/png | image/jpeg,
>   image_data?: string
> }
> ```

**Output:** `string \| undefined`

***

## Addresses

### parseAddress

`addresses.parseAddress`

Parse an address

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.addresses.parseAddress({
	body: { text: 'Example shipment from 123 Example St, Example City, CA 94000' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   text: string,
>   address?: {
>     name?: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1?: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality?: string,
>     state_province?: string,
>     postal_code?: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `score` | `number` | Yes | — |
| `address` | `object` | Yes | — |
| `entities` | `object[]` | Yes | — |

> [accordion] address full type
>
> ```ts theme={null}
> {
>   name?: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1?: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality?: string,
>   state_province?: string,
>   postal_code?: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

> [accordion] entities full type
>
> ```ts theme={null}
> {
>   type: string,
>   score: number,
>   text: string,
>   start_index: number,
>   end_index: number,
>   result?: Record<string, JsonValue>
> }[]
> ```

***

### validateAddress

`addresses.validateAddress`

Validate An Address

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.addresses.validateAddress({
	body: [{
		address_line1: '123 Example St',
		city_locality: 'Example City',
		state_province: 'CA',
		country_code: 'US',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object[]` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name?: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code?: string,
>   country_code: string,
>   address_residential_indicator?: unknown | yes | no
> }[]
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   status: unverified | verified | warning | error,
>   original_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   matched_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   } | null,
>   messages: {
>     code: a1000 | a1001 | a1002 | a1003 | a1004 | a1005 | a1006 | a1007 | a1008 | r1000 | r1001 | r1002 | r1003,
>     message: string,
>     type: error | warning | info,
>     detail_code: unsupported_country | non_supported_country | minimum_postal_code_verification_failed | street_does_not_match_unique_street_name | multiple_directionals | multiple_matches | suite_not_valid | suite_missing | incompatible_paired_labels | invalid_house_number | missing_house_number | invalid_box_number | invalid_charge_event | missing_box_number | missing_cmra_or_private_mail_box_number | suite_has_no_secondaries | postal_code_changed_or_added | state_province_changed_or_added | city_locality_changed_or_added | urbanization_changed | street_name_spelling_changed_or_added | street_name_type_changed_or_added | street_direction_changed_or_added | suite_type_changed_or_added | suite_unit_number_changed_or_added | double_dependent_locality_changed_or_added | subadministrative_area_changed_or_added | subnational_area_changed_or_added | po_box_changed_or_added | premise_type_changed_or_added | house_number_changed | organization_changed_or_added | partially_verified_to_state_level | partially_verified_to_city_level | partially_verified_to_street_level | partially_verified_to_premise_level | verified_to_state_level | verified_to_city_level | verified_to_street_level | verified_to_premise_level | verified_to_suite_level | coded_to_street_lavel | coded_to_neighborhood_level | coded_to_community_level | coded_to_state_level | coded_to_rooftop_level | coded_to_rooftop_interpolation_level | name_max_length_exceeded | phone_max_length_exceeded | company_name_max_length_exceeded | line1_min_max_length | line2_max_length_exceeded | line3_max_length_exceeded | city_locality_max_length_exceeded | state_province_max_length_exceeded | invalid_postal_code | country_invalid_length | address_not_found | null
>   }[]
> }[]
> ```

***

## Batches

### addToBatch

`batches.addToBatch`

Add to a Batch

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.batches.addToBatch({
	path: { batch_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipment_ids?: string[],
>   rate_ids?: string[]
> }
> ```

**Output:** `string \| undefined`

***

### createBatch

`batches.createBatch`

Create a batch. Setting process\_labels.create\_batch\_and\_process\_labels purchases labels and may charge the account.

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.batches.createBatch({
	body: { external_batch_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

The optional process\_labels.create\_batch\_and\_process\_labels flag processes label purchases as part of batch creation and can incur carrier charges. This endpoint is marked destructive.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_batch_id?: string,
>   batch_notes?: string,
>   shipment_ids?: string[],
>   rate_ids?: string[]
> } | {
>   external_batch_id?: string,
>   batch_notes?: string,
>   shipment_ids?: string[],
>   rate_ids?: string[],
>   process_labels?: {
>     create_batch_and_process_labels?: boolean,
>     ship_date?: string,
>     label_layout?: 4x6 | letter | A4 | A6,
>     label_format?: pdf | png | zpl,
>     display_scheme?: label | paperless | label_and_paperless
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | Yes | — |
| `label_format` | `pdf \| png \| zpl` | Yes | — |
| `batch_id` | `string` | Yes | — |
| `batch_number` | `string` | Yes | — |
| `external_batch_id` | `string \| null` | Yes | — |
| `batch_notes` | `string \| null` | Yes | — |
| `created_at` | `string` | Yes | — |
| `processed_at` | `string \| null` | Yes | — |
| `errors` | `number` | Yes | — |
| `process_errors` | `object[]` | Yes | — |
| `warnings` | `number` | Yes | — |
| `completed` | `number` | Yes | — |
| `forms` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `batch_shipments_url` | `object` | Yes | — |
| `batch_labels_url` | `object` | Yes | — |
| `batch_errors_url` | `object` | Yes | — |
| `label_download` | `object` | Yes | — |
| `form_download` | `object` | Yes | — |
| `paperless_download` | `object` | Yes | — |
| `status` | `open \| queued \| processing \| completed \| completed_with_errors \| archived \| notifying \| invalid` | Yes | — |

> [accordion] process\_errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

> [accordion] batch\_shipments\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_labels\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_errors\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> }
> ```

***

### deleteBatch

`batches.deleteBatch`

Delete Batch By Id

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.batches.deleteBatch({
	path: { batch_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete Batch By Id deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getBatchByExternalId

`batches.getBatchByExternalId`

Get Batch By External ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.batches.getBatchByExternalId({
	path: { external_batch_id: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   external_batch_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | Yes | — |
| `label_format` | `pdf \| png \| zpl` | Yes | — |
| `batch_id` | `string` | Yes | — |
| `batch_number` | `string` | Yes | — |
| `external_batch_id` | `string \| null` | Yes | — |
| `batch_notes` | `string \| null` | Yes | — |
| `created_at` | `string` | Yes | — |
| `processed_at` | `string \| null` | Yes | — |
| `errors` | `number` | Yes | — |
| `process_errors` | `object[]` | Yes | — |
| `warnings` | `number` | Yes | — |
| `completed` | `number` | Yes | — |
| `forms` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `batch_shipments_url` | `object` | Yes | — |
| `batch_labels_url` | `object` | Yes | — |
| `batch_errors_url` | `object` | Yes | — |
| `label_download` | `object` | Yes | — |
| `form_download` | `object` | Yes | — |
| `paperless_download` | `object` | Yes | — |
| `status` | `open \| queued \| processing \| completed \| completed_with_errors \| archived \| notifying \| invalid` | Yes | — |

> [accordion] process\_errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

> [accordion] batch\_shipments\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_labels\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_errors\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> }
> ```

***

### getBatchById

`batches.getBatchById`

Get Batch By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.batches.getBatchById({
	path: { batch_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | Yes | — |
| `label_format` | `pdf \| png \| zpl` | Yes | — |
| `batch_id` | `string` | Yes | — |
| `batch_number` | `string` | Yes | — |
| `external_batch_id` | `string \| null` | Yes | — |
| `batch_notes` | `string \| null` | Yes | — |
| `created_at` | `string` | Yes | — |
| `processed_at` | `string \| null` | Yes | — |
| `errors` | `number` | Yes | — |
| `process_errors` | `object[]` | Yes | — |
| `warnings` | `number` | Yes | — |
| `completed` | `number` | Yes | — |
| `forms` | `number` | Yes | — |
| `count` | `number` | Yes | — |
| `batch_shipments_url` | `object` | Yes | — |
| `batch_labels_url` | `object` | Yes | — |
| `batch_errors_url` | `object` | Yes | — |
| `label_download` | `object` | Yes | — |
| `form_download` | `object` | Yes | — |
| `paperless_download` | `object` | Yes | — |
| `status` | `open \| queued \| processing \| completed \| completed_with_errors \| archived \| notifying \| invalid` | Yes | — |

> [accordion] process\_errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

> [accordion] batch\_shipments\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_labels\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] batch\_errors\_url full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> }
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> }
> ```

***

### listBatchErrors

`batches.listBatchErrors`

Get Batch Errors

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.batches.listBatchErrors({
	path: { batch_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   page?: number,
>   pagesize?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `errors` | `object[]` | Yes | — |
| `links` | `object` | Yes | — |

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error?: string,
>   shipment_id?: string,
>   external_shipment_id?: string
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

***

### listBatches

`batches.listBatches`

List Batches

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.batches.listBatches({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   status?: open | queued | processing | completed | completed_with_errors | archived | notifying | invalid,
>   page?: number,
>   page_size?: number,
>   sort_dir?: asc | desc,
>   batch_number?: string,
>   created_at_start?: string,
>   created_at_end?: string,
>   processed_at_start?: string,
>   processed_at_end?: string,
>   sort_by?: ship_date | processed_at | created_at
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `batches` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |

> [accordion] batches full type
>
> ```ts theme={null}
> {
>   label_layout: 4x6 | letter | A4 | A6,
>   label_format: pdf | png | zpl,
>   batch_id: string,
>   batch_number: string,
>   external_batch_id: string | null,
>   batch_notes: string | null,
>   created_at: string,
>   processed_at: string | null,
>   errors: number,
>   process_errors: {
>     error_source: carrier | order_source | shipengine,
>     error_type: account_status | business_rules | validation | security | system | integrations,
>     error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>     message: string,
>     carrier_id?: string,
>     carrier_code?: string,
>     field_name?: string
>   }[],
>   warnings: number,
>   completed: number,
>   forms: number,
>   count: number,
>   batch_shipments_url: {
>     href?: string,
>     type?: string
>   },
>   batch_labels_url: {
>     href?: string,
>     type?: string
>   },
>   batch_errors_url: {
>     href?: string,
>     type?: string
>   },
>   label_download: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download: {
>     href?: string,
>     type?: string
>   },
>   paperless_download: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   status: open | queued | processing | completed | completed_with_errors | archived | notifying | invalid
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

***

### processBatch

`batches.processBatch`

Process Batch ID Labels

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.batches.processBatch({
	path: { batch_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Process Batch ID Labels purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ship_date?: string,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_format?: pdf | png | zpl,
>   display_scheme?: label | paperless | label_and_paperless
> }
> ```

**Output:** `string \| undefined`

***

### removeFromBatch

`batches.removeFromBatch`

Remove From Batch

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.batches.removeFromBatch({
	path: { batch_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   batch_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipment_ids?: string[],
>   rate_ids?: string[]
> }
> ```

**Output:** `string \| undefined`

***

## Carrier Accounts

### connectCarrier

`carrierAccounts.connectCarrier`

Connect a carrier account

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.carrierAccounts.connectCarrier({
	path: { carrier_name: 'access_worldwide' },
	body: { nickname: 'example', username: 'x', password: 'example-credential' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_name: access_worldwide | amazon_buy_shipping | amazon_shipping_uk | apc | asendia | australia_post | canada_post | dhl_ecommerce | dhl_express | dhl_express_au | dhl_express_ca | dhl_express_uk | dpd | endicia | fedex | fedex_uk | firstmile | imex | newgistics | ontrac | purolator_canada | royal_mail | rr_donnelley | seko | sendle | stamps_com | ups | lasership
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   nickname: string,
>   username: string,
>   password: string
> } | {
>   nickname: string,
>   merchant_seller_id: string,
>   mws_auth_token: string,
>   email: string
> } | {
>   nickname: string,
>   auth_code: string
> } | {
>   nickname: string,
>   username: string,
>   password: string
> } | {
>   nickname: string,
>   account_number: string,
>   username: string,
>   password: string,
>   api_key: string,
>   processing_location: string,
>   sub_account_number?: string
> } | {
>   account_number: string,
>   api_key: string,
>   api_secret: string,
>   nickname: string
> } | {
>   nickname: string,
>   api_key: string,
>   api_secret: string,
>   account_number: string,
>   contract_id: string
> } | {
>   nickname: string,
>   client_id: string,
>   username: string,
>   password: string,
>   pickup_number: string,
>   distribution_center: string,
>   api_key?: string,
>   api_secret?: string,
>   ancillary_endorsement?: none | return_service_requested | forwarding_service_requested | address_service_requested | change_service_requested | leave_if_no_response,
>   account_number?: string,
>   ftp_username?: string,
>   ftp_password?: string,
>   sold_to?: string,
>   registration_id?: string,
>   software_name?: string
> } | {
>   nickname: string,
>   account_number: string,
>   site_id?: string,
>   password?: string,
>   country_code?: string
> } | {
>   nickname: string,
>   account_number: string
> } | {
>   nickname: string,
>   account_number: string
> } | {
>   account_number: string,
>   site_id: string,
>   password: string,
>   nickname: string
> } | {
>   account_number: string,
>   password: string,
>   nickname: string
> } | {
>   nickname: string,
>   account: string,
>   passphrase: string
> } | {
>   account_number: string,
>   address1: string,
>   address2?: string,
>   city: string,
>   company?: string,
>   country_code: string,
>   email: string,
>   first_name: string,
>   last_name: string,
>   phone: string,
>   postal_code: string,
>   state: string,
>   nickname: string,
>   agree_to_eula: boolean,
>   meter_number?: string
> } | {
>   account_number: string,
>   address1: string,
>   address2?: string,
>   city: string,
>   company?: string,
>   country_code: string,
>   email: string,
>   first_name: string,
>   last_name: string,
>   phone: string,
>   postal_code: string,
>   state: string,
>   nickname: string,
>   agree_to_eula: boolean,
>   meter_number?: string
> } | {
>   nickname: string,
>   mailer_id: string,
>   profile_name?: string,
>   password: string
> } | {
>   nickname: string,
>   username: string,
>   password: string
> } | {
>   nickname: string,
>   web_services_id: string,
>   web_services_key: string,
>   customer_branch: string,
>   Address: string,
>   Address2?: string,
>   PostalCode: string,
>   City: string,
>   State: string,
>   country?: string,
>   Phone?: string,
>   Email?: string,
>   instructions?: string,
>   facility_code?: string,
>   lasership_critical_pull_time: string,
>   lasership_critical_entry_time: string,
>   declare_piece_attributes_separately_for_every_shipment?: string,
>   AttrAlcohol?: string,
>   AttrDryIce?: string,
>   AttrHazmat?: string,
>   AttrTwoPersons?: string,
>   AttrExplosive?: string,
>   AttrControlledSubstance?: string,
>   AttrRefrigerated?: string,
>   AttrPerishable?: string,
>   AttrNoRTS?: string
> } | {
>   merchant_id?: number,
>   mailer_id?: number,
>   induction_site: string,
>   nickname: string
> } | {
>   nickname: string,
>   account_number: string,
>   password: string
> } | {
>   account_number: string,
>   activation_key: string,
>   nickname: string
> } | {
>   account_number: string,
>   oba_email?: string,
>   contact_name: string,
>   email?: string,
>   company_name?: string,
>   street_line1?: string,
>   street_line2?: string,
>   street_line3?: string,
>   city: string,
>   postal_code: string,
>   phone?: string,
>   nickname: string
> } | {
>   nickname: string,
>   username: string,
>   password: string
> } | {
>   nickname: string,
>   access_key: string
> } | {
>   nickname: string,
>   sendle_id: string,
>   api_key: string
> } | {
>   nickname: string,
>   username: string,
>   password: string
> } | {
>   nickname: string,
>   account_number: string,
>   account_postal_code: string,
>   account_country_code: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `carrier_id` | `string` | Yes | — |

***

### disconnectCarrier

`carrierAccounts.disconnectCarrier`

Disconnect a carrier

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.carrierAccounts.disconnectCarrier({
	path: { carrier_name: 'access_worldwide', carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Disconnect a carrier deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_name: access_worldwide | amazon_buy_shipping | amazon_shipping_uk | apc | asendia | australia_post | canada_post | dhl_ecommerce | dhl_express | dhl_express_au | dhl_express_ca | dhl_express_uk | dpd | endicia | fedex | fedex_uk | firstmile | imex | newgistics | ontrac | purolator_canada | royal_mail | rr_donnelley | seko | sendle | stamps_com | ups | lasership,
>   carrier_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getCarrierSettings

`carrierAccounts.getCarrierSettings`

Get carrier settings

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carrierAccounts.getCarrierSettings({
	path: { carrier_name: 'dhl_express', carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_name: dhl_express | fedex | newgistics | ups,
>   carrier_id: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   nickname?: string,
>   should_hide_account_number_on_archive_doc?: boolean,
>   is_primary_account?: boolean
> } | {
>   nickname?: string,
>   pickup_type?: none | regular_pickup | request_courier | drop_box | business_service_center | station,
>   smart_post_hub?: none | allentown_pa | atlanta_ga | baltimore_md | charlotte_nc | chino_ca | dallas_tx | denver_co | detroit_mi | edison_nj | grove_city_oh | groveport_oh | houston_tx | indianapolis_in | kansas_city_ks | los_angeles_ca | martinsburg_wv | memphis_tn | minneapolis_mn | new_berlin_wi | northborough_ma | orlando_fl | phoneix_az | pittsburgh_pa | reno_nv | sacramento_ca | salt_lake_city_ut | seattle_wa | st_louis_mo | windsor_ct | newark_ny | south_brunswick_nj | scranton_pa | wheeling_il | middletown_ct | portland_or,
>   smart_post_endorsement?: none | return_service_requested | forwarding_service_requested | address_service_requested | change_service_requested | leave_if_no_response,
>   is_primary_account?: boolean,
>   signature_image?: string,
>   letterhead_image?: string
> } | {
>   nickname?: string,
>   is_primary_account?: boolean,
>   pickup_type?: daily_pickup | occasional_pickup | customer_counter,
>   use_carbon_neutral_shipping_program?: boolean,
>   use_ground_freight_pricing?: boolean,
>   use_consolidation_services?: boolean,
>   use_order_number_on_mail_innovations_labels?: boolean,
>   mail_innovations_endorsement?: none | return_service_requested | forwarding_service_requested | address_service_requested | change_service_requested | leave_if_no_response,
>   mail_innovations_cost_center?: string,
>   use_negotiated_rates?: boolean,
>   account_postal_code?: string,
>   invoice?: {
>     invoice_date?: string,
>     invoice_number?: string,
>     control_id?: string,
>     invoice_amount?: number,
>     invoice_currency_code?: string
>   }
> }
> ```

***

### updateCarrierSettings

`carrierAccounts.updateCarrierSettings`

Update carrier settings

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.carrierAccounts.updateCarrierSettings({
	path: { carrier_name: 'dhl_express', carrier_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_name: dhl_express | fedex | newgistics | ups,
>   carrier_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   nickname?: string,
>   should_hide_account_number_on_archive_doc?: boolean,
>   is_primary_account?: boolean
> } | {
>   nickname?: string,
>   pickup_type?: none | regular_pickup | request_courier | drop_box | business_service_center | station,
>   smart_post_hub?: none | allentown_pa | atlanta_ga | baltimore_md | charlotte_nc | chino_ca | dallas_tx | denver_co | detroit_mi | edison_nj | grove_city_oh | groveport_oh | houston_tx | indianapolis_in | kansas_city_ks | los_angeles_ca | martinsburg_wv | memphis_tn | minneapolis_mn | new_berlin_wi | northborough_ma | orlando_fl | phoneix_az | pittsburgh_pa | reno_nv | sacramento_ca | salt_lake_city_ut | seattle_wa | st_louis_mo | windsor_ct | newark_ny | south_brunswick_nj | scranton_pa | wheeling_il | middletown_ct | portland_or,
>   smart_post_endorsement?: none | return_service_requested | forwarding_service_requested | address_service_requested | change_service_requested | leave_if_no_response,
>   is_primary_account?: boolean,
>   signature_image?: string,
>   letterhead_image?: string
> } | {
>   include_barcode_with_order_number?: boolean,
>   receive_email_on_manifest_processing?: boolean
> } | {
>   nickname?: string,
>   is_primary_account?: boolean,
>   pickup_type?: daily_pickup | occasional_pickup | customer_counter,
>   use_carbon_neutral_shipping_program?: boolean,
>   use_ground_freight_pricing?: boolean,
>   use_consolidation_services?: boolean,
>   use_order_number_on_mail_innovations_labels?: boolean,
>   mail_innovations_endorsement?: none | return_service_requested | forwarding_service_requested | address_service_requested | change_service_requested | leave_if_no_response,
>   mail_innovations_cost_center?: string,
>   use_negotiated_rates?: boolean,
>   account_postal_code?: string,
>   invoice?: {
>     invoice_date?: string,
>     invoice_number?: string,
>     control_id?: string,
>     invoice_amount?: number,
>     invoice_currency_code?: string
>   }
> } | {
>   email?: string
> }
> ```

**Output:** `string \| undefined`

***

## Carriers

### addFundsToCarrier

`carriers.addFundsToCarrier`

Add Funds To Carrier

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.carriers.addFundsToCarrier({
	path: { carrier_id: 'se-28529731' },
	body: { currency: 'example', amount: 0 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Add Funds To Carrier transfers money into a carrier or Shipsurance balance. Confirm the amount and funding account before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `balance` | `object` | Yes | — |

> [accordion] balance full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

***

### disconnectCarrierById

`carriers.disconnectCarrierById`

Disconnect Carrier by ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.carriers.disconnectCarrierById({
	path: { carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Disconnect Carrier by ID deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getCarrierById

`carriers.getCarrierById`

Get Carrier By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carriers.getCarrierById({
	path: { carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `carrier_id` | `string` | No | — |
| `carrier_code` | `string` | No | — |
| `account_number` | `string` | No | — |
| `requires_funded_amount` | `boolean` | No | — |
| `balance` | `number` | No | — |
| `nickname` | `string` | No | — |
| `friendly_name` | `string` | No | — |
| `funding_source_id` | `string \| null` | No | — |
| `primary` | `boolean` | No | — |
| `has_multi_package_supporting_services` | `boolean` | No | — |
| `allows_returns` | `boolean` | No | — |
| `supports_label_messages` | `boolean` | No | — |
| `disabled_by_billing_plan` | `boolean` | No | — |
| `services` | `object[]` | No | — |
| `packages` | `object[]` | No | — |
| `options` | `object[]` | No | — |
| `send_rates` | `boolean` | No | — |
| `supports_user_managed_rates` | `boolean` | No | — |
| `connection_status` | `pending_approval \| approved` | No | — |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   carrier_id?: string,
>   carrier_code?: string,
>   service_code?: string,
>   name?: string,
>   domestic?: boolean,
>   international?: boolean,
>   is_multi_package_supported?: boolean,
>   is_return_supported?: boolean
> }[]
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   package_id?: string,
>   package_code: string,
>   name: string,
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   }
> }[]
> ```

> [accordion] options full type
>
> ```ts theme={null}
> {
>   name?: string,
>   default_value?: string
> }[]
> ```

***

### getCarrierOptions

`carriers.getCarrierOptions`

Get Carrier Options

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carriers.getCarrierOptions({
	path: { carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `options` | `object[]` | No | — |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   name?: string,
>   default_value?: string
> }[]
> ```

***

### listCarrierPackageTypes

`carriers.listCarrierPackageTypes`

List Carrier Package Types

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carriers.listCarrierPackageTypes({
	path: { carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packages` | `object[]` | No | — |

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   package_id?: string,
>   package_code: string,
>   name: string,
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   }
> }[]
> ```

***

### listCarriers

`carriers.listCarriers`

List Carriers

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carriers.listCarriers({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `carriers` | `object[]` | Yes | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] carriers full type
>
> ```ts theme={null}
> {
>   carrier_id?: string,
>   carrier_code?: string,
>   account_number?: string,
>   requires_funded_amount?: boolean,
>   balance?: number,
>   nickname?: string,
>   friendly_name?: string,
>   funding_source_id?: string | null,
>   primary?: boolean,
>   has_multi_package_supporting_services?: boolean,
>   allows_returns?: boolean,
>   supports_label_messages?: boolean,
>   disabled_by_billing_plan?: boolean,
>   services?: {
>     carrier_id?: string,
>     carrier_code?: string,
>     service_code?: string,
>     name?: string,
>     domestic?: boolean,
>     international?: boolean,
>     is_multi_package_supported?: boolean,
>     is_return_supported?: boolean
>   }[],
>   packages?: {
>     description?: string | null,
>     package_id?: string,
>     package_code: string,
>     name: string,
>     dimensions?: {
>       unit: inch | centimeter,
>       length: number,
>       width: number,
>       height: number
>     }
>   }[],
>   options?: {
>     name?: string,
>     default_value?: string
>   }[],
>   send_rates?: boolean,
>   supports_user_managed_rates?: boolean,
>   connection_status?: pending_approval | approved
> }[]
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### listCarrierServices

`carriers.listCarrierServices`

List Carrier Services

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.carriers.listCarrierServices({
	path: { carrier_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The provider's List Carrier Services route example returns carrier\_code values such as stamps\_com. The OpenAPI se\_id pattern on this field conflicts with that route example; the plugin validates it as a carrier code.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `services` | `object[]` | No | — |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   carrier_id?: string,
>   carrier_code?: string,
>   service_code?: string,
>   name?: string,
>   domestic?: boolean,
>   international?: boolean,
>   is_multi_package_supported?: boolean,
>   is_return_supported?: boolean
> }[]
> ```

***

## Downloads

### downloadFile

`downloads.downloadFile`

Download File

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.downloads.downloadFile({
	path: { subdir: 'example', filename: 'example', dir: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

Binary download uses a custom byte-preserving transport because the shared Corsair JSON transport decodes binary bodies as text. The validated return value is Base64 with a 50 MiB safety limit.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   subdir: string,
>   filename: string,
>   dir: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   download?: string,
>   rotation?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `application/pdf \| image/png \| application/zpl` | Yes | — |
| `base64` | `string` | Yes | — |
| `byteLength` | `number` | Yes | — |

***

## Insurance

### addFundsToInsurance

`insurance.addFundsToInsurance`

Add Funds To Insurance

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.insurance.addFundsToInsurance({
	body: { currency: 'example', amount: 0 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

Add Funds To Insurance transfers money into a carrier or Shipsurance balance. Confirm the amount and funding account before using a production key.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `currency` | `string` | Yes | — |
| `amount` | `number` | Yes | — |

***

### connectInsurer

`insurance.connectInsurer`

Connect a Shipsurance Account

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.insurance.connectInsurer({
	body: { email: 'customer@example.com', policy_id: 'x' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   email: string,
>   policy_id: string
> }
> ```

**Output:** `Record<string, JsonValue>`

***

### disconnectInsurer

`insurance.disconnectInsurer`

Disconnect a Shipsurance Account

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.insurance.disconnectInsurer({});
```

**Input:** *empty object*

Disconnect a Shipsurance Account deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

**Output:** `Record<string, JsonValue>`

***

### getInsuranceBalance

`insurance.getInsuranceBalance`

Get Insurance Funds Balance

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.insurance.getInsuranceBalance({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `currency` | `string` | Yes | — |
| `amount` | `number` | Yes | — |

***

## Labels

### cancelLabelRefund

`labels.cancelLabelRefund`

Cancel a label refund request

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.labels.cancelLabelRefund({
	path: { label_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### createCombinedLabelDocument

`labels.createCombinedLabelDocument`

Created Combined Label Document

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.labels.createCombinedLabelDocument({
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   label_ids?: string[],
>   label_format?: pdf,
>   label_download_type?: url | inline
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_download` | `object` | No | — |

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

***

### createLabel

`labels.createLabel`

Purchase Label

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.createLabel({
	body: {
		shipment: {
			carrier_id: 'se-28529731',
			service_code: 'usps_first_class_mail',
			ship_to: {
				name: 'example',
				address_line1: '123 Example St',
				city_locality: 'Example City',
				state_province: 'CA',
				postal_code: '94000',
			},
			packages: [{
				weight: { value: 0, unit: 'pound' },
			}],
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

Purchase Label purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipment: {
>     carrier_id: string,
>     service_code: string,
>     shipping_rule_id?: string,
>     external_order_id?: string | null,
>     items?: {
>       name?: string,
>       sales_order_id?: string | null,
>       sales_order_item_id?: string | null,
>       quantity?: number,
>       sku?: string | null,
>       external_order_id?: string | null,
>       external_order_item_id?: string | null,
>       asin?: string | null,
>       order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>     }[],
>     tax_identifiers?: {
>       taxable_entity_type: shipper | recipient | ior,
>       identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>       issuing_authority: string,
>       value: string
>     }[] | null,
>     external_shipment_id?: string | null,
>     shipment_number?: string | null,
>     ship_date?: string,
>     ship_to: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null,
>       geolocation?: {
>         type?: what3words,
>         value?: string
>       }[]
>     },
>     ship_from?: {
>       name: string,
>       phone: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     warehouse_id?: string | null,
>     return_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     is_return?: boolean | null,
>     confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>     customs?: {
>       contents: merchandise | documents | gift | returned_goods | sample | other,
>       contents_explanation?: string,
>       non_delivery: return_to_sender | treat_as_abandoned,
>       terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>       declaration?: string,
>       invoice_additional_details?: {
>         freight_charge?: {
>           currency: string,
>           amount: number
>         },
>         insurance_charge?: {
>           currency: string,
>           amount: number
>         },
>         discount?: {
>           currency: string,
>           amount: number
>         },
>         estimated_import_charges?: {
>           taxes?: {
>             currency: string,
>             amount: number
>           },
>           duties?: {
>             currency: string,
>             amount: number
>           }
>         },
>         other_charge?: {
>           currency: string,
>           amount: number
>         },
>         other_charge_description?: string,
>         invoice_number?: string
>       },
>       importer_of_record?: {
>         name: string,
>         phone?: string,
>         email?: string | null,
>         company_name?: string | null,
>         address_line1: string,
>         address_line2?: string | null,
>         address_line3?: string | null,
>         city_locality: string,
>         state_province?: string,
>         postal_code: string,
>         country_code: string
>       },
>       license_number?: string,
>       certificate_number?: string,
>       customs_items?: {
>         description?: string | null,
>         quantity?: number,
>         value?: number,
>         value_currency?: string,
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null
>       }[]
>     } | null,
>     advanced_options?: {
>       bill_to_account?: string | null,
>       bill_to_country_code?: string | null,
>       bill_to_party?: recipient | third_party | null,
>       bill_to_postal_code?: string | null,
>       contains_alcohol?: boolean,
>       delivered_duty_paid?: boolean,
>       dry_ice?: boolean,
>       dry_ice_weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       } | null,
>       non_machinable?: boolean,
>       saturday_delivery?: boolean,
>       fedex_freight?: {
>         shipper_load_and_count?: string,
>         booking_confirmation?: string
>       },
>       use_ups_ground_freight_pricing?: boolean | null,
>       freight_class?: string | null,
>       custom_field1?: string | null,
>       custom_field2?: string | null,
>       custom_field3?: string | null,
>       origin_type?: pickup | drop_off | null,
>       additional_handling?: boolean | null,
>       shipper_release?: boolean | null,
>       collect_on_delivery?: {
>         payment_type?: any | cash | cash_equivalent | none,
>         payment_amount?: {
>           currency?: string,
>           amount?: number
>         }
>       },
>       third_party_consignee?: boolean,
>       dangerous_goods?: boolean,
>       dangerous_goods_contact?: {
>         name?: string,
>         phone?: string
>       },
>       windsor_framework_details?: {
>         movement_indicator?: c2c | b2c | c2b | b2b,
>         not_at_risk?: boolean
>       },
>       license_number?: string | null,
>       invoice_number?: string | null,
>       certificate_number?: string | null,
>       fragile?: boolean,
>       delivery-as-addressed?: boolean,
>       return-after-first-attempt?: boolean,
>       regulated_content_type?: day_old_poultry | other_live_animal | null
>     },
>     insurance_provider?: none | shipsurance | carrier | third_party,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>     packages: {
>       package_id?: string,
>       package_code?: string,
>       package_name?: string,
>       weight: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       },
>       insured_value?: {
>         currency: string,
>         amount: number
>       },
>       label_messages?: {
>         reference1?: string | null,
>         reference2?: string | null,
>         reference3?: string | null
>       },
>       external_package_id?: string,
>       content_description?: string | null,
>       products?: {
>         description?: string | null,
>         quantity?: number,
>         value?: {
>           currency: string,
>           amount: number
>         },
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null,
>         mid_code?: string | null,
>         product_url?: string | null,
>         vat_rate?: number | null,
>         dangerous_goods?: {
>           id_number?: string | null,
>           shipping_name?: string | null,
>           technical_name?: string | null,
>           product_class?: string | null,
>           product_class_subsidiary?: string | null,
>           packaging_group?: i | ii | iii,
>           dangerous_amount?: {
>             amount?: number,
>             unit?: string | null
>           },
>           quantity?: number,
>           packaging_instruction?: string | null,
>           packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>           packaging_type?: string | null,
>           transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>           transport_category?: string | null,
>           regulation_authority?: string | null,
>           regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>           radioactive?: boolean | null,
>           reportable_quantity?: boolean | null,
>           tunnel_code?: string | null,
>           additional_description?: string | null
>         }[],
>         extended_details?: Record<string, JsonValue>
>       }[]
>     }[],
>     comparison_rate_type?: string | null
>   },
>   is_return_label?: boolean,
>   rma_number?: string | null,
>   charge_event?: carrier_default | on_creation | on_carrier_acceptance,
>   outbound_label_id?: string,
>   test_label?: boolean,
>   validate_address?: no_validation | validate_only | validate_and_clean,
>   label_download_type?: url | inline,
>   label_format?: pdf | png | zpl,
>   display_scheme?: label | paperless | label_and_paperless,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_image_id?: string | null,
>   ship_to_service_point_id?: string | null,
>   ship_from_service_point_id?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | Yes | — |
| `status` | `processing \| completed \| error \| voided` | Yes | — |
| `shipment_id` | `string` | Yes | — |
| `external_shipment_id` | `string \| null` | Yes | — |
| `external_order_id` | `string \| null` | Yes | — |
| `ship_date` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `shipment_cost` | `object` | Yes | — |
| `insurance_cost` | `object` | Yes | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | Yes | — |
| `is_return_label` | `boolean` | Yes | — |
| `rma_number` | `string \| null` | Yes | — |
| `is_international` | `boolean` | Yes | — |
| `batch_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | Yes | — |
| `service_code` | `string` | Yes | — |
| `package_code` | `string` | Yes | — |
| `voided` | `boolean` | Yes | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | Yes | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | Yes | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | Yes | — |
| `trackable` | `boolean` | Yes | — |
| `label_image_id` | `string \| null` | Yes | — |
| `carrier_code` | `string` | Yes | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | Yes | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | Yes | — |
| `form_download` | `object \| null` | Yes | — |
| `qr_code_download` | `object \| null` | Yes | — |
| `paperless_download` | `object \| null` | Yes | — |
| `insurance_claim` | `object \| null` | Yes | — |
| `packages` | `object[]` | Yes | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | Yes | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### createLabelFromRate

`labels.createLabelFromRate`

Purchase Label with Rate ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.createLabelFromRate({
	path: { rate_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Purchase Label with Rate ID purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   rate_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   validate_address?: no_validation | validate_only | validate_and_clean,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_format?: pdf | png | zpl,
>   label_download_type?: url | inline,
>   display_scheme?: label | paperless | label_and_paperless,
>   custom_field1?: string,
>   custom_field2?: string,
>   custom_field3?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### createLabelFromRateShopper

`labels.createLabelFromRateShopper`

Purchase Label from Rate Shopper

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.createLabelFromRateShopper({
	path: { rate_shopper_id: 'best_value' },
	body: {
		shipment: {},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Purchase Label from Rate Shopper purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   rate_shopper_id: best_value | cheapest | fastest
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipment: {
>     external_order_id?: string | null,
>     items?: {
>       name?: string,
>       sales_order_id?: string | null,
>       sales_order_item_id?: string | null,
>       quantity?: number,
>       sku?: string | null,
>       external_order_id?: string | null,
>       external_order_item_id?: string | null,
>       asin?: string | null,
>       order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>     }[],
>     tax_identifiers?: {
>       taxable_entity_type: shipper | recipient | ior,
>       identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>       issuing_authority: string,
>       value: string
>     }[] | null,
>     external_shipment_id?: string | null,
>     shipment_number?: string | null,
>     ship_date?: string,
>     ship_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null,
>       geolocation?: {
>         type?: what3words,
>         value?: string
>       }[]
>     },
>     ship_from?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     warehouse_id?: string | null,
>     return_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     is_return?: boolean | null,
>     confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>     customs?: {
>       contents: merchandise | documents | gift | returned_goods | sample | other,
>       contents_explanation?: string,
>       non_delivery: return_to_sender | treat_as_abandoned,
>       terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>       declaration?: string,
>       invoice_additional_details?: {
>         freight_charge?: {
>           currency: string,
>           amount: number
>         },
>         insurance_charge?: {
>           currency: string,
>           amount: number
>         },
>         discount?: {
>           currency: string,
>           amount: number
>         },
>         estimated_import_charges?: {
>           taxes?: {
>             currency: string,
>             amount: number
>           },
>           duties?: {
>             currency: string,
>             amount: number
>           }
>         },
>         other_charge?: {
>           currency: string,
>           amount: number
>         },
>         other_charge_description?: string,
>         invoice_number?: string
>       },
>       importer_of_record?: {
>         name: string,
>         phone?: string,
>         email?: string | null,
>         company_name?: string | null,
>         address_line1: string,
>         address_line2?: string | null,
>         address_line3?: string | null,
>         city_locality: string,
>         state_province?: string,
>         postal_code: string,
>         country_code: string
>       },
>       license_number?: string,
>       certificate_number?: string,
>       customs_items?: {
>         description?: string | null,
>         quantity?: number,
>         value?: number,
>         value_currency?: string,
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null
>       }[]
>     } | null,
>     advanced_options?: {
>       bill_to_account?: string | null,
>       bill_to_country_code?: string | null,
>       bill_to_party?: recipient | third_party | null,
>       bill_to_postal_code?: string | null,
>       contains_alcohol?: boolean,
>       delivered_duty_paid?: boolean,
>       dry_ice?: boolean,
>       dry_ice_weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       } | null,
>       non_machinable?: boolean,
>       saturday_delivery?: boolean,
>       fedex_freight?: {
>         shipper_load_and_count?: string,
>         booking_confirmation?: string
>       },
>       use_ups_ground_freight_pricing?: boolean | null,
>       freight_class?: string | null,
>       custom_field1?: string | null,
>       custom_field2?: string | null,
>       custom_field3?: string | null,
>       origin_type?: pickup | drop_off | null,
>       additional_handling?: boolean | null,
>       shipper_release?: boolean | null,
>       collect_on_delivery?: {
>         payment_type?: any | cash | cash_equivalent | none,
>         payment_amount?: {
>           currency?: string,
>           amount?: number
>         }
>       },
>       third_party_consignee?: boolean,
>       dangerous_goods?: boolean,
>       dangerous_goods_contact?: {
>         name?: string,
>         phone?: string
>       },
>       windsor_framework_details?: {
>         movement_indicator?: c2c | b2c | c2b | b2b,
>         not_at_risk?: boolean
>       },
>       license_number?: string | null,
>       invoice_number?: string | null,
>       certificate_number?: string | null,
>       fragile?: boolean,
>       delivery-as-addressed?: boolean,
>       return-after-first-attempt?: boolean,
>       regulated_content_type?: day_old_poultry | other_live_animal | null
>     },
>     insurance_provider?: none | shipsurance | carrier | third_party,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>     packages?: {
>       package_id?: string,
>       package_code?: string,
>       package_name?: string,
>       weight: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       },
>       insured_value?: {
>         currency: string,
>         amount: number
>       },
>       label_messages?: {
>         reference1?: string | null,
>         reference2?: string | null,
>         reference3?: string | null
>       },
>       external_package_id?: string,
>       content_description?: string | null,
>       products?: {
>         description?: string | null,
>         quantity?: number,
>         value?: {
>           currency: string,
>           amount: number
>         },
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null,
>         mid_code?: string | null,
>         product_url?: string | null,
>         vat_rate?: number | null,
>         dangerous_goods?: {
>           id_number?: string | null,
>           shipping_name?: string | null,
>           technical_name?: string | null,
>           product_class?: string | null,
>           product_class_subsidiary?: string | null,
>           packaging_group?: i | ii | iii,
>           dangerous_amount?: {
>             amount?: number,
>             unit?: string | null
>           },
>           quantity?: number,
>           packaging_instruction?: string | null,
>           packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>           packaging_type?: string | null,
>           transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>           transport_category?: string | null,
>           regulation_authority?: string | null,
>           regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>           radioactive?: boolean | null,
>           reportable_quantity?: boolean | null,
>           tunnel_code?: string | null,
>           additional_description?: string | null
>         }[],
>         extended_details?: Record<string, JsonValue>
>       }[]
>     }[],
>     comparison_rate_type?: string | null
>   },
>   is_return_label?: boolean,
>   rma_number?: string | null,
>   charge_event?: carrier_default | on_creation | on_carrier_acceptance,
>   outbound_label_id?: string,
>   test_label?: boolean,
>   validate_address?: no_validation | validate_only | validate_and_clean,
>   label_download_type?: url | inline,
>   label_format?: pdf | png | zpl,
>   display_scheme?: label | paperless | label_and_paperless,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_image_id?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |
| `rate_shopper_id` | `best_value \| cheapest \| fastest` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### createLabelFromShipment

`labels.createLabelFromShipment`

Purchase Label with Shipment ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.createLabelFromShipment({
	path: { shipment_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Purchase Label with Shipment ID purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   validate_address?: no_validation | validate_only | validate_and_clean,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_format?: pdf | png | zpl,
>   label_download_type?: url | inline,
>   display_scheme?: label | paperless | label_and_paperless
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### createReturnLabel

`labels.createReturnLabel`

Create a return label

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.createReturnLabel({
	path: { label_id: 'se-28529731' },
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Create a return label purchases one or more carrier labels and can incur shipping charges. ShipStation wallet-carrier costs are deducted from the account balance; merchant carrier accounts follow carrier billing terms. Verify the rate before using a production key.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   charge_event?: carrier_default | on_creation | on_carrier_acceptance,
>   label_layout?: 4x6 | letter | A4 | A6,
>   label_format?: pdf | png | zpl,
>   label_download_type?: url | inline,
>   display_scheme?: label | paperless | label_and_paperless,
>   label_image_id?: string | null,
>   rma_number?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### getLabelByExternalShipmentId

`labels.getLabelByExternalShipmentId`

Get Label By External Shipment ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.labels.getLabelByExternalShipmentId({
	path: { external_shipment_id: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   external_shipment_id: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   label_download_type?: url | inline
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### getLabelById

`labels.getLabelById`

Get Label By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.labels.getLabelById({
	path: { label_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_id: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   label_download_type?: url | inline
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `label_id` | `string` | No | — |
| `status` | `processing \| completed \| error \| voided` | No | — |
| `shipment_id` | `string` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `ship_date` | `string` | No | — |
| `created_at` | `string` | No | — |
| `shipment_cost` | `object` | No | — |
| `insurance_cost` | `object` | No | — |
| `requested_comparison_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `tracking_number` | `string` | No | — |
| `is_return_label` | `boolean` | No | — |
| `rma_number` | `string \| null` | No | — |
| `is_international` | `boolean` | No | — |
| `batch_id` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `charge_event` | `carrier_default \| on_creation \| on_carrier_acceptance` | No | — |
| `service_code` | `string` | No | — |
| `package_code` | `string` | No | — |
| `voided` | `boolean` | No | — |
| `voided_at` | `string \| null` | No | — |
| `label_format` | `pdf \| png \| zpl` | No | — |
| `display_scheme` | `label \| paperless \| label_and_paperless` | No | — |
| `label_layout` | `4x6 \| letter \| A4 \| A6` | No | — |
| `trackable` | `boolean` | No | — |
| `label_image_id` | `string \| null` | No | — |
| `carrier_code` | `string` | No | — |
| `tracking_status` | `unknown \| in_transit \| error \| delivered` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | No | — |
| `label_download` | `object` | No | — |
| `form_download` | `object \| null` | No | — |
| `qr_code_download` | `object \| null` | No | — |
| `paperless_download` | `object \| null` | No | — |
| `insurance_claim` | `object \| null` | No | — |
| `packages` | `object[]` | No | — |
| `alternative_identifiers` | `object[] \| null` | No | — |
| `tracking_url` | `string \| null` | No | — |
| `ship_to` | `object` | No | — |
| `void_type` | `refund_assist \| manual \| null` | No | — |
| `refund_details` | `object \| null` | No | — |

> [accordion] shipment\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_cost full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

> [accordion] label\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   pdf?: string,
>   png?: string,
>   zpl?: string
> }
> ```

> [accordion] form\_download full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] qr\_code\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   type?: string
> } | null
> ```

> [accordion] paperless\_download full type
>
> ```ts theme={null}
> {
>   href?: string,
>   instructions?: string | null,
>   handoff_code?: string | null
> } | null
> ```

> [accordion] insurance\_claim full type
>
> ```ts theme={null}
> {
>   href: string,
>   type?: string
> } | null
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   package_id?: number,
>   package_code?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   tracking_number?: string,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href?: string,
>     type?: string
>   },
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   },
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   content_description?: string | null,
>   sequence?: number,
>   has_label_documents?: boolean,
>   has_form_documents?: boolean,
>   has_qr_code_documents?: boolean,
>   has_paperless_label_documents?: boolean,
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null
> }[]
> ```

> [accordion] alternative\_identifiers full type
>
> ```ts theme={null}
> {
>   type?: string,
>   value?: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] refund\_details full type
>
> ```ts theme={null}
> {
>   refund_status?: request_scheduled | pending | approved | rejected | excluded,
>   request_date?: string,
>   amount_paid?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_requested?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_approved?: {
>     currency: string,
>     amount: number
>   } | null,
>   amount_credited?: {
>     currency: string,
>     amount: number
>   } | null
> } | null
> ```

***

### getTrackingLogFromLabel

`labels.getTrackingLogFromLabel`

Get Label Tracking Information

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.labels.getTrackingLogFromLabel({
	path: { label_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tracking_number` | `string` | Yes | — |
| `tracking_url` | `string` | No | — |
| `status_code` | `UN \| AC \| IT \| DE \| EX \| AT \| NY \| SP` | Yes | — |
| `status_detail_code` | `CARRIER_STATUS_NOT_MAPPED \| SHIPMENT_CREATED \| AWAITING_PICKUP_DROP_OFF \| DROPPED_OFF \| ELEC_ADVICE_RECD_BY_CARRIER \| PICKED_UP \| CUSTOMS_CLEARED \| CUSTOMS_PROCESSING \| DELIVERY_ARRANGED_WITH_RECIPIENT \| HUB_SCAN_OUT \| HUB_SCAN_IN \| IN_TRANSIT \| INFORMATION \| PARCEL_OVER_LABELLED \| PARCEL_UPDATE_NOTIFICATION \| RECEIVED_BY_CARRIER \| RECEIVED_LOCAL_DELIVERY_DEPOT \| SUB_CONTRACTOR_EVENT \| SUB_CONTRACTOR_RECEIVED \| PARCEL_REDIRECTED \| DELIVERY_SCHEDULED \| HUB_PROCESSING \| DELIVERY_RESCHEDULED \| ATTEMPTED_DELIVERY \| ATTEMPTED_DELIVERY_FINAL \| COD_AMOUNT_PAID \| CUSTOMER_CARDED \| OUT_FOR_DELIVERY \| AWAITING_COLLECTION_FROM_PICKUP_POINT \| COLLECT_AT_LOCAL_PO \| CUSTOMER_TO_COLLECT_FROM_CARRIER \| DELIVERED_TO_RECEPTION \| DELIVERED \| DELIVERED_DAMAGED \| DELIVERED_IN_PART \| DELIVERED_SPECIFIED_SAFE_PLACE \| DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION \| DELIVERED_TO_NEIGHBOUR \| DELIVERED_TO_PO_BOX \| PARCEL_COLLECTED_FROM_PICKUP_POINT \| POST_TRANSIT_STATUS \| PROOF_OF_DELIVERY \| PICKUP_FAILED \| NOT_YET_RECEIVED_BY_CARRIER \| PARCEL_DAMAGED \| ADDRESS_QUERY \| CARRIER_DELAYS \| DELAYED_NOT_CARRIER \| HELD_BY_CARRIER \| HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING \| HELD_BY_CUSTOMS \| INCORRECT_DECLARATION \| MISROUTED \| PARCEL_REPACKED \| RECD_BY_CARRIER_NO_ELEC_ADVICE \| COD_AMOUNT_NOT_PAID \| CUSTOMER_IDENTIFICATION_FAILED \| NO_ACCESS_TO_RECIPIENTS_ADDRESS \| CANCELLED \| CUSTOMER_MOVED \| HAZARDOUS_PROHIBITED \| NOT_COLLECTED_FROM_PICKUP_POINT \| NOT_DELIVERED \| NOT_DELIVERED_ADDRESSEE_DECEASED \| PARCEL_DISPOSED \| PARCEL_LOST \| PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY \| REFUSED_BY_CUSTOMER \| RETURN_TO_SENDER \| UNSPECIFIED_EXCEPTION \| TRACKING_EXPIRED \| DUTY_NOT_PAID \| PARCEL_REDIRECTED_BY_CARRIER \| DELIVERED_TO_PICKUP_POINT \| UNDELIVERABLE_RETURNED_TO_SENDER` | No | — |
| `carrier_code` | `string` | No | — |
| `carrier_id` | `number` | No | — |
| `status_description` | `string` | No | — |
| `status_detail_description` | `string` | No | — |
| `carrier_status_code` | `string` | Yes | — |
| `carrier_detail_code` | `string` | No | — |
| `carrier_status_description` | `string` | No | — |
| `ship_date` | `string` | No | — |
| `estimated_delivery_date` | `string` | No | — |
| `actual_delivery_date` | `string` | No | — |
| `exception_description` | `string` | No | — |
| `events` | `object[]` | Yes | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   occurred_at: string,
>   carrier_occurred_at?: string,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   company_name?: string,
>   signer?: string,
>   event_code?: string,
>   carrier_detail_code: string,
>   status_code: UN | AC | IT | DE | EX | AT | NY | SP,
>   status_detail_code?: CARRIER_STATUS_NOT_MAPPED | SHIPMENT_CREATED | AWAITING_PICKUP_DROP_OFF | DROPPED_OFF | ELEC_ADVICE_RECD_BY_CARRIER | PICKED_UP | CUSTOMS_CLEARED | CUSTOMS_PROCESSING | DELIVERY_ARRANGED_WITH_RECIPIENT | HUB_SCAN_OUT | HUB_SCAN_IN | IN_TRANSIT | INFORMATION | PARCEL_OVER_LABELLED | PARCEL_UPDATE_NOTIFICATION | RECEIVED_BY_CARRIER | RECEIVED_LOCAL_DELIVERY_DEPOT | SUB_CONTRACTOR_EVENT | SUB_CONTRACTOR_RECEIVED | PARCEL_REDIRECTED | DELIVERY_SCHEDULED | HUB_PROCESSING | DELIVERY_RESCHEDULED | ATTEMPTED_DELIVERY | ATTEMPTED_DELIVERY_FINAL | COD_AMOUNT_PAID | CUSTOMER_CARDED | OUT_FOR_DELIVERY | AWAITING_COLLECTION_FROM_PICKUP_POINT | COLLECT_AT_LOCAL_PO | CUSTOMER_TO_COLLECT_FROM_CARRIER | DELIVERED_TO_RECEPTION | DELIVERED | DELIVERED_DAMAGED | DELIVERED_IN_PART | DELIVERED_SPECIFIED_SAFE_PLACE | DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION | DELIVERED_TO_NEIGHBOUR | DELIVERED_TO_PO_BOX | PARCEL_COLLECTED_FROM_PICKUP_POINT | POST_TRANSIT_STATUS | PROOF_OF_DELIVERY | PICKUP_FAILED | NOT_YET_RECEIVED_BY_CARRIER | PARCEL_DAMAGED | ADDRESS_QUERY | CARRIER_DELAYS | DELAYED_NOT_CARRIER | HELD_BY_CARRIER | HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING | HELD_BY_CUSTOMS | INCORRECT_DECLARATION | MISROUTED | PARCEL_REPACKED | RECD_BY_CARRIER_NO_ELEC_ADVICE | COD_AMOUNT_NOT_PAID | CUSTOMER_IDENTIFICATION_FAILED | NO_ACCESS_TO_RECIPIENTS_ADDRESS | CANCELLED | CUSTOMER_MOVED | HAZARDOUS_PROHIBITED | NOT_COLLECTED_FROM_PICKUP_POINT | NOT_DELIVERED | NOT_DELIVERED_ADDRESSEE_DECEASED | PARCEL_DISPOSED | PARCEL_LOST | PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY | REFUSED_BY_CUSTOMER | RETURN_TO_SENDER | UNSPECIFIED_EXCEPTION | TRACKING_EXPIRED | DUTY_NOT_PAID | PARCEL_REDIRECTED_BY_CARRIER | DELIVERED_TO_PICKUP_POINT | UNDELIVERABLE_RETURNED_TO_SENDER,
>   status_description: string,
>   status_detail_description?: string,
>   carrier_status_code: string,
>   carrier_status_description: string,
>   latitude?: number,
>   longitude?: number,
>   proof_of_delivery_url?: string
> }[]
> ```

***

### listLabels

`labels.listLabels`

List labels

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.labels.listLabels({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   label_status?: processing | completed | error | voided,
>   service_code?: string,
>   carrier_id?: string,
>   tracking_number?: string,
>   batch_id?: string,
>   rate_id?: string,
>   shipment_id?: string,
>   warehouse_id?: string,
>   created_at_start?: string,
>   created_at_end?: string,
>   refund_status?: (request_scheduled | pending | approved | rejected | excluded)[],
>   page?: number,
>   page_size?: number,
>   sort_dir?: asc | desc,
>   sort_by?: modified_at | created_at | voided_at
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |
| `labels` | `object[]` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   label_id?: string,
>   status?: processing | completed | error | voided,
>   shipment_id?: string,
>   external_shipment_id?: string | null,
>   external_order_id?: string | null,
>   ship_date?: string,
>   created_at?: string,
>   shipment_cost?: {
>     currency: string,
>     amount: number
>   },
>   insurance_cost?: {
>     currency: string,
>     amount: number
>   },
>   requested_comparison_amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_details?: {
>     rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>     carrier_description?: string,
>     carrier_billing_code?: string,
>     carrier_memo?: string,
>     amount?: {
>       currency: string,
>       amount: number
>     },
>     rate_detail_attributes?: {
>       tax_type?: vat,
>       tax_percentage?: number
>     },
>     billing_source?: string
>   }[],
>   tracking_number?: string,
>   is_return_label?: boolean,
>   rma_number?: string | null,
>   is_international?: boolean,
>   batch_id?: string,
>   carrier_id?: string,
>   charge_event?: carrier_default | on_creation | on_carrier_acceptance,
>   service_code?: string,
>   package_code?: string,
>   voided?: boolean,
>   voided_at?: string | null,
>   label_format?: pdf | png | zpl,
>   display_scheme?: label | paperless | label_and_paperless,
>   label_layout?: 4x6 | letter | A4 | A6,
>   trackable?: boolean,
>   label_image_id?: string | null,
>   carrier_code?: string,
>   tracking_status?: unknown | in_transit | error | delivered,
>   confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   label_download?: {
>     href?: string,
>     pdf?: string,
>     png?: string,
>     zpl?: string
>   },
>   form_download?: {
>     href: string,
>     type?: string
>   } | null,
>   qr_code_download?: {
>     href?: string,
>     type?: string
>   } | null,
>   paperless_download?: {
>     href?: string,
>     instructions?: string | null,
>     handoff_code?: string | null
>   } | null,
>   insurance_claim?: {
>     href: string,
>     type?: string
>   } | null,
>   packages?: {
>     package_id?: number,
>     package_code?: string,
>     weight: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     dimensions?: {
>       unit: inch | centimeter,
>       length: number,
>       width: number,
>       height: number
>     },
>     insured_value?: {
>       currency: string,
>       amount: number
>     },
>     tracking_number?: string,
>     label_download?: {
>       href?: string,
>       pdf?: string,
>       png?: string,
>       zpl?: string
>     },
>     form_download?: {
>       href?: string,
>       type?: string
>     },
>     qr_code_download?: {
>       href?: string,
>       type?: string
>     },
>     paperless_download?: {
>       href?: string,
>       instructions?: string | null,
>       handoff_code?: string | null
>     },
>     label_messages?: {
>       reference1: string | null,
>       reference2: string | null,
>       reference3: string | null
>     },
>     external_package_id?: string,
>     content_description?: string | null,
>     sequence?: number,
>     has_label_documents?: boolean,
>     has_form_documents?: boolean,
>     has_qr_code_documents?: boolean,
>     has_paperless_label_documents?: boolean,
>     alternative_identifiers?: {
>       type?: string,
>       value?: string
>     }[] | null
>   }[],
>   alternative_identifiers?: {
>     type?: string,
>     value?: string
>   }[] | null,
>   tracking_url?: string | null,
>   ship_to?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null,
>     geolocation?: {
>       type?: what3words,
>       value?: string
>     }[]
>   },
>   void_type?: refund_assist | manual | null,
>   refund_details?: {
>     refund_status?: request_scheduled | pending | approved | rejected | excluded,
>     request_date?: string,
>     amount_paid?: {
>       currency: string,
>       amount: number
>     } | null,
>     amount_requested?: {
>       currency: string,
>       amount: number
>     } | null,
>     amount_approved?: {
>       currency: string,
>       amount: number
>     } | null,
>     amount_credited?: {
>       currency: string,
>       amount: number
>     } | null
>   } | null
> }[]
> ```

***

### voidLabel

`labels.voidLabel`

Void a Label By ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.labels.voidLabel({
	path: { label_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   label_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approved` | `boolean` | Yes | — |
| `message` | `string` | Yes | — |
| `reason_code` | `unknown \| unspecified \| validation_failed \| label_not_found_within_void_period \| label_already_used \| label_already_voided \| contact_carrier` | No | — |

***

## Manifests

### createManifest

`manifests.createManifest`

Create Manifest

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.manifests.createManifest({
	body: { carrier_id: 'se-28529731', warehouse_id: 'se-28529731', ship_date: '2018-09-23T15:00:00.000Z' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

Create Manifest closes out the listed labels with the carrier. Some carriers (Royal Mail) do not let a manifested label be voided through the API, so check the label list before calling.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   carrier_id: string,
>   excluded_label_ids?: string[],
>   label_ids?: string[],
>   warehouse_id: string,
>   ship_date: string
> } | {
>   label_ids: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `manifests` | `object[]` | No | — |
| `manifest_requests` | `object[]` | No | — |
| `manifest_id` | `string` | Yes | — |
| `form_id` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `ship_date` | `string` | Yes | — |
| `shipments` | `number` | Yes | — |
| `warehouse_id` | `string` | Yes | — |
| `submission_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `manifest_download` | `object` | Yes | — |
| `label_ids` | `string[]` | No | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] manifests full type
>
> ```ts theme={null}
> {
>   manifest_id?: string,
>   form_id?: string,
>   created_at?: string,
>   ship_date?: string,
>   shipments?: number,
>   label_ids?: string[],
>   warehouse_id?: string,
>   submission_id?: string,
>   carrier_id?: string,
>   manifest_download?: {
>     href?: string
>   }
> }[]
> ```

> [accordion] manifest\_requests full type
>
> ```ts theme={null}
> {
>   manifest_request_id?: string,
>   status?: in_progress | completed
> }[]
> ```

> [accordion] manifest\_download full type
>
> ```ts theme={null}
> {
>   href?: string
> }
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### getManifestById

`manifests.getManifestById`

Get Manifest By Id

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.manifests.getManifestById({
	path: { manifest_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   manifest_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `manifest_id` | `string` | Yes | — |
| `form_id` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `ship_date` | `string` | Yes | — |
| `shipments` | `number` | Yes | — |
| `label_ids` | `string[]` | Yes | — |
| `warehouse_id` | `string` | Yes | — |
| `submission_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `manifest_download` | `object` | Yes | — |

> [accordion] manifest\_download full type
>
> ```ts theme={null}
> {
>   href?: string
> }
> ```

***

### getManifestRequestById

`manifests.getManifestRequestById`

Get Manifest Request By Id

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.manifests.getManifestRequestById({
	path: { manifest_request_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   manifest_request_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `manifests` | `object[]` | No | — |
| `manifest_requests` | `object[]` | No | — |
| `manifest_id` | `string` | Yes | — |
| `form_id` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `ship_date` | `string` | Yes | — |
| `shipments` | `number` | Yes | — |
| `warehouse_id` | `string` | Yes | — |
| `submission_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `manifest_download` | `object` | Yes | — |
| `label_ids` | `string[]` | No | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] manifests full type
>
> ```ts theme={null}
> {
>   manifest_id?: string,
>   form_id?: string,
>   created_at?: string,
>   ship_date?: string,
>   shipments?: number,
>   label_ids?: string[],
>   warehouse_id?: string,
>   submission_id?: string,
>   carrier_id?: string,
>   manifest_download?: {
>     href?: string
>   }
> }[]
> ```

> [accordion] manifest\_requests full type
>
> ```ts theme={null}
> {
>   manifest_request_id?: string,
>   status?: in_progress | completed
> }[]
> ```

> [accordion] manifest\_download full type
>
> ```ts theme={null}
> {
>   href?: string
> }
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### listManifests

`manifests.listManifests`

List Manifests

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.manifests.listManifests({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   warehouse_id?: string,
>   ship_date_start?: string,
>   ship_date_end?: string,
>   created_at_start?: string,
>   created_at_end?: string,
>   carrier_id?: string,
>   page?: number,
>   page_size?: number,
>   label_ids?: string[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `manifests` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |

> [accordion] manifests full type
>
> ```ts theme={null}
> {
>   manifest_id?: string,
>   form_id?: string,
>   created_at?: string,
>   ship_date?: string,
>   shipments?: number,
>   label_ids?: string[],
>   warehouse_id?: string,
>   submission_id?: string,
>   carrier_id?: string,
>   manifest_download?: {
>     href?: string
>   }
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

***

## Package Pickups

### deleteScheduledPickup

`packagePickups.deleteScheduledPickup`

Delete a Scheduled Pickup

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.packagePickups.deleteScheduledPickup({
	path: { pickup_id: 'pik_3YcKU5zdtJuCqoeNwyqqbW' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete a Scheduled Pickup deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   pickup_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |
| `pickup_id` | `string` | Yes | — |

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### getPickupById

`packagePickups.getPickupById`

Get Pickup By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.packagePickups.getPickupById({
	path: { pickup_id: 'pik_3YcKU5zdtJuCqoeNwyqqbW' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   pickup_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pickup_id` | `string` | Yes | — |
| `label_ids` | `string[]` | Yes | — |
| `created_at` | `string` | Yes | — |
| `cancelled_at` | `string` | No | — |
| `carrier_id` | `string` | Yes | — |
| `confirmation_number` | `string \| null` | Yes | — |
| `warehouse_id` | `string` | Yes | — |
| `pickup_address` | `object` | Yes | — |
| `contact_details` | `object` | Yes | — |
| `pickup_notes` | `string` | No | — |
| `pickup_windows` | `object[]` | No | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] pickup\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

> [accordion] contact\_details full type
>
> ```ts theme={null}
> {
>   name: string,
>   email: string,
>   phone: string
> }
> ```

> [accordion] pickup\_windows full type
>
> ```ts theme={null}
> {
>   start_at?: string,
>   end_at?: string
> }[]
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### listScheduledPickups

`packagePickups.listScheduledPickups`

List Scheduled Pickups

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.packagePickups.listScheduledPickups({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   carrier_id?: string,
>   warehouse_id?: string,
>   created_at_start?: string,
>   created_at_end?: string,
>   page?: number,
>   page_size?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pickups` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] pickups full type
>
> ```ts theme={null}
> {
>   pickup_id?: string,
>   label_ids?: string[],
>   created_at?: string,
>   cancelled_at?: string,
>   carrier_id?: string,
>   confirmation_number?: string | null,
>   warehouse_id?: string,
>   pickup_address?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   contact_details?: {
>     name: string,
>     email: string,
>     phone: string
>   },
>   pickup_notes?: string,
>   pickup_windows?: {
>     start_at?: string,
>     end_at?: string
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

### schedulePickup

`packagePickups.schedulePickup`

Schedule a Pickup

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.packagePickups.schedulePickup({
	body: {
		contact_details: { name: 'example', email: 'customer@example.com', phone: '+1 555 0100' },
		label_ids: ['se-28529731'],
		pickup_window: { start_at: '2018-09-23T15:00:00.000Z', end_at: '2018-09-23T15:00:00.000Z' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

Scheduling a carrier pickup may incur a carrier fee. Confirm pickup details and carrier charges before using a production key.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   label_ids: string[],
>   contact_details: {
>     name: string,
>     email: string,
>     phone: string
>   },
>   pickup_notes?: string,
>   pickup_window: {
>     start_at: string,
>     end_at: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pickup_id` | `string` | No | — |
| `label_ids` | `string[]` | No | — |
| `created_at` | `string` | No | — |
| `cancelled_at` | `string` | No | — |
| `carrier_id` | `string` | No | — |
| `confirmation_number` | `string \| null` | No | — |
| `warehouse_id` | `string` | No | — |
| `pickup_address` | `object` | No | — |
| `contact_details` | `object` | No | — |
| `pickup_notes` | `string` | No | — |
| `pickup_windows` | `object[]` | No | — |
| `request_id` | `string` | Yes | — |
| `errors` | `object[]` | Yes | — |

> [accordion] pickup\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

> [accordion] contact\_details full type
>
> ```ts theme={null}
> {
>   name: string,
>   email: string,
>   phone: string
> }
> ```

> [accordion] pickup\_windows full type
>
> ```ts theme={null}
> {
>   start_at?: string,
>   end_at?: string
> }[]
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

## Package Types

### createPackageType

`packageTypes.createPackageType`

Create Custom Package Type

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.packageTypes.createPackageType({
	body: { name: 'example', package_code: 'custom_bigbox' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   package_id?: string,
>   package_code: string,
>   name: string,
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | — |
| `package_id` | `string` | No | — |
| `package_code` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `dimensions` | `object` | No | — |

> [accordion] dimensions full type
>
> ```ts theme={null}
> {
>   unit: inch | centimeter,
>   length: number,
>   width: number,
>   height: number
> }
> ```

***

### deletePackageType

`packageTypes.deletePackageType`

Delete A Custom Package By ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.packageTypes.deletePackageType({
	path: { package_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete A Custom Package By ID deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   package_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getPackageTypeById

`packageTypes.getPackageTypeById`

Get Custom Package Type By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.packageTypes.getPackageTypeById({
	path: { package_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   package_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | — |
| `package_id` | `string` | No | — |
| `package_code` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `dimensions` | `object` | No | — |

> [accordion] dimensions full type
>
> ```ts theme={null}
> {
>   unit: inch | centimeter,
>   length: number,
>   width: number,
>   height: number
> }
> ```

***

### listPackageTypes

`packageTypes.listPackageTypes`

List Custom Package Types

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.packageTypes.listPackageTypes({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packages` | `object[]` | No | — |

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   package_id?: string,
>   package_code: string,
>   name: string,
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   }
> }[]
> ```

***

### updatePackageType

`packageTypes.updatePackageType`

Update Custom Package Type By ID

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.packageTypes.updatePackageType({
	path: { package_id: 'se-28529731' },
	body: { name: 'example', package_code: 'custom_bigbox' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   package_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   package_id?: string,
>   package_code: string,
>   name: string,
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   }
> }
> ```

**Output:** `string \| undefined`

***

## Rates

### calculateRates

`rates.calculateRates`

Get Shipping Rates

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.rates.calculateRates({
	body: { shipment_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   rate_options?: {
>     carrier_ids: string[],
>     package_types?: string[],
>     service_codes?: string[],
>     calculate_tax_amount?: boolean,
>     preferred_currency?: string,
>     is_return?: boolean,
>     rate_type?: check | shipment | quick
>   },
>   ship_to_service_point_id?: string | null,
>   ship_from_service_point_id?: string | null,
>   shipment_id: string
> } | {
>   rate_options?: {
>     carrier_ids: string[],
>     package_types?: string[],
>     service_codes?: string[],
>     calculate_tax_amount?: boolean,
>     preferred_currency?: string,
>     is_return?: boolean,
>     rate_type?: check | shipment | quick
>   },
>   ship_to_service_point_id?: string | null,
>   ship_from_service_point_id?: string | null,
>   shipment: {
>     validate_address?: no_validation | validate_only | validate_and_clean,
>     carrier_id?: string,
>     service_code?: string,
>     shipping_rule_id?: string,
>     external_order_id?: string | null,
>     items?: {
>       name?: string,
>       sales_order_id?: string | null,
>       sales_order_item_id?: string | null,
>       quantity?: number,
>       sku?: string | null,
>       external_order_id?: string | null,
>       external_order_item_id?: string | null,
>       asin?: string | null,
>       order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>     }[],
>     tax_identifiers?: {
>       taxable_entity_type: shipper | recipient | ior,
>       identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>       issuing_authority: string,
>       value: string
>     }[] | null,
>     external_shipment_id?: string | null,
>     shipment_number?: string | null,
>     ship_date?: string,
>     ship_to: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null,
>       geolocation?: {
>         type?: what3words,
>         value?: string
>       }[]
>     },
>     ship_from?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     warehouse_id?: string | null,
>     return_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     is_return?: boolean | null,
>     confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>     customs?: {
>       contents: merchandise | documents | gift | returned_goods | sample | other,
>       contents_explanation?: string,
>       non_delivery: return_to_sender | treat_as_abandoned,
>       terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>       declaration?: string,
>       invoice_additional_details?: {
>         freight_charge?: {
>           currency: string,
>           amount: number
>         },
>         insurance_charge?: {
>           currency: string,
>           amount: number
>         },
>         discount?: {
>           currency: string,
>           amount: number
>         },
>         estimated_import_charges?: {
>           taxes?: {
>             currency: string,
>             amount: number
>           },
>           duties?: {
>             currency: string,
>             amount: number
>           }
>         },
>         other_charge?: {
>           currency: string,
>           amount: number
>         },
>         other_charge_description?: string,
>         invoice_number?: string
>       },
>       importer_of_record?: {
>         name: string,
>         phone?: string,
>         email?: string | null,
>         company_name?: string | null,
>         address_line1: string,
>         address_line2?: string | null,
>         address_line3?: string | null,
>         city_locality: string,
>         state_province?: string,
>         postal_code: string,
>         country_code: string
>       },
>       license_number?: string,
>       certificate_number?: string,
>       customs_items?: {
>         description?: string | null,
>         quantity?: number,
>         value?: number,
>         value_currency?: string,
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null
>       }[]
>     } | null,
>     advanced_options?: {
>       bill_to_account?: string | null,
>       bill_to_country_code?: string | null,
>       bill_to_party?: recipient | third_party | null,
>       bill_to_postal_code?: string | null,
>       contains_alcohol?: boolean,
>       delivered_duty_paid?: boolean,
>       dry_ice?: boolean,
>       dry_ice_weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       } | null,
>       non_machinable?: boolean,
>       saturday_delivery?: boolean,
>       fedex_freight?: {
>         shipper_load_and_count?: string,
>         booking_confirmation?: string
>       },
>       use_ups_ground_freight_pricing?: boolean | null,
>       freight_class?: string | null,
>       custom_field1?: string | null,
>       custom_field2?: string | null,
>       custom_field3?: string | null,
>       origin_type?: pickup | drop_off | null,
>       additional_handling?: boolean | null,
>       shipper_release?: boolean | null,
>       collect_on_delivery?: {
>         payment_type?: any | cash | cash_equivalent | none,
>         payment_amount?: {
>           currency?: string,
>           amount?: number
>         }
>       },
>       third_party_consignee?: boolean,
>       dangerous_goods?: boolean,
>       dangerous_goods_contact?: {
>         name?: string,
>         phone?: string
>       },
>       windsor_framework_details?: {
>         movement_indicator?: c2c | b2c | c2b | b2b,
>         not_at_risk?: boolean
>       },
>       license_number?: string | null,
>       invoice_number?: string | null,
>       certificate_number?: string | null,
>       fragile?: boolean,
>       delivery-as-addressed?: boolean,
>       return-after-first-attempt?: boolean,
>       regulated_content_type?: day_old_poultry | other_live_animal | null
>     },
>     insurance_provider?: none | shipsurance | carrier | third_party,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>     packages?: {
>       package_id?: string,
>       package_code?: string,
>       package_name?: string,
>       weight: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       },
>       insured_value?: {
>         currency: string,
>         amount: number
>       },
>       label_messages?: {
>         reference1?: string | null,
>         reference2?: string | null,
>         reference3?: string | null
>       },
>       external_package_id?: string,
>       content_description?: string | null,
>       products?: {
>         description?: string | null,
>         quantity?: number,
>         value?: {
>           currency: string,
>           amount: number
>         },
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null,
>         mid_code?: string | null,
>         product_url?: string | null,
>         vat_rate?: number | null,
>         dangerous_goods?: {
>           id_number?: string | null,
>           shipping_name?: string | null,
>           technical_name?: string | null,
>           product_class?: string | null,
>           product_class_subsidiary?: string | null,
>           packaging_group?: i | ii | iii,
>           dangerous_amount?: {
>             amount?: number,
>             unit?: string | null
>           },
>           quantity?: number,
>           packaging_instruction?: string | null,
>           packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>           packaging_type?: string | null,
>           transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>           transport_category?: string | null,
>           regulation_authority?: string | null,
>           regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>           radioactive?: boolean | null,
>           reportable_quantity?: boolean | null,
>           tunnel_code?: string | null,
>           additional_description?: string | null
>         }[],
>         extended_details?: Record<string, JsonValue>
>       }[]
>     }[],
>     comparison_rate_type?: string | null
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shipment_id` | `string` | Yes | — |
| `carrier_id` | `string` | No | — |
| `service_code` | `string` | No | — |
| `shipping_rule_id` | `string` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `items` | `object[]` | No | — |
| `tax_identifiers` | `object[] \| null` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `shipment_number` | `string \| null` | No | — |
| `ship_date` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `modified_at` | `string` | Yes | — |
| `shipment_status` | `pending \| processing \| label_purchased \| cancelled` | Yes | — |
| `ship_to` | `object` | No | — |
| `ship_from` | `object` | No | — |
| `warehouse_id` | `string \| null` | No | — |
| `return_to` | `object` | Yes | — |
| `is_return` | `boolean \| null` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | Yes | — |
| `customs` | `object \| null` | Yes | — |
| `advanced_options` | `object` | Yes | — |
| `insurance_provider` | `none \| shipsurance \| carrier \| third_party` | Yes | — |
| `tags` | `object[]` | Yes | — |
| `order_source_code` | `amazon_ca \| amazon_us \| brightpearl \| channel_advisor \| cratejoy \| ebay \| etsy \| jane \| groupon_goods \| magento \| paypal \| seller_active \| shopify \| stitch_labs \| squarespace \| three_dcart \| tophatter \| walmart \| woo_commerce \| volusion` | No | — |
| `packages` | `object[]` | Yes | — |
| `total_weight` | `object` | Yes | — |
| `comparison_rate_type` | `string \| null` | No | — |
| `zone` | `number \| null` | No | — |
| `rate_response` | `object` | Yes | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   name?: string,
>   sales_order_id?: string | null,
>   sales_order_item_id?: string | null,
>   quantity?: number,
>   sku?: string | null,
>   bundle_sku?: string | null,
>   external_order_id?: string | null,
>   external_order_item_id?: string | null,
>   asin?: string | null,
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
> }[]
> ```

> [accordion] tax\_identifiers full type
>
> ```ts theme={null}
> {
>   taxable_entity_type: shipper | recipient | ior,
>   identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>   issuing_authority: string,
>   value: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] ship\_from full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] return\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] customs full type
>
> ```ts theme={null}
> {
>   contents: merchandise | documents | gift | returned_goods | sample | other,
>   contents_explanation?: string,
>   non_delivery: return_to_sender | treat_as_abandoned,
>   terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>   declaration?: string,
>   invoice_additional_details?: {
>     freight_charge?: {
>       currency: string,
>       amount: number
>     },
>     insurance_charge?: {
>       currency: string,
>       amount: number
>     },
>     discount?: {
>       currency: string,
>       amount: number
>     },
>     estimated_import_charges?: {
>       taxes?: {
>         currency: string,
>         amount: number
>       },
>       duties?: {
>         currency: string,
>         amount: number
>       }
>     },
>     other_charge?: {
>       currency: string,
>       amount: number
>     },
>     other_charge_description?: string,
>     invoice_number?: string
>   },
>   importer_of_record?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province?: string,
>     postal_code: string,
>     country_code: string
>   },
>   license_number?: string,
>   certificate_number?: string,
>   customs_items?: {
>     description?: string | null,
>     customs_item_id: string,
>     quantity?: number,
>     value?: number,
>     value_currency?: string,
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null
>   }[]
> } | null
> ```

> [accordion] advanced\_options full type
>
> ```ts theme={null}
> {
>   bill_to_account?: string | null,
>   bill_to_country_code?: string | null,
>   bill_to_party?: recipient | third_party | null,
>   bill_to_postal_code?: string | null,
>   contains_alcohol?: boolean,
>   delivered_duty_paid?: boolean,
>   dry_ice?: boolean,
>   dry_ice_weight?: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   } | null,
>   non_machinable?: boolean,
>   saturday_delivery?: boolean,
>   fedex_freight?: {
>     shipper_load_and_count?: string,
>     booking_confirmation?: string
>   },
>   use_ups_ground_freight_pricing?: boolean | null,
>   freight_class?: string | null,
>   custom_field1?: string | null,
>   custom_field2?: string | null,
>   custom_field3?: string | null,
>   origin_type?: pickup | drop_off | null,
>   additional_handling?: boolean | null,
>   shipper_release?: boolean | null,
>   collect_on_delivery?: {
>     payment_type?: any | cash | cash_equivalent | none,
>     payment_amount?: {
>       currency?: string,
>       amount?: number
>     }
>   },
>   third_party_consignee?: boolean,
>   dangerous_goods?: boolean,
>   dangerous_goods_contact?: {
>     name?: string,
>     phone?: string
>   },
>   windsor_framework_details?: {
>     movement_indicator?: c2c | b2c | c2b | b2b,
>     not_at_risk?: boolean
>   },
>   license_number?: string | null,
>   invoice_number?: string | null,
>   certificate_number?: string | null,
>   fragile?: boolean,
>   delivery-as-addressed?: boolean,
>   return-after-first-attempt?: boolean,
>   regulated_content_type?: day_old_poultry | other_live_animal | null
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   tag_id?: number,
>   name: string,
>   color?: string
> }[]
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   shipment_package_id?: string,
>   package_id?: string,
>   package_code?: string,
>   package_name?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   tracking_number?: string,
>   content_description?: string | null,
>   products?: {
>     description?: string | null,
>     quantity?: number,
>     value?: {
>       currency: string,
>       amount: number
>     },
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null,
>     mid_code?: string | null,
>     product_url?: string | null,
>     vat_rate?: number | null,
>     dangerous_goods?: {
>       id_number?: string | null,
>       shipping_name?: string | null,
>       technical_name?: string | null,
>       product_class?: string | null,
>       product_class_subsidiary?: string | null,
>       packaging_group?: i | ii | iii,
>       dangerous_amount?: {
>         amount?: number,
>         unit?: string | null
>       },
>       quantity?: number,
>       packaging_instruction?: string | null,
>       packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>       packaging_type?: string | null,
>       transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>       transport_category?: string | null,
>       regulation_authority?: string | null,
>       regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>       radioactive?: boolean | null,
>       reportable_quantity?: boolean | null,
>       tunnel_code?: string | null,
>       additional_description?: string | null
>     }[],
>     extended_details?: Record<string, JsonValue>
>   }[]
> }[]
> ```

> [accordion] total\_weight full type
>
> ```ts theme={null}
> {
>   value: number,
>   unit: pound | ounce | gram | kilogram
> }
> ```

> [accordion] rate\_response full type
>
> ```ts theme={null}
> {
>   rates?: {
>     rate_id: string,
>     rate_type: check | shipment,
>     carrier_id: string,
>     shipping_amount: {
>       currency: string,
>       amount: number
>     },
>     insurance_amount: {
>       currency: string,
>       amount: number
>     },
>     confirmation_amount: {
>       currency: string,
>       amount: number
>     },
>     other_amount: {
>       currency: string,
>       amount: number
>     },
>     requested_comparison_amount?: {
>       currency: string,
>       amount: number
>     },
>     tax_amount?: {
>       currency: string,
>       amount: number
>     },
>     rate_details?: {
>       rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>       carrier_description?: string,
>       carrier_billing_code?: string,
>       carrier_memo?: string,
>       amount?: {
>         currency: string,
>         amount: number
>       },
>       rate_detail_attributes?: {
>         tax_type?: vat,
>         tax_percentage?: number
>       },
>       billing_source?: string
>     }[],
>     zone: number | null,
>     package_type: string | null,
>     delivery_days?: number | null,
>     guaranteed_service: boolean,
>     estimated_delivery_date?: string | null,
>     carrier_delivery_days?: string,
>     ship_date?: string,
>     negotiated_rate: boolean,
>     service_type: string,
>     service_code: string,
>     trackable: boolean,
>     carrier_code: string,
>     carrier_nickname: string,
>     carrier_friendly_name: string,
>     validation_status: valid | invalid | has_warnings | unknown,
>     warning_messages: string[],
>     error_messages: string[],
>     rate_attributes?: (best_value | cheapest | fastest)[]
>   }[],
>   invalid_rates?: {
>     rate_id: string,
>     rate_type: check | shipment,
>     carrier_id: string,
>     shipping_amount: {
>       currency: string,
>       amount: number
>     },
>     insurance_amount: {
>       currency: string,
>       amount: number
>     },
>     confirmation_amount: {
>       currency: string,
>       amount: number
>     },
>     other_amount: {
>       currency: string,
>       amount: number
>     },
>     requested_comparison_amount?: {
>       currency: string,
>       amount: number
>     },
>     tax_amount?: {
>       currency: string,
>       amount: number
>     },
>     rate_details?: {
>       rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>       carrier_description?: string,
>       carrier_billing_code?: string,
>       carrier_memo?: string,
>       amount?: {
>         currency: string,
>         amount: number
>       },
>       rate_detail_attributes?: {
>         tax_type?: vat,
>         tax_percentage?: number
>       },
>       billing_source?: string
>     }[],
>     zone: number | null,
>     package_type: string | null,
>     delivery_days?: number | null,
>     guaranteed_service: boolean,
>     estimated_delivery_date?: string | null,
>     carrier_delivery_days?: string,
>     ship_date?: string,
>     negotiated_rate: boolean,
>     service_type: string,
>     service_code: string,
>     trackable: boolean,
>     carrier_code: string,
>     carrier_nickname: string,
>     carrier_friendly_name: string,
>     validation_status: valid | invalid | has_warnings | unknown,
>     warning_messages: string[],
>     error_messages: string[]
>   }[],
>   rate_request_id?: string,
>   shipment_id?: string,
>   created_at?: string,
>   status?: working | completed | partial | error,
>   errors?: {
>     error_source: carrier | order_source | shipengine,
>     error_type: account_status | business_rules | validation | security | system | integrations,
>     error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>     message: string,
>     carrier_id?: string,
>     carrier_code?: string,
>     field_name?: string
>   }[]
> }
> ```

***

### compareBulkRates

`rates.compareBulkRates`

Get Bulk Rates

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.rates.compareBulkRates({
	body: {
		rate_options: {
			carrier_ids: ['se-28529731'],
		},
		shipment_ids: ['se-28529731'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   rate_options: {
>     carrier_ids: string[],
>     package_types?: string[],
>     service_codes?: string[],
>     calculate_tax_amount?: boolean,
>     preferred_currency?: string,
>     is_return?: boolean,
>     rate_type?: check | shipment | quick
>   },
>   ship_to_service_point_id?: string | null,
>   ship_from_service_point_id?: string | null,
>   shipment_ids: string[]
> } | {
>   rate_options: {
>     carrier_ids: string[],
>     package_types?: string[],
>     service_codes?: string[],
>     calculate_tax_amount?: boolean,
>     preferred_currency?: string,
>     is_return?: boolean,
>     rate_type?: check | shipment | quick
>   },
>   ship_to_service_point_id?: string | null,
>   ship_from_service_point_id?: string | null,
>   shipments: {
>     validate_address?: no_validation | validate_only | validate_and_clean,
>     carrier_id?: string,
>     service_code?: string,
>     shipping_rule_id?: string,
>     external_order_id?: string | null,
>     items?: {
>       name?: string,
>       sales_order_id?: string | null,
>       sales_order_item_id?: string | null,
>       quantity?: number,
>       sku?: string | null,
>       external_order_id?: string | null,
>       external_order_item_id?: string | null,
>       asin?: string | null,
>       order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>     }[],
>     tax_identifiers?: {
>       taxable_entity_type: shipper | recipient | ior,
>       identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>       issuing_authority: string,
>       value: string
>     }[] | null,
>     external_shipment_id?: string | null,
>     shipment_number?: string | null,
>     ship_date?: string,
>     ship_to: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null,
>       geolocation?: {
>         type?: what3words,
>         value?: string
>       }[]
>     },
>     ship_from?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     warehouse_id?: string | null,
>     return_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     is_return?: boolean | null,
>     confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>     customs?: {
>       contents: merchandise | documents | gift | returned_goods | sample | other,
>       contents_explanation?: string,
>       non_delivery: return_to_sender | treat_as_abandoned,
>       terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>       declaration?: string,
>       invoice_additional_details?: {
>         freight_charge?: {
>           currency: string,
>           amount: number
>         },
>         insurance_charge?: {
>           currency: string,
>           amount: number
>         },
>         discount?: {
>           currency: string,
>           amount: number
>         },
>         estimated_import_charges?: {
>           taxes?: {
>             currency: string,
>             amount: number
>           },
>           duties?: {
>             currency: string,
>             amount: number
>           }
>         },
>         other_charge?: {
>           currency: string,
>           amount: number
>         },
>         other_charge_description?: string,
>         invoice_number?: string
>       },
>       importer_of_record?: {
>         name: string,
>         phone?: string,
>         email?: string | null,
>         company_name?: string | null,
>         address_line1: string,
>         address_line2?: string | null,
>         address_line3?: string | null,
>         city_locality: string,
>         state_province?: string,
>         postal_code: string,
>         country_code: string
>       },
>       license_number?: string,
>       certificate_number?: string,
>       customs_items?: {
>         description?: string | null,
>         quantity?: number,
>         value?: number,
>         value_currency?: string,
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null
>       }[]
>     } | null,
>     advanced_options?: {
>       bill_to_account?: string | null,
>       bill_to_country_code?: string | null,
>       bill_to_party?: recipient | third_party | null,
>       bill_to_postal_code?: string | null,
>       contains_alcohol?: boolean,
>       delivered_duty_paid?: boolean,
>       dry_ice?: boolean,
>       dry_ice_weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       } | null,
>       non_machinable?: boolean,
>       saturday_delivery?: boolean,
>       fedex_freight?: {
>         shipper_load_and_count?: string,
>         booking_confirmation?: string
>       },
>       use_ups_ground_freight_pricing?: boolean | null,
>       freight_class?: string | null,
>       custom_field1?: string | null,
>       custom_field2?: string | null,
>       custom_field3?: string | null,
>       origin_type?: pickup | drop_off | null,
>       additional_handling?: boolean | null,
>       shipper_release?: boolean | null,
>       collect_on_delivery?: {
>         payment_type?: any | cash | cash_equivalent | none,
>         payment_amount?: {
>           currency?: string,
>           amount?: number
>         }
>       },
>       third_party_consignee?: boolean,
>       dangerous_goods?: boolean,
>       dangerous_goods_contact?: {
>         name?: string,
>         phone?: string
>       },
>       windsor_framework_details?: {
>         movement_indicator?: c2c | b2c | c2b | b2b,
>         not_at_risk?: boolean
>       },
>       license_number?: string | null,
>       invoice_number?: string | null,
>       certificate_number?: string | null,
>       fragile?: boolean,
>       delivery-as-addressed?: boolean,
>       return-after-first-attempt?: boolean,
>       regulated_content_type?: day_old_poultry | other_live_animal | null
>     },
>     insurance_provider?: none | shipsurance | carrier | third_party,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>     packages?: {
>       package_id?: string,
>       package_code?: string,
>       package_name?: string,
>       weight: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       },
>       insured_value?: {
>         currency: string,
>         amount: number
>       },
>       label_messages?: {
>         reference1?: string | null,
>         reference2?: string | null,
>         reference3?: string | null
>       },
>       external_package_id?: string,
>       content_description?: string | null,
>       products?: {
>         description?: string | null,
>         quantity?: number,
>         value?: {
>           currency: string,
>           amount: number
>         },
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null,
>         mid_code?: string | null,
>         product_url?: string | null,
>         vat_rate?: number | null,
>         dangerous_goods?: {
>           id_number?: string | null,
>           shipping_name?: string | null,
>           technical_name?: string | null,
>           product_class?: string | null,
>           product_class_subsidiary?: string | null,
>           packaging_group?: i | ii | iii,
>           dangerous_amount?: {
>             amount?: number,
>             unit?: string | null
>           },
>           quantity?: number,
>           packaging_instruction?: string | null,
>           packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>           packaging_type?: string | null,
>           transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>           transport_category?: string | null,
>           regulation_authority?: string | null,
>           regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>           radioactive?: boolean | null,
>           reportable_quantity?: boolean | null,
>           tunnel_code?: string | null,
>           additional_description?: string | null
>         }[],
>         extended_details?: Record<string, JsonValue>
>       }[]
>     }[],
>     comparison_rate_type?: string | null
>   }[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rate_request_id: string,
>   shipment_id: string,
>   created_at: string,
>   status: working | completed | partial | error,
>   errors: {
>     error_source: carrier | order_source | shipengine,
>     error_type: account_status | business_rules | validation | security | system | integrations,
>     error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>     message: string,
>     carrier_id?: string,
>     carrier_code?: string,
>     field_name?: string
>   }[]
> }[]
> ```

***

### estimateRates

`rates.estimateRates`

Estimate Rates

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.rates.estimateRates({
	body: {
		from_country_code: 'CA',
		from_postal_code: '78756-3717',
		from_city_locality: 'Austin',
		from_state_province: 'Austin',
		to_country_code: 'CA',
		to_postal_code: '78756-3717',
		to_city_locality: 'Austin',
		to_state_province: 'Houston',
		weight: { value: 0, unit: 'pound' },
		ship_date: '2018-09-23T15:00:00.000Z',
		carrier_id: 'se-28529731',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   from_country_code: string,
>   from_postal_code: string,
>   from_city_locality: string,
>   from_state_province: string,
>   to_country_code: string,
>   to_postal_code: string,
>   to_city_locality: string,
>   to_state_province: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   address_residential_indicator?: unknown | yes | no,
>   ship_date: string,
>   carrier_id?: string
> } | {
>   from_country_code: string,
>   from_postal_code: string,
>   from_city_locality: string,
>   from_state_province: string,
>   to_country_code: string,
>   to_postal_code: string,
>   to_city_locality: string,
>   to_state_province: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   address_residential_indicator?: unknown | yes | no,
>   ship_date: string,
>   carrier_ids?: string[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rate_type: check | shipment,
>   carrier_id: string,
>   shipping_amount: {
>     currency: string,
>     amount: number
>   },
>   insurance_amount: {
>     currency: string,
>     amount: number
>   },
>   confirmation_amount: {
>     currency: string,
>     amount: number
>   },
>   other_amount: {
>     currency: string,
>     amount: number
>   },
>   tax_amount?: {
>     currency: string,
>     amount: number
>   },
>   zone: number | null,
>   package_type: string | null,
>   delivery_days?: number,
>   guaranteed_service: boolean,
>   estimated_delivery_date?: string | null,
>   carrier_delivery_days?: string,
>   ship_date?: string,
>   negotiated_rate: boolean,
>   service_type: string,
>   service_code: string,
>   trackable: boolean,
>   carrier_code: string,
>   carrier_nickname: string,
>   carrier_friendly_name: string,
>   validation_status: valid | invalid | has_warnings | unknown,
>   warning_messages: string[],
>   error_messages: string[],
>   rate_attributes?: (best_value | cheapest | fastest)[]
> }[]
> ```

***

### getRateById

`rates.getRateById`

Get Rate By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.rates.getRateById({
	path: { rate_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   rate_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rate_id` | `string` | Yes | — |
| `rate_type` | `check \| shipment` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `shipping_amount` | `object` | Yes | — |
| `insurance_amount` | `object` | Yes | — |
| `confirmation_amount` | `object` | Yes | — |
| `other_amount` | `object` | Yes | — |
| `requested_comparison_amount` | `object` | No | — |
| `tax_amount` | `object` | No | — |
| `rate_details` | `object[]` | No | — |
| `zone` | `number \| null` | Yes | — |
| `package_type` | `string \| null` | Yes | — |
| `delivery_days` | `number` | No | — |
| `guaranteed_service` | `boolean` | Yes | — |
| `estimated_delivery_date` | `string \| null` | No | — |
| `carrier_delivery_days` | `string` | No | — |
| `ship_date` | `string` | No | — |
| `negotiated_rate` | `boolean` | Yes | — |
| `service_type` | `string` | Yes | — |
| `service_code` | `string` | Yes | — |
| `trackable` | `boolean` | Yes | — |
| `carrier_code` | `string` | Yes | — |
| `carrier_nickname` | `string` | Yes | — |
| `carrier_friendly_name` | `string` | Yes | — |
| `validation_status` | `valid \| invalid \| has_warnings \| unknown` | Yes | — |
| `warning_messages` | `string[]` | Yes | — |
| `error_messages` | `string[]` | Yes | — |

> [accordion] shipping\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] insurance\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] confirmation\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] other\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] requested\_comparison\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] tax\_amount full type
>
> ```ts theme={null}
> {
>   currency: string,
>   amount: number
> }
> ```

> [accordion] rate\_details full type
>
> ```ts theme={null}
> {
>   rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>   carrier_description?: string,
>   carrier_billing_code?: string,
>   carrier_memo?: string,
>   amount?: {
>     currency: string,
>     amount: number
>   },
>   rate_detail_attributes?: {
>     tax_type?: vat,
>     tax_percentage?: number
>   },
>   billing_source?: string
> }[]
> ```

***

## Service Points

### servicePointsGetById

`servicePoints.servicePointsGetById`

Get Service Point By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.servicePoints.servicePointsGetById({
	path: { carrier_code: 'x', country_code: 'US', service_point_id: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   carrier_code: string,
>   country_code: string,
>   service_point_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `service_point` | `object` | No | — |

> [accordion] service\_point full type
>
> ```ts theme={null}
> {
>   carrier_code?: string,
>   service_codes?: string[],
>   service_point_id?: string,
>   company_name?: string,
>   address_line1?: string,
>   city_locality?: string,
>   state_province?: string,
>   postal_code?: string,
>   country_code?: string,
>   phone_number?: string,
>   lat?: number,
>   long?: number,
>   hours_of_operation?: {
>     monday?: {
>       open?: string,
>       close?: string
>     }[],
>     tuesday?: {
>       open?: string,
>       close?: string
>     }[],
>     wednesday?: {
>       open?: string,
>       close?: string
>     }[],
>     thursday?: {
>       open?: string,
>       close?: string
>     }[],
>     friday?: {
>       open?: string,
>       close?: string
>     }[],
>     saturday?: {
>       open?: string,
>       close?: string
>     }[],
>     sunday?: {
>       open?: string,
>       close?: string
>     }[]
>   },
>   features?: (drop_off_point | pickup_point | print_services | after_hours_locker | after_hours_dropbox)[],
>   type?: pudo | locker
> }
> ```

***

### servicePointsList

`servicePoints.servicePointsList`

List Service Points

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.servicePoints.servicePointsList({
	body: {
		providers: [{}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   address_query?: string,
>   address?: {
>     address_line1?: string,
>     address_line2?: string,
>     address_line3?: string,
>     city_locality?: string,
>     state_province?: string,
>     postal_code?: string,
>     country_code: string
>   },
>   providers: {
>     carrier_id?: string,
>     service_code?: string[]
>   }[],
>   lat?: number,
>   long?: number,
>   radius?: number,
>   max_results?: number,
>   shipment?: {
>     total_weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     packages?: {
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       }
>     }[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `lat` | `number` | No | — |
| `long` | `number` | No | — |
| `service_points` | `object[]` | No | — |
| `errors` | `object[]` | No | — |

> [accordion] service\_points full type
>
> ```ts theme={null}
> {
>   carrier_code?: string,
>   service_codes?: string[],
>   service_point_id?: string,
>   company_name?: string,
>   address_line1?: string,
>   city_locality?: string,
>   state_province?: string,
>   postal_code?: string,
>   country_code?: string,
>   phone_number?: string,
>   lat?: number,
>   long?: number,
>   distance_in_meters?: number,
>   hours_of_operation?: {
>     monday?: {
>       open?: string,
>       close?: string
>     }[],
>     tuesday?: {
>       open?: string,
>       close?: string
>     }[],
>     wednesday?: {
>       open?: string,
>       close?: string
>     }[],
>     thursday?: {
>       open?: string,
>       close?: string
>     }[],
>     friday?: {
>       open?: string,
>       close?: string
>     }[],
>     saturday?: {
>       open?: string,
>       close?: string
>     }[],
>     sunday?: {
>       open?: string,
>       close?: string
>     }[]
>   },
>   features?: (drop_off_point | pickup_point | print_services | after_hours_locker | after_hours_dropbox)[],
>   type?: pudo | locker
> }[]
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   error_source: carrier | order_source | shipengine,
>   error_type: account_status | business_rules | validation | security | system | integrations,
>   error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>   message: string,
>   carrier_id?: string,
>   carrier_code?: string,
>   field_name?: string
> }[]
> ```

***

## Shipments

### cancelShipments

`shipments.cancelShipments`

Cancel a Shipment

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.shipments.cancelShipments({
	path: { shipment_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Cancel a Shipment deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string
> }
> ```

**Output:** `string \| undefined`

***

### createShipments

`shipments.createShipments`

Create Shipments

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.shipments.createShipments({
	body: {
		shipments: [{
			carrier_id: 'se-28529731',
			service_code: 'usps_first_class_mail',
			ship_to: {
				name: 'example',
				address_line1: '123 Example St',
				city_locality: 'Example City',
				state_province: 'CA',
				postal_code: '94000',
			},
			ship_from: {
				name: 'example',
				address_line1: '123 Example St',
				city_locality: 'Example City',
				state_province: 'CA',
				postal_code: '94000',
			},
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipments: {
>     validate_address?: no_validation | validate_only | validate_and_clean,
>     carrier_id?: string,
>     service_code?: string,
>     shipping_rule_id?: string,
>     external_order_id?: string | null,
>     items?: {
>       name?: string,
>       sales_order_id?: string | null,
>       sales_order_item_id?: string | null,
>       quantity?: number,
>       sku?: string | null,
>       external_order_id?: string | null,
>       external_order_item_id?: string | null,
>       asin?: string | null,
>       order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>     }[],
>     tax_identifiers?: {
>       taxable_entity_type: shipper | recipient | ior,
>       identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>       issuing_authority: string,
>       value: string
>     }[] | null,
>     external_shipment_id?: string | null,
>     shipment_number?: string | null,
>     ship_date?: string,
>     ship_to: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null,
>       geolocation?: {
>         type?: what3words,
>         value?: string
>       }[]
>     },
>     ship_from?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     warehouse_id?: string | null,
>     return_to?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no,
>       instructions?: string | null
>     },
>     is_return?: boolean | null,
>     confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>     customs?: {
>       contents: merchandise | documents | gift | returned_goods | sample | other,
>       contents_explanation?: string,
>       non_delivery: return_to_sender | treat_as_abandoned,
>       terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>       declaration?: string,
>       invoice_additional_details?: {
>         freight_charge?: {
>           currency: string,
>           amount: number
>         },
>         insurance_charge?: {
>           currency: string,
>           amount: number
>         },
>         discount?: {
>           currency: string,
>           amount: number
>         },
>         estimated_import_charges?: {
>           taxes?: {
>             currency: string,
>             amount: number
>           },
>           duties?: {
>             currency: string,
>             amount: number
>           }
>         },
>         other_charge?: {
>           currency: string,
>           amount: number
>         },
>         other_charge_description?: string,
>         invoice_number?: string
>       },
>       importer_of_record?: {
>         name: string,
>         phone?: string,
>         email?: string | null,
>         company_name?: string | null,
>         address_line1: string,
>         address_line2?: string | null,
>         address_line3?: string | null,
>         city_locality: string,
>         state_province?: string,
>         postal_code: string,
>         country_code: string
>       },
>       license_number?: string,
>       certificate_number?: string,
>       customs_items?: {
>         description?: string | null,
>         quantity?: number,
>         value?: number,
>         value_currency?: string,
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null
>       }[]
>     } | null,
>     advanced_options?: {
>       bill_to_account?: string | null,
>       bill_to_country_code?: string | null,
>       bill_to_party?: recipient | third_party | null,
>       bill_to_postal_code?: string | null,
>       contains_alcohol?: boolean,
>       delivered_duty_paid?: boolean,
>       dry_ice?: boolean,
>       dry_ice_weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       } | null,
>       non_machinable?: boolean,
>       saturday_delivery?: boolean,
>       fedex_freight?: {
>         shipper_load_and_count?: string,
>         booking_confirmation?: string
>       },
>       use_ups_ground_freight_pricing?: boolean | null,
>       freight_class?: string | null,
>       custom_field1?: string | null,
>       custom_field2?: string | null,
>       custom_field3?: string | null,
>       origin_type?: pickup | drop_off | null,
>       additional_handling?: boolean | null,
>       shipper_release?: boolean | null,
>       collect_on_delivery?: {
>         payment_type?: any | cash | cash_equivalent | none,
>         payment_amount?: {
>           currency?: string,
>           amount?: number
>         }
>       },
>       third_party_consignee?: boolean,
>       dangerous_goods?: boolean,
>       dangerous_goods_contact?: {
>         name?: string,
>         phone?: string
>       },
>       windsor_framework_details?: {
>         movement_indicator?: c2c | b2c | c2b | b2b,
>         not_at_risk?: boolean
>       },
>       license_number?: string | null,
>       invoice_number?: string | null,
>       certificate_number?: string | null,
>       fragile?: boolean,
>       delivery-as-addressed?: boolean,
>       return-after-first-attempt?: boolean,
>       regulated_content_type?: day_old_poultry | other_live_animal | null
>     },
>     insurance_provider?: none | shipsurance | carrier | third_party,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>     packages?: {
>       package_id?: string,
>       package_code?: string,
>       package_name?: string,
>       weight: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       dimensions?: {
>         unit: inch | centimeter,
>         length: number,
>         width: number,
>         height: number
>       },
>       insured_value?: {
>         currency: string,
>         amount: number
>       },
>       label_messages?: {
>         reference1?: string | null,
>         reference2?: string | null,
>         reference3?: string | null
>       },
>       external_package_id?: string,
>       content_description?: string | null,
>       products?: {
>         description?: string | null,
>         quantity?: number,
>         value?: {
>           currency: string,
>           amount: number
>         },
>         weight?: {
>           value: number,
>           unit: pound | ounce | gram | kilogram
>         },
>         harmonized_tariff_code?: string | null,
>         country_of_origin?: string | null,
>         unit_of_measure?: string | null,
>         sku?: string | null,
>         sku_description?: string | null,
>         mid_code?: string | null,
>         product_url?: string | null,
>         vat_rate?: number | null,
>         dangerous_goods?: {
>           id_number?: string | null,
>           shipping_name?: string | null,
>           technical_name?: string | null,
>           product_class?: string | null,
>           product_class_subsidiary?: string | null,
>           packaging_group?: i | ii | iii,
>           dangerous_amount?: {
>             amount?: number,
>             unit?: string | null
>           },
>           quantity?: number,
>           packaging_instruction?: string | null,
>           packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>           packaging_type?: string | null,
>           transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>           transport_category?: string | null,
>           regulation_authority?: string | null,
>           regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>           radioactive?: boolean | null,
>           reportable_quantity?: boolean | null,
>           tunnel_code?: string | null,
>           additional_description?: string | null
>         }[],
>         extended_details?: Record<string, JsonValue>
>       }[]
>     }[],
>     comparison_rate_type?: string | null
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `has_errors` | `boolean` | Yes | — |
| `shipments` | `object[]` | Yes | — |

> [accordion] shipments full type
>
> ```ts theme={null}
> {
>   shipment_id?: string,
>   carrier_id?: string,
>   service_code?: string,
>   shipping_rule_id?: string,
>   external_order_id?: string | null,
>   items?: {
>     name?: string,
>     sales_order_id?: string | null,
>     sales_order_item_id?: string | null,
>     quantity?: number,
>     sku?: string | null,
>     bundle_sku?: string | null,
>     external_order_id?: string | null,
>     external_order_item_id?: string | null,
>     asin?: string | null,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>   }[],
>   tax_identifiers?: {
>     taxable_entity_type: shipper | recipient | ior,
>     identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>     issuing_authority: string,
>     value: string
>   }[] | null,
>   external_shipment_id?: string | null,
>   shipment_number?: string | null,
>   ship_date?: string,
>   created_at?: string,
>   modified_at?: string,
>   shipment_status?: pending | processing | label_purchased | cancelled,
>   ship_to?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null,
>     geolocation?: {
>       type?: what3words,
>       value?: string
>     }[]
>   },
>   ship_from?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   warehouse_id?: string | null,
>   return_to?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   is_return?: boolean | null,
>   confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   customs?: {
>     contents: merchandise | documents | gift | returned_goods | sample | other,
>     contents_explanation?: string,
>     non_delivery: return_to_sender | treat_as_abandoned,
>     terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>     declaration?: string,
>     invoice_additional_details?: {
>       freight_charge?: {
>         currency: string,
>         amount: number
>       },
>       insurance_charge?: {
>         currency: string,
>         amount: number
>       },
>       discount?: {
>         currency: string,
>         amount: number
>       },
>       estimated_import_charges?: {
>         taxes?: {
>           currency: string,
>           amount: number
>         },
>         duties?: {
>           currency: string,
>           amount: number
>         }
>       },
>       other_charge?: {
>         currency: string,
>         amount: number
>       },
>       other_charge_description?: string,
>       invoice_number?: string
>     },
>     importer_of_record?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province?: string,
>       postal_code: string,
>       country_code: string
>     },
>     license_number?: string,
>     certificate_number?: string,
>     customs_items?: {
>       description?: string | null,
>       customs_item_id: string,
>       quantity?: number,
>       value?: number,
>       value_currency?: string,
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null
>     }[]
>   } | null,
>   advanced_options?: {
>     bill_to_account?: string | null,
>     bill_to_country_code?: string | null,
>     bill_to_party?: recipient | third_party | null,
>     bill_to_postal_code?: string | null,
>     contains_alcohol?: boolean,
>     delivered_duty_paid?: boolean,
>     dry_ice?: boolean,
>     dry_ice_weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     } | null,
>     non_machinable?: boolean,
>     saturday_delivery?: boolean,
>     fedex_freight?: {
>       shipper_load_and_count?: string,
>       booking_confirmation?: string
>     },
>     use_ups_ground_freight_pricing?: boolean | null,
>     freight_class?: string | null,
>     custom_field1?: string | null,
>     custom_field2?: string | null,
>     custom_field3?: string | null,
>     origin_type?: pickup | drop_off | null,
>     additional_handling?: boolean | null,
>     shipper_release?: boolean | null,
>     collect_on_delivery?: {
>       payment_type?: any | cash | cash_equivalent | none,
>       payment_amount?: {
>         currency?: string,
>         amount?: number
>       }
>     },
>     third_party_consignee?: boolean,
>     dangerous_goods?: boolean,
>     dangerous_goods_contact?: {
>       name?: string,
>       phone?: string
>     },
>     windsor_framework_details?: {
>       movement_indicator?: c2c | b2c | c2b | b2b,
>       not_at_risk?: boolean
>     },
>     license_number?: string | null,
>     invoice_number?: string | null,
>     certificate_number?: string | null,
>     fragile?: boolean,
>     delivery-as-addressed?: boolean,
>     return-after-first-attempt?: boolean,
>     regulated_content_type?: day_old_poultry | other_live_animal | null
>   },
>   insurance_provider?: none | shipsurance | carrier | third_party,
>   tags?: {
>     tag_id?: number,
>     name: string,
>     color?: string
>   }[],
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>   packages?: {
>     shipment_package_id?: string,
>     package_id?: string,
>     package_code?: string,
>     package_name?: string,
>     weight: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     dimensions?: {
>       unit: inch | centimeter,
>       length: number,
>       width: number,
>       height: number
>     },
>     insured_value?: {
>       currency: string,
>       amount: number
>     },
>     label_messages?: {
>       reference1: string | null,
>       reference2: string | null,
>       reference3: string | null
>     },
>     external_package_id?: string,
>     tracking_number?: string,
>     content_description?: string | null,
>     products?: {
>       description?: string | null,
>       quantity?: number,
>       value?: {
>         currency: string,
>         amount: number
>       },
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null,
>       mid_code?: string | null,
>       product_url?: string | null,
>       vat_rate?: number | null,
>       dangerous_goods?: {
>         id_number?: string | null,
>         shipping_name?: string | null,
>         technical_name?: string | null,
>         product_class?: string | null,
>         product_class_subsidiary?: string | null,
>         packaging_group?: i | ii | iii,
>         dangerous_amount?: {
>           amount?: number,
>           unit?: string | null
>         },
>         quantity?: number,
>         packaging_instruction?: string | null,
>         packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>         packaging_type?: string | null,
>         transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>         transport_category?: string | null,
>         regulation_authority?: string | null,
>         regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>         radioactive?: boolean | null,
>         reportable_quantity?: boolean | null,
>         tunnel_code?: string | null,
>         additional_description?: string | null
>       }[],
>       extended_details?: Record<string, JsonValue>
>     }[]
>   }[],
>   total_weight?: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   comparison_rate_type?: string | null,
>   zone?: number | null,
>   errors?: string[],
>   address_validation?: {
>     status: unverified | verified | warning | error,
>     original_address: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no
>     },
>     matched_address: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province: string,
>       postal_code: string,
>       country_code?: string,
>       address_residential_indicator?: unknown | yes | no
>     } | null,
>     messages: {
>       code: a1000 | a1001 | a1002 | a1003 | a1004 | a1005 | a1006 | a1007 | a1008 | r1000 | r1001 | r1002 | r1003,
>       message: string,
>       type: error | warning | info,
>       detail_code: unsupported_country | non_supported_country | minimum_postal_code_verification_failed | street_does_not_match_unique_street_name | multiple_directionals | multiple_matches | suite_not_valid | suite_missing | incompatible_paired_labels | invalid_house_number | missing_house_number | invalid_box_number | invalid_charge_event | missing_box_number | missing_cmra_or_private_mail_box_number | suite_has_no_secondaries | postal_code_changed_or_added | state_province_changed_or_added | city_locality_changed_or_added | urbanization_changed | street_name_spelling_changed_or_added | street_name_type_changed_or_added | street_direction_changed_or_added | suite_type_changed_or_added | suite_unit_number_changed_or_added | double_dependent_locality_changed_or_added | subadministrative_area_changed_or_added | subnational_area_changed_or_added | po_box_changed_or_added | premise_type_changed_or_added | house_number_changed | organization_changed_or_added | partially_verified_to_state_level | partially_verified_to_city_level | partially_verified_to_street_level | partially_verified_to_premise_level | verified_to_state_level | verified_to_city_level | verified_to_street_level | verified_to_premise_level | verified_to_suite_level | coded_to_street_lavel | coded_to_neighborhood_level | coded_to_community_level | coded_to_state_level | coded_to_rooftop_level | coded_to_rooftop_interpolation_level | name_max_length_exceeded | phone_max_length_exceeded | company_name_max_length_exceeded | line1_min_max_length | line2_max_length_exceeded | line3_max_length_exceeded | city_locality_max_length_exceeded | state_province_max_length_exceeded | invalid_postal_code | country_invalid_length | address_not_found | null
>     }[]
>   }
> }[]
> ```

***

### getShipmentByExternalId

`shipments.getShipmentByExternalId`

Get Shipment By External ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.shipments.getShipmentByExternalId({
	path: { external_shipment_id: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   external_shipment_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shipment_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `service_code` | `string` | Yes | — |
| `shipping_rule_id` | `string` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `items` | `object[]` | No | — |
| `tax_identifiers` | `object[] \| null` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `shipment_number` | `string \| null` | No | — |
| `ship_date` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `modified_at` | `string` | Yes | — |
| `shipment_status` | `pending \| processing \| label_purchased \| cancelled` | Yes | — |
| `ship_to` | `object` | Yes | — |
| `ship_from` | `object` | Yes | — |
| `warehouse_id` | `string \| null` | Yes | — |
| `return_to` | `object` | Yes | — |
| `is_return` | `boolean \| null` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | Yes | — |
| `customs` | `object \| null` | Yes | — |
| `advanced_options` | `object` | Yes | — |
| `insurance_provider` | `none \| shipsurance \| carrier \| third_party` | Yes | — |
| `tags` | `object[]` | Yes | — |
| `order_source_code` | `amazon_ca \| amazon_us \| brightpearl \| channel_advisor \| cratejoy \| ebay \| etsy \| jane \| groupon_goods \| magento \| paypal \| seller_active \| shopify \| stitch_labs \| squarespace \| three_dcart \| tophatter \| walmart \| woo_commerce \| volusion` | No | — |
| `packages` | `object[]` | Yes | — |
| `total_weight` | `object` | Yes | — |
| `comparison_rate_type` | `string \| null` | No | — |
| `zone` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   name?: string,
>   sales_order_id?: string | null,
>   sales_order_item_id?: string | null,
>   quantity?: number,
>   sku?: string | null,
>   bundle_sku?: string | null,
>   external_order_id?: string | null,
>   external_order_item_id?: string | null,
>   asin?: string | null,
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
> }[]
> ```

> [accordion] tax\_identifiers full type
>
> ```ts theme={null}
> {
>   taxable_entity_type: shipper | recipient | ior,
>   identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>   issuing_authority: string,
>   value: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] ship\_from full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] return\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] customs full type
>
> ```ts theme={null}
> {
>   contents: merchandise | documents | gift | returned_goods | sample | other,
>   contents_explanation?: string,
>   non_delivery: return_to_sender | treat_as_abandoned,
>   terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>   declaration?: string,
>   invoice_additional_details?: {
>     freight_charge?: {
>       currency: string,
>       amount: number
>     },
>     insurance_charge?: {
>       currency: string,
>       amount: number
>     },
>     discount?: {
>       currency: string,
>       amount: number
>     },
>     estimated_import_charges?: {
>       taxes?: {
>         currency: string,
>         amount: number
>       },
>       duties?: {
>         currency: string,
>         amount: number
>       }
>     },
>     other_charge?: {
>       currency: string,
>       amount: number
>     },
>     other_charge_description?: string,
>     invoice_number?: string
>   },
>   importer_of_record?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province?: string,
>     postal_code: string,
>     country_code: string
>   },
>   license_number?: string,
>   certificate_number?: string,
>   customs_items?: {
>     description?: string | null,
>     customs_item_id: string,
>     quantity?: number,
>     value?: number,
>     value_currency?: string,
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null
>   }[]
> } | null
> ```

> [accordion] advanced\_options full type
>
> ```ts theme={null}
> {
>   bill_to_account?: string | null,
>   bill_to_country_code?: string | null,
>   bill_to_party?: recipient | third_party | null,
>   bill_to_postal_code?: string | null,
>   contains_alcohol?: boolean,
>   delivered_duty_paid?: boolean,
>   dry_ice?: boolean,
>   dry_ice_weight?: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   } | null,
>   non_machinable?: boolean,
>   saturday_delivery?: boolean,
>   fedex_freight?: {
>     shipper_load_and_count?: string,
>     booking_confirmation?: string
>   },
>   use_ups_ground_freight_pricing?: boolean | null,
>   freight_class?: string | null,
>   custom_field1?: string | null,
>   custom_field2?: string | null,
>   custom_field3?: string | null,
>   origin_type?: pickup | drop_off | null,
>   additional_handling?: boolean | null,
>   shipper_release?: boolean | null,
>   collect_on_delivery?: {
>     payment_type?: any | cash | cash_equivalent | none,
>     payment_amount?: {
>       currency?: string,
>       amount?: number
>     }
>   },
>   third_party_consignee?: boolean,
>   dangerous_goods?: boolean,
>   dangerous_goods_contact?: {
>     name?: string,
>     phone?: string
>   },
>   windsor_framework_details?: {
>     movement_indicator?: c2c | b2c | c2b | b2b,
>     not_at_risk?: boolean
>   },
>   license_number?: string | null,
>   invoice_number?: string | null,
>   certificate_number?: string | null,
>   fragile?: boolean,
>   delivery-as-addressed?: boolean,
>   return-after-first-attempt?: boolean,
>   regulated_content_type?: day_old_poultry | other_live_animal | null
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   tag_id?: number,
>   name: string,
>   color?: string
> }[]
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   shipment_package_id?: string,
>   package_id?: string,
>   package_code?: string,
>   package_name?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   tracking_number?: string,
>   content_description?: string | null,
>   products?: {
>     description?: string | null,
>     quantity?: number,
>     value?: {
>       currency: string,
>       amount: number
>     },
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null,
>     mid_code?: string | null,
>     product_url?: string | null,
>     vat_rate?: number | null,
>     dangerous_goods?: {
>       id_number?: string | null,
>       shipping_name?: string | null,
>       technical_name?: string | null,
>       product_class?: string | null,
>       product_class_subsidiary?: string | null,
>       packaging_group?: i | ii | iii,
>       dangerous_amount?: {
>         amount?: number,
>         unit?: string | null
>       },
>       quantity?: number,
>       packaging_instruction?: string | null,
>       packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>       packaging_type?: string | null,
>       transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>       transport_category?: string | null,
>       regulation_authority?: string | null,
>       regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>       radioactive?: boolean | null,
>       reportable_quantity?: boolean | null,
>       tunnel_code?: string | null,
>       additional_description?: string | null
>     }[],
>     extended_details?: Record<string, JsonValue>
>   }[]
> }[]
> ```

> [accordion] total\_weight full type
>
> ```ts theme={null}
> {
>   value: number,
>   unit: pound | ounce | gram | kilogram
> }
> ```

***

### getShipmentById

`shipments.getShipmentById`

Get Shipment By ID

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.shipments.getShipmentById({
	path: { shipment_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shipment_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `service_code` | `string` | Yes | — |
| `shipping_rule_id` | `string` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `items` | `object[]` | No | — |
| `tax_identifiers` | `object[] \| null` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `shipment_number` | `string \| null` | No | — |
| `ship_date` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `modified_at` | `string` | Yes | — |
| `shipment_status` | `pending \| processing \| label_purchased \| cancelled` | Yes | — |
| `ship_to` | `object` | Yes | — |
| `ship_from` | `object` | Yes | — |
| `warehouse_id` | `string \| null` | Yes | — |
| `return_to` | `object` | Yes | — |
| `is_return` | `boolean \| null` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | Yes | — |
| `customs` | `object \| null` | Yes | — |
| `advanced_options` | `object` | Yes | — |
| `insurance_provider` | `none \| shipsurance \| carrier \| third_party` | Yes | — |
| `tags` | `object[]` | Yes | — |
| `order_source_code` | `amazon_ca \| amazon_us \| brightpearl \| channel_advisor \| cratejoy \| ebay \| etsy \| jane \| groupon_goods \| magento \| paypal \| seller_active \| shopify \| stitch_labs \| squarespace \| three_dcart \| tophatter \| walmart \| woo_commerce \| volusion` | No | — |
| `packages` | `object[]` | Yes | — |
| `total_weight` | `object` | Yes | — |
| `comparison_rate_type` | `string \| null` | No | — |
| `zone` | `number \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   name?: string,
>   sales_order_id?: string | null,
>   sales_order_item_id?: string | null,
>   quantity?: number,
>   sku?: string | null,
>   bundle_sku?: string | null,
>   external_order_id?: string | null,
>   external_order_item_id?: string | null,
>   asin?: string | null,
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
> }[]
> ```

> [accordion] tax\_identifiers full type
>
> ```ts theme={null}
> {
>   taxable_entity_type: shipper | recipient | ior,
>   identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>   issuing_authority: string,
>   value: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] ship\_from full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] return\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] customs full type
>
> ```ts theme={null}
> {
>   contents: merchandise | documents | gift | returned_goods | sample | other,
>   contents_explanation?: string,
>   non_delivery: return_to_sender | treat_as_abandoned,
>   terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>   declaration?: string,
>   invoice_additional_details?: {
>     freight_charge?: {
>       currency: string,
>       amount: number
>     },
>     insurance_charge?: {
>       currency: string,
>       amount: number
>     },
>     discount?: {
>       currency: string,
>       amount: number
>     },
>     estimated_import_charges?: {
>       taxes?: {
>         currency: string,
>         amount: number
>       },
>       duties?: {
>         currency: string,
>         amount: number
>       }
>     },
>     other_charge?: {
>       currency: string,
>       amount: number
>     },
>     other_charge_description?: string,
>     invoice_number?: string
>   },
>   importer_of_record?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province?: string,
>     postal_code: string,
>     country_code: string
>   },
>   license_number?: string,
>   certificate_number?: string,
>   customs_items?: {
>     description?: string | null,
>     customs_item_id: string,
>     quantity?: number,
>     value?: number,
>     value_currency?: string,
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null
>   }[]
> } | null
> ```

> [accordion] advanced\_options full type
>
> ```ts theme={null}
> {
>   bill_to_account?: string | null,
>   bill_to_country_code?: string | null,
>   bill_to_party?: recipient | third_party | null,
>   bill_to_postal_code?: string | null,
>   contains_alcohol?: boolean,
>   delivered_duty_paid?: boolean,
>   dry_ice?: boolean,
>   dry_ice_weight?: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   } | null,
>   non_machinable?: boolean,
>   saturday_delivery?: boolean,
>   fedex_freight?: {
>     shipper_load_and_count?: string,
>     booking_confirmation?: string
>   },
>   use_ups_ground_freight_pricing?: boolean | null,
>   freight_class?: string | null,
>   custom_field1?: string | null,
>   custom_field2?: string | null,
>   custom_field3?: string | null,
>   origin_type?: pickup | drop_off | null,
>   additional_handling?: boolean | null,
>   shipper_release?: boolean | null,
>   collect_on_delivery?: {
>     payment_type?: any | cash | cash_equivalent | none,
>     payment_amount?: {
>       currency?: string,
>       amount?: number
>     }
>   },
>   third_party_consignee?: boolean,
>   dangerous_goods?: boolean,
>   dangerous_goods_contact?: {
>     name?: string,
>     phone?: string
>   },
>   windsor_framework_details?: {
>     movement_indicator?: c2c | b2c | c2b | b2b,
>     not_at_risk?: boolean
>   },
>   license_number?: string | null,
>   invoice_number?: string | null,
>   certificate_number?: string | null,
>   fragile?: boolean,
>   delivery-as-addressed?: boolean,
>   return-after-first-attempt?: boolean,
>   regulated_content_type?: day_old_poultry | other_live_animal | null
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   tag_id?: number,
>   name: string,
>   color?: string
> }[]
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   shipment_package_id?: string,
>   package_id?: string,
>   package_code?: string,
>   package_name?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   tracking_number?: string,
>   content_description?: string | null,
>   products?: {
>     description?: string | null,
>     quantity?: number,
>     value?: {
>       currency: string,
>       amount: number
>     },
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null,
>     mid_code?: string | null,
>     product_url?: string | null,
>     vat_rate?: number | null,
>     dangerous_goods?: {
>       id_number?: string | null,
>       shipping_name?: string | null,
>       technical_name?: string | null,
>       product_class?: string | null,
>       product_class_subsidiary?: string | null,
>       packaging_group?: i | ii | iii,
>       dangerous_amount?: {
>         amount?: number,
>         unit?: string | null
>       },
>       quantity?: number,
>       packaging_instruction?: string | null,
>       packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>       packaging_type?: string | null,
>       transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>       transport_category?: string | null,
>       regulation_authority?: string | null,
>       regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>       radioactive?: boolean | null,
>       reportable_quantity?: boolean | null,
>       tunnel_code?: string | null,
>       additional_description?: string | null
>     }[],
>     extended_details?: Record<string, JsonValue>
>   }[]
> }[]
> ```

> [accordion] total\_weight full type
>
> ```ts theme={null}
> {
>   value: number,
>   unit: pound | ounce | gram | kilogram
> }
> ```

***

### listShipmentRates

`shipments.listShipmentRates`

Get Shipment Rates

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.shipments.listShipmentRates({
	path: { shipment_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   created_at_start?: string
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rates: {
>     rate_id: string,
>     rate_type: check | shipment,
>     carrier_id: string,
>     shipping_amount: {
>       currency: string,
>       amount: number
>     },
>     insurance_amount: {
>       currency: string,
>       amount: number
>     },
>     confirmation_amount: {
>       currency: string,
>       amount: number
>     },
>     other_amount: {
>       currency: string,
>       amount: number
>     },
>     requested_comparison_amount?: {
>       currency: string,
>       amount: number
>     },
>     tax_amount?: {
>       currency: string,
>       amount: number
>     },
>     rate_details?: {
>       rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>       carrier_description?: string,
>       carrier_billing_code?: string,
>       carrier_memo?: string,
>       amount?: {
>         currency: string,
>         amount: number
>       },
>       rate_detail_attributes?: {
>         tax_type?: vat,
>         tax_percentage?: number
>       },
>       billing_source?: string
>     }[],
>     zone: number | null,
>     package_type: string | null,
>     delivery_days?: number,
>     guaranteed_service: boolean,
>     estimated_delivery_date?: string | null,
>     carrier_delivery_days?: string,
>     ship_date?: string,
>     negotiated_rate: boolean,
>     service_type: string,
>     service_code: string,
>     trackable: boolean,
>     carrier_code: string,
>     carrier_nickname: string,
>     carrier_friendly_name: string,
>     validation_status: valid | invalid | has_warnings | unknown,
>     warning_messages: string[],
>     error_messages: string[],
>     rate_attributes?: (best_value | cheapest | fastest)[]
>   }[],
>   invalid_rates: {
>     rate_id: string,
>     rate_type: check | shipment,
>     carrier_id: string,
>     shipping_amount: {
>       currency: string,
>       amount: number
>     },
>     insurance_amount: {
>       currency: string,
>       amount: number
>     },
>     confirmation_amount: {
>       currency: string,
>       amount: number
>     },
>     other_amount: {
>       currency: string,
>       amount: number
>     },
>     requested_comparison_amount?: {
>       currency: string,
>       amount: number
>     },
>     tax_amount?: {
>       currency: string,
>       amount: number
>     },
>     rate_details?: {
>       rate_detail_type?: uncategorized | shipping | insurance | confirmation | discount | fuel_charge | additional_fees | tariff | tax | delivery | handling | special_goods | pickup | location_fee | oversize | returns | notifications | tip | duties_and_taxes | brokerage_fee | admin_fee | adjustment,
>       carrier_description?: string,
>       carrier_billing_code?: string,
>       carrier_memo?: string,
>       amount?: {
>         currency: string,
>         amount: number
>       },
>       rate_detail_attributes?: {
>         tax_type?: vat,
>         tax_percentage?: number
>       },
>       billing_source?: string
>     }[],
>     zone: number | null,
>     package_type: string | null,
>     delivery_days?: number,
>     guaranteed_service: boolean,
>     estimated_delivery_date?: string | null,
>     carrier_delivery_days?: string,
>     ship_date?: string,
>     negotiated_rate: boolean,
>     service_type: string,
>     service_code: string,
>     trackable: boolean,
>     carrier_code: string,
>     carrier_nickname: string,
>     carrier_friendly_name: string,
>     validation_status: valid | invalid | has_warnings | unknown,
>     warning_messages: string[],
>     error_messages: string[]
>   }[],
>   rate_request_id: string,
>   shipment_id: string,
>   created_at: string,
>   status: working | completed | partial | error,
>   errors: {
>     error_source: carrier | order_source | shipengine,
>     error_type: account_status | business_rules | validation | security | system | integrations,
>     error_code: auto_fund_not_supported | batch_cannot_be_modified | carrier_conflict | carrier_disconnected | carrier_not_connected | carrier_not_supported | confirmation_not_supported | default_warehouse_cannot_be_deleted | field_conflict | field_value_required | forbidden | identifier_conflict | identifiers_must_match | insufficient_funds | invalid_address | invalid_billing_plan | invalid_field_value | invalid_identifier | invalid_status | invalid_string_length | label_images_not_supported | meter_failure | order_source_not_active | rate_limit_exceeded | refresh_not_supported | request_body_required | return_label_not_supported | settings_not_supported | subscription_inactive | terms_not_accepted | tracking_not_supported | trial_expired | unauthorized | unknown | unspecified | verification_failure | warehouse_conflict | webhook_event_type_conflict | customs_items_required | incompatible_paired_labels | invalid_charge_event | invalid_object | no_rates_returned | file_not_found | shipping_rule_not_found | service_not_determined | funding_source_registration_in_progress | insurance_failure | funding_source_missing_configuration | funding_source_error,
>     message: string,
>     carrier_id?: string,
>     carrier_code?: string,
>     field_name?: string
>   }[]
> }[]
> ```

***

### listShipments

`shipments.listShipments`

List Shipments

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.shipments.listShipments({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   shipment_status?: pending | processing | label_purchased | cancelled,
>   batch_id?: string,
>   tag?: string,
>   created_at_start?: string,
>   created_at_end?: string,
>   modified_at_start?: string,
>   modified_at_end?: string,
>   page?: number,
>   page_size?: number,
>   sales_order_id?: string,
>   sort_dir?: asc | desc,
>   sort_by?: modified_at | created_at
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shipments` | `object[]` | Yes | — |
| `total` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `pages` | `number` | Yes | — |
| `links` | `object` | Yes | — |

> [accordion] shipments full type
>
> ```ts theme={null}
> {
>   shipment_id: string,
>   carrier_id: string,
>   service_code: string,
>   shipping_rule_id?: string,
>   external_order_id?: string | null,
>   items?: {
>     name?: string,
>     sales_order_id?: string | null,
>     sales_order_item_id?: string | null,
>     quantity?: number,
>     sku?: string | null,
>     bundle_sku?: string | null,
>     external_order_id?: string | null,
>     external_order_item_id?: string | null,
>     asin?: string | null,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>   }[],
>   tax_identifiers?: {
>     taxable_entity_type: shipper | recipient | ior,
>     identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>     issuing_authority: string,
>     value: string
>   }[] | null,
>   external_shipment_id?: string | null,
>   shipment_number?: string | null,
>   ship_date: string,
>   created_at: string,
>   modified_at: string,
>   shipment_status: pending | processing | label_purchased | cancelled,
>   ship_to: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null,
>     geolocation?: {
>       type?: what3words,
>       value?: string
>     }[]
>   },
>   ship_from: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   warehouse_id: string | null,
>   return_to: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   is_return?: boolean | null,
>   confirmation: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   customs: {
>     contents: merchandise | documents | gift | returned_goods | sample | other,
>     contents_explanation?: string,
>     non_delivery: return_to_sender | treat_as_abandoned,
>     terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>     declaration?: string,
>     invoice_additional_details?: {
>       freight_charge?: {
>         currency: string,
>         amount: number
>       },
>       insurance_charge?: {
>         currency: string,
>         amount: number
>       },
>       discount?: {
>         currency: string,
>         amount: number
>       },
>       estimated_import_charges?: {
>         taxes?: {
>           currency: string,
>           amount: number
>         },
>         duties?: {
>           currency: string,
>           amount: number
>         }
>       },
>       other_charge?: {
>         currency: string,
>         amount: number
>       },
>       other_charge_description?: string,
>       invoice_number?: string
>     },
>     importer_of_record?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province?: string,
>       postal_code: string,
>       country_code: string
>     },
>     license_number?: string,
>     certificate_number?: string,
>     customs_items?: {
>       description?: string | null,
>       customs_item_id: string,
>       quantity?: number,
>       value?: number,
>       value_currency?: string,
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null
>     }[]
>   } | null,
>   advanced_options: {
>     bill_to_account?: string | null,
>     bill_to_country_code?: string | null,
>     bill_to_party?: recipient | third_party | null,
>     bill_to_postal_code?: string | null,
>     contains_alcohol?: boolean,
>     delivered_duty_paid?: boolean,
>     dry_ice?: boolean,
>     dry_ice_weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     } | null,
>     non_machinable?: boolean,
>     saturday_delivery?: boolean,
>     fedex_freight?: {
>       shipper_load_and_count?: string,
>       booking_confirmation?: string
>     },
>     use_ups_ground_freight_pricing?: boolean | null,
>     freight_class?: string | null,
>     custom_field1?: string | null,
>     custom_field2?: string | null,
>     custom_field3?: string | null,
>     origin_type?: pickup | drop_off | null,
>     additional_handling?: boolean | null,
>     shipper_release?: boolean | null,
>     collect_on_delivery?: {
>       payment_type?: any | cash | cash_equivalent | none,
>       payment_amount?: {
>         currency?: string,
>         amount?: number
>       }
>     },
>     third_party_consignee?: boolean,
>     dangerous_goods?: boolean,
>     dangerous_goods_contact?: {
>       name?: string,
>       phone?: string
>     },
>     windsor_framework_details?: {
>       movement_indicator?: c2c | b2c | c2b | b2b,
>       not_at_risk?: boolean
>     },
>     license_number?: string | null,
>     invoice_number?: string | null,
>     certificate_number?: string | null,
>     fragile?: boolean,
>     delivery-as-addressed?: boolean,
>     return-after-first-attempt?: boolean,
>     regulated_content_type?: day_old_poultry | other_live_animal | null
>   },
>   insurance_provider: none | shipsurance | carrier | third_party,
>   tags: {
>     tag_id?: number,
>     name: string,
>     color?: string
>   }[],
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>   packages: {
>     shipment_package_id?: string,
>     package_id?: string,
>     package_code?: string,
>     package_name?: string,
>     weight: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     dimensions?: {
>       unit: inch | centimeter,
>       length: number,
>       width: number,
>       height: number
>     },
>     insured_value?: {
>       currency: string,
>       amount: number
>     },
>     label_messages?: {
>       reference1: string | null,
>       reference2: string | null,
>       reference3: string | null
>     },
>     external_package_id?: string,
>     tracking_number?: string,
>     content_description?: string | null,
>     products?: {
>       description?: string | null,
>       quantity?: number,
>       value?: {
>         currency: string,
>         amount: number
>       },
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null,
>       mid_code?: string | null,
>       product_url?: string | null,
>       vat_rate?: number | null,
>       dangerous_goods?: {
>         id_number?: string | null,
>         shipping_name?: string | null,
>         technical_name?: string | null,
>         product_class?: string | null,
>         product_class_subsidiary?: string | null,
>         packaging_group?: i | ii | iii,
>         dangerous_amount?: {
>           amount?: number,
>           unit?: string | null
>         },
>         quantity?: number,
>         packaging_instruction?: string | null,
>         packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>         packaging_type?: string | null,
>         transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>         transport_category?: string | null,
>         regulation_authority?: string | null,
>         regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>         radioactive?: boolean | null,
>         reportable_quantity?: boolean | null,
>         tunnel_code?: string | null,
>         additional_description?: string | null
>       }[],
>       extended_details?: Record<string, JsonValue>
>     }[]
>   }[],
>   total_weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   comparison_rate_type?: string | null,
>   zone?: number | null
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   first: {
>     href: string,
>     type?: string
>   },
>   last: {
>     href: string,
>     type?: string
>   },
>   prev: {
>     href?: string,
>     type?: string
>   },
>   next: {
>     href?: string,
>     type?: string
>   }
> }
> ```

***

### shipmentsUpdateTags

`shipments.shipmentsUpdateTags`

Update Shipments Tags

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.shipments.shipmentsUpdateTags({
	body: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   shipments_tags?: {
>     shipment_id?: string,
>     tags?: string[]
>   }[]
> }
> ```

**Output:** `undefined`

***

### tagShipment

`shipments.tagShipment`

Add Tag to Shipment

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.shipments.tagShipment({
	path: { shipment_id: 'se-28529731', tag_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string,
>   tag_name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `string[]` | Yes | — |

***

### untagShipment

`shipments.untagShipment`

Remove Tag from Shipment

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.shipments.untagShipment({
	path: { shipment_id: 'se-28529731', tag_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Remove Tag from Shipment deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string,
>   tag_name: string
> }
> ```

**Output:** `string \| undefined`

***

### updateShipment

`shipments.updateShipment`

Update Shipment By ID

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.shipments.updateShipment({
	path: { shipment_id: 'se-28529731' },
	body: {
		ship_to: {
			name: 'example',
			address_line1: '123 Example St',
			city_locality: 'Example City',
			state_province: 'CA',
			postal_code: '94000',
		},
		ship_from: {
			name: 'example',
			address_line1: '123 Example St',
			city_locality: 'Example City',
			state_province: 'CA',
			postal_code: '94000',
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   shipment_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   carrier_id?: string,
>   service_code?: string,
>   shipping_rule_id?: string,
>   external_order_id?: string | null,
>   items?: {
>     name?: string,
>     sales_order_id?: string | null,
>     sales_order_item_id?: string | null,
>     quantity?: number,
>     sku?: string | null,
>     external_order_id?: string | null,
>     external_order_item_id?: string | null,
>     asin?: string | null,
>     order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
>   }[],
>   tax_identifiers?: {
>     taxable_entity_type: shipper | recipient | ior,
>     identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>     issuing_authority: string,
>     value: string
>   }[] | null,
>   external_shipment_id?: string | null,
>   shipment_number?: string | null,
>   ship_date?: string,
>   ship_to: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null,
>     geolocation?: {
>       type?: what3words,
>       value?: string
>     }[]
>   },
>   ship_from: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   warehouse_id?: string | null,
>   return_to?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no,
>     instructions?: string | null
>   },
>   is_return?: boolean | null,
>   confirmation?: none | delivery | signature | adult_signature | direct_signature | delivery_mailed | verbal_confirmation | delivery_code | age_verification_16_plus,
>   customs?: {
>     contents: merchandise | documents | gift | returned_goods | sample | other,
>     contents_explanation?: string,
>     non_delivery: return_to_sender | treat_as_abandoned,
>     terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>     declaration?: string,
>     invoice_additional_details?: {
>       freight_charge?: {
>         currency: string,
>         amount: number
>       },
>       insurance_charge?: {
>         currency: string,
>         amount: number
>       },
>       discount?: {
>         currency: string,
>         amount: number
>       },
>       estimated_import_charges?: {
>         taxes?: {
>           currency: string,
>           amount: number
>         },
>         duties?: {
>           currency: string,
>           amount: number
>         }
>       },
>       other_charge?: {
>         currency: string,
>         amount: number
>       },
>       other_charge_description?: string,
>       invoice_number?: string
>     },
>     importer_of_record?: {
>       name: string,
>       phone?: string,
>       email?: string | null,
>       company_name?: string | null,
>       address_line1: string,
>       address_line2?: string | null,
>       address_line3?: string | null,
>       city_locality: string,
>       state_province?: string,
>       postal_code: string,
>       country_code: string
>     },
>     license_number?: string,
>     certificate_number?: string,
>     customs_items?: {
>       description?: string | null,
>       quantity?: number,
>       value?: number,
>       value_currency?: string,
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null
>     }[]
>   } | null,
>   advanced_options?: {
>     bill_to_account?: string | null,
>     bill_to_country_code?: string | null,
>     bill_to_party?: recipient | third_party | null,
>     bill_to_postal_code?: string | null,
>     contains_alcohol?: boolean,
>     delivered_duty_paid?: boolean,
>     dry_ice?: boolean,
>     dry_ice_weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     } | null,
>     non_machinable?: boolean,
>     saturday_delivery?: boolean,
>     fedex_freight?: {
>       shipper_load_and_count?: string,
>       booking_confirmation?: string
>     },
>     use_ups_ground_freight_pricing?: boolean | null,
>     freight_class?: string | null,
>     custom_field1?: string | null,
>     custom_field2?: string | null,
>     custom_field3?: string | null,
>     origin_type?: pickup | drop_off | null,
>     additional_handling?: boolean | null,
>     shipper_release?: boolean | null,
>     collect_on_delivery?: {
>       payment_type?: any | cash | cash_equivalent | none,
>       payment_amount?: {
>         currency?: string,
>         amount?: number
>       }
>     },
>     third_party_consignee?: boolean,
>     dangerous_goods?: boolean,
>     dangerous_goods_contact?: {
>       name?: string,
>       phone?: string
>     },
>     windsor_framework_details?: {
>       movement_indicator?: c2c | b2c | c2b | b2b,
>       not_at_risk?: boolean
>     },
>     license_number?: string | null,
>     invoice_number?: string | null,
>     certificate_number?: string | null,
>     fragile?: boolean,
>     delivery-as-addressed?: boolean,
>     return-after-first-attempt?: boolean,
>     regulated_content_type?: day_old_poultry | other_live_animal | null
>   },
>   insurance_provider?: none | shipsurance | carrier | third_party,
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion,
>   packages?: {
>     package_id?: string,
>     package_code?: string,
>     package_name?: string,
>     weight: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     dimensions?: {
>       unit: inch | centimeter,
>       length: number,
>       width: number,
>       height: number
>     },
>     insured_value?: {
>       currency: string,
>       amount: number
>     },
>     label_messages?: {
>       reference1?: string | null,
>       reference2?: string | null,
>       reference3?: string | null
>     },
>     external_package_id?: string,
>     content_description?: string | null,
>     products?: {
>       description?: string | null,
>       quantity?: number,
>       value?: {
>         currency: string,
>         amount: number
>       },
>       weight?: {
>         value: number,
>         unit: pound | ounce | gram | kilogram
>       },
>       harmonized_tariff_code?: string | null,
>       country_of_origin?: string | null,
>       unit_of_measure?: string | null,
>       sku?: string | null,
>       sku_description?: string | null,
>       mid_code?: string | null,
>       product_url?: string | null,
>       vat_rate?: number | null,
>       dangerous_goods?: {
>         id_number?: string | null,
>         shipping_name?: string | null,
>         technical_name?: string | null,
>         product_class?: string | null,
>         product_class_subsidiary?: string | null,
>         packaging_group?: i | ii | iii,
>         dangerous_amount?: {
>           amount?: number,
>           unit?: string | null
>         },
>         quantity?: number,
>         packaging_instruction?: string | null,
>         packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>         packaging_type?: string | null,
>         transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>         transport_category?: string | null,
>         regulation_authority?: string | null,
>         regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>         radioactive?: boolean | null,
>         reportable_quantity?: boolean | null,
>         tunnel_code?: string | null,
>         additional_description?: string | null
>       }[],
>       extended_details?: Record<string, JsonValue>
>     }[]
>   }[],
>   comparison_rate_type?: string | null,
>   validate_address?: no_validation | validate_only | validate_and_clean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shipment_id` | `string` | Yes | — |
| `carrier_id` | `string` | Yes | — |
| `service_code` | `string` | Yes | — |
| `shipping_rule_id` | `string` | No | — |
| `external_order_id` | `string \| null` | No | — |
| `items` | `object[]` | No | — |
| `tax_identifiers` | `object[] \| null` | No | — |
| `external_shipment_id` | `string \| null` | No | — |
| `shipment_number` | `string \| null` | No | — |
| `ship_date` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `modified_at` | `string` | No | — |
| `shipment_status` | `pending \| processing \| label_purchased \| cancelled` | Yes | — |
| `ship_to` | `object` | Yes | — |
| `ship_from` | `object` | Yes | — |
| `warehouse_id` | `string \| null` | No | — |
| `return_to` | `object` | Yes | — |
| `is_return` | `boolean \| null` | No | — |
| `confirmation` | `none \| delivery \| signature \| adult_signature \| direct_signature \| delivery_mailed \| verbal_confirmation \| delivery_code \| age_verification_16_plus` | Yes | — |
| `customs` | `object \| null` | Yes | — |
| `advanced_options` | `object` | Yes | — |
| `insurance_provider` | `none \| shipsurance \| carrier \| third_party` | Yes | — |
| `tags` | `object[]` | Yes | — |
| `order_source_code` | `amazon_ca \| amazon_us \| brightpearl \| channel_advisor \| cratejoy \| ebay \| etsy \| jane \| groupon_goods \| magento \| paypal \| seller_active \| shopify \| stitch_labs \| squarespace \| three_dcart \| tophatter \| walmart \| woo_commerce \| volusion` | No | — |
| `packages` | `object[]` | Yes | — |
| `total_weight` | `object` | Yes | — |
| `comparison_rate_type` | `string \| null` | No | — |
| `zone` | `number \| null` | No | — |
| `errors` | `string[]` | Yes | — |
| `address_validation` | `object` | Yes | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   name?: string,
>   sales_order_id?: string | null,
>   sales_order_item_id?: string | null,
>   quantity?: number,
>   sku?: string | null,
>   bundle_sku?: string | null,
>   external_order_id?: string | null,
>   external_order_item_id?: string | null,
>   asin?: string | null,
>   order_source_code?: amazon_ca | amazon_us | brightpearl | channel_advisor | cratejoy | ebay | etsy | jane | groupon_goods | magento | paypal | seller_active | shopify | stitch_labs | squarespace | three_dcart | tophatter | walmart | woo_commerce | volusion
> }[]
> ```

> [accordion] tax\_identifiers full type
>
> ```ts theme={null}
> {
>   taxable_entity_type: shipper | recipient | ior,
>   identifier_type: vat | eori | ssn | ein | tin | ioss | pan | voec | pccc | oss | passport | abn | ukims,
>   issuing_authority: string,
>   value: string
> }[] | null
> ```

> [accordion] ship\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null,
>   geolocation?: {
>     type?: what3words,
>     value?: string
>   }[]
> }
> ```

> [accordion] ship\_from full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] return\_to full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no,
>   instructions?: string | null
> }
> ```

> [accordion] customs full type
>
> ```ts theme={null}
> {
>   contents: merchandise | documents | gift | returned_goods | sample | other,
>   contents_explanation?: string,
>   non_delivery: return_to_sender | treat_as_abandoned,
>   terms_of_trade_code?: exw | fca | cpt | cip | dpu | dap | ddp | fas | fob | cfr | cif | ddu | daf | deq | des,
>   declaration?: string,
>   invoice_additional_details?: {
>     freight_charge?: {
>       currency: string,
>       amount: number
>     },
>     insurance_charge?: {
>       currency: string,
>       amount: number
>     },
>     discount?: {
>       currency: string,
>       amount: number
>     },
>     estimated_import_charges?: {
>       taxes?: {
>         currency: string,
>         amount: number
>       },
>       duties?: {
>         currency: string,
>         amount: number
>       }
>     },
>     other_charge?: {
>       currency: string,
>       amount: number
>     },
>     other_charge_description?: string,
>     invoice_number?: string
>   },
>   importer_of_record?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province?: string,
>     postal_code: string,
>     country_code: string
>   },
>   license_number?: string,
>   certificate_number?: string,
>   customs_items?: {
>     description?: string | null,
>     customs_item_id: string,
>     quantity?: number,
>     value?: number,
>     value_currency?: string,
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null
>   }[]
> } | null
> ```

> [accordion] advanced\_options full type
>
> ```ts theme={null}
> {
>   bill_to_account?: string | null,
>   bill_to_country_code?: string | null,
>   bill_to_party?: recipient | third_party | null,
>   bill_to_postal_code?: string | null,
>   contains_alcohol?: boolean,
>   delivered_duty_paid?: boolean,
>   dry_ice?: boolean,
>   dry_ice_weight?: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   } | null,
>   non_machinable?: boolean,
>   saturday_delivery?: boolean,
>   fedex_freight?: {
>     shipper_load_and_count?: string,
>     booking_confirmation?: string
>   },
>   use_ups_ground_freight_pricing?: boolean | null,
>   freight_class?: string | null,
>   custom_field1?: string | null,
>   custom_field2?: string | null,
>   custom_field3?: string | null,
>   origin_type?: pickup | drop_off | null,
>   additional_handling?: boolean | null,
>   shipper_release?: boolean | null,
>   collect_on_delivery?: {
>     payment_type?: any | cash | cash_equivalent | none,
>     payment_amount?: {
>       currency?: string,
>       amount?: number
>     }
>   },
>   third_party_consignee?: boolean,
>   dangerous_goods?: boolean,
>   dangerous_goods_contact?: {
>     name?: string,
>     phone?: string
>   },
>   windsor_framework_details?: {
>     movement_indicator?: c2c | b2c | c2b | b2b,
>     not_at_risk?: boolean
>   },
>   license_number?: string | null,
>   invoice_number?: string | null,
>   certificate_number?: string | null,
>   fragile?: boolean,
>   delivery-as-addressed?: boolean,
>   return-after-first-attempt?: boolean,
>   regulated_content_type?: day_old_poultry | other_live_animal | null
> }
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   tag_id?: number,
>   name: string,
>   color?: string
> }[]
> ```

> [accordion] packages full type
>
> ```ts theme={null}
> {
>   shipment_package_id?: string,
>   package_id?: string,
>   package_code?: string,
>   package_name?: string,
>   weight: {
>     value: number,
>     unit: pound | ounce | gram | kilogram
>   },
>   dimensions?: {
>     unit: inch | centimeter,
>     length: number,
>     width: number,
>     height: number
>   },
>   insured_value?: {
>     currency: string,
>     amount: number
>   },
>   label_messages?: {
>     reference1: string | null,
>     reference2: string | null,
>     reference3: string | null
>   },
>   external_package_id?: string,
>   tracking_number?: string,
>   content_description?: string | null,
>   products?: {
>     description?: string | null,
>     quantity?: number,
>     value?: {
>       currency: string,
>       amount: number
>     },
>     weight?: {
>       value: number,
>       unit: pound | ounce | gram | kilogram
>     },
>     harmonized_tariff_code?: string | null,
>     country_of_origin?: string | null,
>     unit_of_measure?: string | null,
>     sku?: string | null,
>     sku_description?: string | null,
>     mid_code?: string | null,
>     product_url?: string | null,
>     vat_rate?: number | null,
>     dangerous_goods?: {
>       id_number?: string | null,
>       shipping_name?: string | null,
>       technical_name?: string | null,
>       product_class?: string | null,
>       product_class_subsidiary?: string | null,
>       packaging_group?: i | ii | iii,
>       dangerous_amount?: {
>         amount?: number,
>         unit?: string | null
>       },
>       quantity?: number,
>       packaging_instruction?: string | null,
>       packaging_instruction_section?: section_1 | section_2 | section_1a | section_1b,
>       packaging_type?: string | null,
>       transport_mean?: ground | water | cargo_aircraft_only | passenger_aircraft,
>       transport_category?: string | null,
>       regulation_authority?: string | null,
>       regulation_level?: lightly_regulated | fully_regulated | limited_quantities | excepted_quantity,
>       radioactive?: boolean | null,
>       reportable_quantity?: boolean | null,
>       tunnel_code?: string | null,
>       additional_description?: string | null
>     }[],
>     extended_details?: Record<string, JsonValue>
>   }[]
> }[]
> ```

> [accordion] total\_weight full type
>
> ```ts theme={null}
> {
>   value: number,
>   unit: pound | ounce | gram | kilogram
> }
> ```

> [accordion] address\_validation full type
>
> ```ts theme={null}
> {
>   status: unverified | verified | warning | error,
>   original_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   matched_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   } | null,
>   messages: {
>     code: a1000 | a1001 | a1002 | a1003 | a1004 | a1005 | a1006 | a1007 | a1008 | r1000 | r1001 | r1002 | r1003,
>     message: string,
>     type: error | warning | info,
>     detail_code: unsupported_country | non_supported_country | minimum_postal_code_verification_failed | street_does_not_match_unique_street_name | multiple_directionals | multiple_matches | suite_not_valid | suite_missing | incompatible_paired_labels | invalid_house_number | missing_house_number | invalid_box_number | invalid_charge_event | missing_box_number | missing_cmra_or_private_mail_box_number | suite_has_no_secondaries | postal_code_changed_or_added | state_province_changed_or_added | city_locality_changed_or_added | urbanization_changed | street_name_spelling_changed_or_added | street_name_type_changed_or_added | street_direction_changed_or_added | suite_type_changed_or_added | suite_unit_number_changed_or_added | double_dependent_locality_changed_or_added | subadministrative_area_changed_or_added | subnational_area_changed_or_added | po_box_changed_or_added | premise_type_changed_or_added | house_number_changed | organization_changed_or_added | partially_verified_to_state_level | partially_verified_to_city_level | partially_verified_to_street_level | partially_verified_to_premise_level | verified_to_state_level | verified_to_city_level | verified_to_street_level | verified_to_premise_level | verified_to_suite_level | coded_to_street_lavel | coded_to_neighborhood_level | coded_to_community_level | coded_to_state_level | coded_to_rooftop_level | coded_to_rooftop_interpolation_level | name_max_length_exceeded | phone_max_length_exceeded | company_name_max_length_exceeded | line1_min_max_length | line2_max_length_exceeded | line3_max_length_exceeded | city_locality_max_length_exceeded | state_province_max_length_exceeded | invalid_postal_code | country_invalid_length | address_not_found | null
>   }[]
> }
> ```

***

## Tags

### createTag

`tags.createTag`

Create a New Tag

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tags.createTag({
	body: { name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   color?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tag_id` | `number` | No | — |
| `name` | `string` | Yes | — |
| `color` | `string` | No | — |

***

### createTagByName

`tags.createTagByName`

Deprecated: create a tag by path name; use POST /v1/tags instead.

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tags.createTagByName({
	path: { tag_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

This path-based tag creation operation is deprecated by ShipEngine; use POST /v1/tags (tags.createTag) instead.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tag_name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tag_id` | `number` | No | — |
| `name` | `string` | Yes | — |
| `color` | `string` | No | — |

***

### deleteTag

`tags.deleteTag`

Delete Tag

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.tags.deleteTag({
	path: { tag_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete Tag deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tag_name: string
> }
> ```

**Output:** `string \| undefined`

***

### listTags

`tags.listTags`

Get Tags

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.tags.listTags({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[]` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   tag_id?: number,
>   name: string,
>   color?: string
> }[]
> ```

***

### renameTag

`tags.renameTag`

Update Tag Name

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tags.renameTag({
	path: { tag_name: 'example', new_tag_name: 'example' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   tag_name: string,
>   new_tag_name: string
> }
> ```

**Output:** `string \| undefined`

***

## Tokens

### tokensGetEphemeralToken

`tokens.tokensGetEphemeralToken`

Get Ephemeral Token

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tokens.tokensGetEphemeralToken({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   redirect?: shipengine-dashboard
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string` | No | — |
| `redirect_url` | `string` | No | — |

***

## Tracking

### getTrackingLog

`tracking.getTrackingLog`

Get Tracking Information

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.tracking.getTrackingLog({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   carrier_code?: string,
>   tracking_number?: string,
>   carrier_id?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tracking_number` | `string` | Yes | — |
| `tracking_url` | `string` | Yes | — |
| `status_code` | `UN \| AC \| IT \| DE \| EX \| AT \| NY \| SP` | Yes | — |
| `status_detail_code` | `CARRIER_STATUS_NOT_MAPPED \| SHIPMENT_CREATED \| AWAITING_PICKUP_DROP_OFF \| DROPPED_OFF \| ELEC_ADVICE_RECD_BY_CARRIER \| PICKED_UP \| CUSTOMS_CLEARED \| CUSTOMS_PROCESSING \| DELIVERY_ARRANGED_WITH_RECIPIENT \| HUB_SCAN_OUT \| HUB_SCAN_IN \| IN_TRANSIT \| INFORMATION \| PARCEL_OVER_LABELLED \| PARCEL_UPDATE_NOTIFICATION \| RECEIVED_BY_CARRIER \| RECEIVED_LOCAL_DELIVERY_DEPOT \| SUB_CONTRACTOR_EVENT \| SUB_CONTRACTOR_RECEIVED \| PARCEL_REDIRECTED \| DELIVERY_SCHEDULED \| HUB_PROCESSING \| DELIVERY_RESCHEDULED \| ATTEMPTED_DELIVERY \| ATTEMPTED_DELIVERY_FINAL \| COD_AMOUNT_PAID \| CUSTOMER_CARDED \| OUT_FOR_DELIVERY \| AWAITING_COLLECTION_FROM_PICKUP_POINT \| COLLECT_AT_LOCAL_PO \| CUSTOMER_TO_COLLECT_FROM_CARRIER \| DELIVERED_TO_RECEPTION \| DELIVERED \| DELIVERED_DAMAGED \| DELIVERED_IN_PART \| DELIVERED_SPECIFIED_SAFE_PLACE \| DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION \| DELIVERED_TO_NEIGHBOUR \| DELIVERED_TO_PO_BOX \| PARCEL_COLLECTED_FROM_PICKUP_POINT \| POST_TRANSIT_STATUS \| PROOF_OF_DELIVERY \| PICKUP_FAILED \| NOT_YET_RECEIVED_BY_CARRIER \| PARCEL_DAMAGED \| ADDRESS_QUERY \| CARRIER_DELAYS \| DELAYED_NOT_CARRIER \| HELD_BY_CARRIER \| HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING \| HELD_BY_CUSTOMS \| INCORRECT_DECLARATION \| MISROUTED \| PARCEL_REPACKED \| RECD_BY_CARRIER_NO_ELEC_ADVICE \| COD_AMOUNT_NOT_PAID \| CUSTOMER_IDENTIFICATION_FAILED \| NO_ACCESS_TO_RECIPIENTS_ADDRESS \| CANCELLED \| CUSTOMER_MOVED \| HAZARDOUS_PROHIBITED \| NOT_COLLECTED_FROM_PICKUP_POINT \| NOT_DELIVERED \| NOT_DELIVERED_ADDRESSEE_DECEASED \| PARCEL_DISPOSED \| PARCEL_LOST \| PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY \| REFUSED_BY_CUSTOMER \| RETURN_TO_SENDER \| UNSPECIFIED_EXCEPTION \| TRACKING_EXPIRED \| DUTY_NOT_PAID \| PARCEL_REDIRECTED_BY_CARRIER \| DELIVERED_TO_PICKUP_POINT \| UNDELIVERABLE_RETURNED_TO_SENDER` | No | — |
| `carrier_code` | `string` | Yes | — |
| `carrier_id` | `number` | Yes | — |
| `status_description` | `string` | No | — |
| `status_detail_description` | `string` | No | — |
| `carrier_status_code` | `string` | Yes | — |
| `carrier_detail_code` | `string` | Yes | — |
| `carrier_status_description` | `string` | No | — |
| `ship_date` | `string` | No | — |
| `estimated_delivery_date` | `string` | No | — |
| `actual_delivery_date` | `string` | No | — |
| `exception_description` | `string` | No | — |
| `events` | `object[]` | Yes | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   occurred_at: string,
>   carrier_occurred_at?: string,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   company_name?: string,
>   signer?: string,
>   event_code?: string,
>   carrier_detail_code: string,
>   status_code: UN | AC | IT | DE | EX | AT | NY | SP,
>   status_detail_code?: CARRIER_STATUS_NOT_MAPPED | SHIPMENT_CREATED | AWAITING_PICKUP_DROP_OFF | DROPPED_OFF | ELEC_ADVICE_RECD_BY_CARRIER | PICKED_UP | CUSTOMS_CLEARED | CUSTOMS_PROCESSING | DELIVERY_ARRANGED_WITH_RECIPIENT | HUB_SCAN_OUT | HUB_SCAN_IN | IN_TRANSIT | INFORMATION | PARCEL_OVER_LABELLED | PARCEL_UPDATE_NOTIFICATION | RECEIVED_BY_CARRIER | RECEIVED_LOCAL_DELIVERY_DEPOT | SUB_CONTRACTOR_EVENT | SUB_CONTRACTOR_RECEIVED | PARCEL_REDIRECTED | DELIVERY_SCHEDULED | HUB_PROCESSING | DELIVERY_RESCHEDULED | ATTEMPTED_DELIVERY | ATTEMPTED_DELIVERY_FINAL | COD_AMOUNT_PAID | CUSTOMER_CARDED | OUT_FOR_DELIVERY | AWAITING_COLLECTION_FROM_PICKUP_POINT | COLLECT_AT_LOCAL_PO | CUSTOMER_TO_COLLECT_FROM_CARRIER | DELIVERED_TO_RECEPTION | DELIVERED | DELIVERED_DAMAGED | DELIVERED_IN_PART | DELIVERED_SPECIFIED_SAFE_PLACE | DELIVERED_TO_ALTERNATIVE_DELIVERY_LOCATION | DELIVERED_TO_NEIGHBOUR | DELIVERED_TO_PO_BOX | PARCEL_COLLECTED_FROM_PICKUP_POINT | POST_TRANSIT_STATUS | PROOF_OF_DELIVERY | PICKUP_FAILED | NOT_YET_RECEIVED_BY_CARRIER | PARCEL_DAMAGED | ADDRESS_QUERY | CARRIER_DELAYS | DELAYED_NOT_CARRIER | HELD_BY_CARRIER | HELD_BY_CARRIER_FOR_CLEARANCE_PRE_PROCESSING | HELD_BY_CUSTOMS | INCORRECT_DECLARATION | MISROUTED | PARCEL_REPACKED | RECD_BY_CARRIER_NO_ELEC_ADVICE | COD_AMOUNT_NOT_PAID | CUSTOMER_IDENTIFICATION_FAILED | NO_ACCESS_TO_RECIPIENTS_ADDRESS | CANCELLED | CUSTOMER_MOVED | HAZARDOUS_PROHIBITED | NOT_COLLECTED_FROM_PICKUP_POINT | NOT_DELIVERED | NOT_DELIVERED_ADDRESSEE_DECEASED | PARCEL_DISPOSED | PARCEL_LOST | PARCEL_OUTSIDE_OF_SERVICE_CAPABILITY | REFUSED_BY_CUSTOMER | RETURN_TO_SENDER | UNSPECIFIED_EXCEPTION | TRACKING_EXPIRED | DUTY_NOT_PAID | PARCEL_REDIRECTED_BY_CARRIER | DELIVERED_TO_PICKUP_POINT | UNDELIVERABLE_RETURNED_TO_SENDER,
>   status_description: string,
>   status_detail_description?: string,
>   carrier_status_code: string,
>   carrier_status_description: string,
>   latitude?: number,
>   longitude?: number,
>   proof_of_delivery_url?: string
> }[]
> ```

***

### startTracking

`tracking.startTracking`

Start Tracking a Package

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tracking.startTracking({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

This starts provider tracking subscriptions. Webhook receiving/management remains out of scope; no incoming callback handler is registered by this plugin.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   carrier_code?: string,
>   tracking_number?: string,
>   carrier_id?: string
> }
> ```

**Output:** `string \| undefined`

***

### stopTracking

`tracking.stopTracking`

Stop Tracking a Package

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.tracking.stopTracking({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

This stops provider tracking subscriptions. Webhook receiving/management remains out of scope; no incoming callback handler is registered by this plugin.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   carrier_code?: string,
>   tracking_number?: string,
>   carrier_id?: string
> }
> ```

**Output:** `string \| undefined`

***

## Warehouses

### createWarehouse

`warehouses.createWarehouse`

Create Warehouse

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.warehouses.createWarehouse({
	body: {
		name: 'example',
		origin_address: {
			name: 'example',
			address_line1: '123 Example St',
			city_locality: 'Example City',
			state_province: 'CA',
			postal_code: '94000',
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   is_default?: boolean | null,
>   name: string,
>   origin_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   return_address?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warehouse_id` | `string` | Yes | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `origin_address` | `object` | Yes | — |
| `return_address` | `object` | Yes | — |

> [accordion] origin\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

> [accordion] return\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

***

### deleteWarehouse

`warehouses.deleteWarehouse`

Delete Warehouse By ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipengine.api.warehouses.deleteWarehouse({
	path: { warehouse_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Delete Warehouse By ID deletes, disconnects, cancels, or otherwise changes an account resource in a way that may be difficult to reverse. Verify the target before calling.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   warehouse_id: string
> }
> ```

**Output:** `string \| undefined`

***

### getWarehouseById

`warehouses.getWarehouseById`

Get Warehouse By Id

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.warehouses.getWarehouseById({
	path: { warehouse_id: 'se-28529731' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   warehouse_id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warehouse_id` | `string` | Yes | — |
| `is_default` | `boolean \| null` | No | — |
| `name` | `string` | Yes | — |
| `created_at` | `string` | Yes | — |
| `origin_address` | `object` | Yes | — |
| `return_address` | `object` | Yes | — |

> [accordion] origin\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

> [accordion] return\_address full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone?: string,
>   email?: string | null,
>   company_name?: string | null,
>   address_line1: string,
>   address_line2?: string | null,
>   address_line3?: string | null,
>   city_locality: string,
>   state_province: string,
>   postal_code: string,
>   country_code?: string,
>   address_residential_indicator?: unknown | yes | no
> }
> ```

***

### listWarehouses

`warehouses.listWarehouses`

List Warehouses

**Risk:** `read`

```ts theme={null}
await corsair.shipengine.api.warehouses.listWarehouses({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `warehouses` | `object[]` | Yes | — |

> [accordion] warehouses full type
>
> ```ts theme={null}
> {
>   warehouse_id?: string,
>   is_default?: boolean | null,
>   name?: string,
>   created_at?: string,
>   origin_address?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   return_address?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   }
> }[]
> ```

***

### updateWarehouse

`warehouses.updateWarehouse`

Update Warehouse By Id

**Risk:** `write`

```ts theme={null}
await corsair.shipengine.api.warehouses.updateWarehouse({
	path: { warehouse_id: 'se-28529731' },
	body: {
		name: 'example',
		origin_address: {
			name: 'example',
			address_line1: '123 Example St',
			city_locality: 'Example City',
			state_province: 'CA',
			postal_code: '94000',
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   warehouse_id: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   is_default?: boolean | null,
>   name: string,
>   origin_address: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   },
>   return_address?: {
>     name: string,
>     phone?: string,
>     email?: string | null,
>     company_name?: string | null,
>     address_line1: string,
>     address_line2?: string | null,
>     address_line3?: string | null,
>     city_locality: string,
>     state_province: string,
>     postal_code: string,
>     country_code?: string,
>     address_residential_indicator?: unknown | yes | no
>   }
> }
> ```

**Output:** `string \| undefined`

***


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