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

# Shippo

> Shippo 可帮助你通过已连接的账户创建运输标签、跟踪包裹并管理运输操作。

# Shippo

当你需要订单、标签或跟踪的运输数据时，可以使用 Shippo。它在结账之后、订单更新之后或履约步骤之后都很适合使用。

## 配置

| 选项 | 必填 | 描述 |
| - | - | - |
| 名称 | 否 | 工作流画布中此步骤的标签。 |
| 身份验证 | 是 | 此步骤要使用的已连接 Shippo 账户。 |
| 操作 | 是 | 要执行的 Shippo 操作（例如 Create address、Get address、Validate address、Create parcel）。 |
| 参数 | 是 | 根据操作的 schema 生成的每个操作表单字段。每个文本字段都有一个 **Insert Variable** 按钮，可用于插入 `{{placeholder}}` 值。高级用法可使用 **Raw JSON** 选项卡。 |
| 步骤失败时 | 否 | 控制此步骤失败时工作流应 **Terminate Workflow** 还是 **Continue**。 |

在配置此步骤之前，请通过登录流程在你的工作区的 **Integrations** 中连接 Shippo。若没有可用的活动连接，该步骤会显示一个警告，并提供指向 **Integrations** 的链接，而不是账户选择器。

## 参数表单

当你选择一个操作时，**Arguments** 部分会根据该操作的输入 schema 渲染一个表单。引用现有记录的字段包含下拉选择器。

如果你更喜欢手动编写完整的参数对象，请切换到 **Raw JSON** 选项卡。任一选项卡中的更改都会保持同步。

## 常用操作

| 操作 | 描述 |
| - | - |
| **Create address** | 在 Shippo 中创建一个新地址。 |
| **Get address** | 检索之前创建的地址。 |
| **Validate address** | 检查地址是否有效。 |
| **Create parcel** | 创建带有尺寸和重量的包裹。 |
| **Get parcel** | 根据 ID 检索包裹。 |
| **Create shipment** | 使用起点、目的地和包裹创建新的货件。 |
| **Get shipment** | 根据 ID 检索货件。 |
| **List shipment rates** | 列出该货件可用的运输费率。 |
| **Create transaction** | 购买运输标签交易。 |
| **Get transaction** | 根据 ID 检索运输标签交易。 |
| **Register tracking webhook** | 为货件注册一个跟踪 webhook。 |
| **Get tracking status** | 检索货件的跟踪状态。 |
| **Create order** | 在 Shippo 中创建一个新订单。 |
| **Get order** | 从 Shippo 检索订单。 |
| **List orders** | 列出账户中的所有订单。 |

像删除记录这样的破坏性操作不在工作流操作选择器中提供。

## 输出

此步骤会将 Shippo 响应保存为步骤输出。响应的结构取决于操作。

在后续步骤中使用完整输出引用：

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

## 示例

1. 打开 **Integrations**，如果你还没有这样做，就连接 Shippo。
2. 将一个 **Shippo** 步骤添加到你的工作流中。
3. 在 **Authentication** 中选择一个已连接账户。
4. 在 **Action** 中选择 **Create address**。
5. 填写必填字段。使用 **Insert Variable** 来引用前一步输出中的任意字段值。
6. 点击步骤标题栏中的 **Run** 来测试该操作，然后在 **Output** 中查看返回的载荷。

## 使用场景

### 创建运输标签

1. Create address
2. Create parcel
3. Create shipment
4. List shipment rates

### 跟踪订单货件

1. Create track
2. Get tracking status
3. Get transaction

### 处理新订单

1. Create order
2. Get order
3. Create shipment
4. Create transaction

## 说明

* 此步骤依赖于你工作区中已连接的 Shippo 集成。
* 工作流操作选择器会显示一组精选操作。拥有 Shippo 工具的代理可以使用更多操作。
* 登录界面可能会显示第三方授权品牌信息。

## 将 Shippo 作为代理工具使用

你也可以在 **Agent Editor** 中将 Shippo 作为工具添加。打开代理，点击 **Add tool**，然后选择 **Shippo**。在工具设置面板中，选择代理应使用的已连接账户。代理会在与对话相关时调用 Shippo 操作。

另见：[Integrations](https://docs.fetchhive.com/zh/workspace/integrations.md)、[Creating and Editing](https://docs.fetchhive.com/zh/workflows/creating-and-editing.md) 和 [Testing and Iteration](https://docs.fetchhive.com/zh/workflows/testing-and-iteration.md)


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