摘要
InPost ShipX API 适用于波兰:查找 Paczkomat 自助寄存柜和取件点,列出和追踪货件,下载标签,计算价格,读取快递取件订单和货到付款报告。创建和购买货件以及订购快递包含在内但已关闭。API 令牌和组织 ID 来自 Manager Paczek。
引导式设置
2 分钟将 InPost 连接到 Claude、ChatGPT 或 Copilot
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 InPost,再把你的 MCP URL 添加到你的 AI 助手。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
InPost 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 不想安装?直接使用 cloud.anythingmcp.com。 登录,点击 Connectors → InPost,粘贴你的凭据,生成一个 MCP API 密钥,完成。无需 Docker,无需
git clone,无需本地服务器。
InPost
InPost ShipX API 适用于波兰:查找 Paczkomat 自助寄存柜和取件点,列出和追踪货件,下载标签,计算价格,读取快递取件订单和货到付款报告。创建和购买货件以及订购快递包含在内但已关闭。API 令牌和组织 ID 来自 Manager Paczek。
设置
设置大约需要 5 分钟。
- 登录到 Manager Paczek,网址为 https://manager.paczkomaty.pl。
- 打开 Moje konto(我的账户)、Dane(数据),确保公司地址和发票数据完整。没有这些信息,InPost 不会发放 API 访问权限。
- 打开 Moje konto,选项卡 API,展开 API ShipX 并点击 Generate。如果你有快递合同,请勾选框并输入合同编号;仅使用自助寄存柜服务则只需点击生成。
- 点击 Pokaż token(显示令牌)并将令牌复制到
INPOST_TOKEN。最多可以存在 10 个令牌。 - 将我的账户中显示的 Organization ID 复制到
INPOST_ORGANIZATION_ID。
令牌作为 Bearer 令牌发送。它是生产令牌:来自 sandbox-manager.paczkomaty.pl 的沙盒令牌仅在沙盒主机上工作,此处拒绝。
从哪里开始:inpost_get_organization 显示你的合同服务。inpost_list_shipments 列出你的货件,inpost_track_shipment 通过追踪号码跟踪一个货件,inpost_search_points 查找自助寄存柜。
自助寄存柜和取件点:inpost_search_points 使用相同的令牌读取 https://api.inpost.pl/v1/points 的点服务。对于“最近的自助寄存柜”,传递 relative_post_code(或带坐标的 relative_point)以及 sort_by distance_to_relative_point;距离以米为单位。点的 name(例如 KRA010)是货件作为 target_point 的内容。只有 status 为 Operating 的点接受包裹。
参考数据:inpost_list_services(服务 ID 及其附加服务)、inpost_list_sending_methods(包裹交接方式:在自助寄存柜、在取件点或由快递员收集)和 inpost_list_statuses(每个状态代码及其在英语或波兰语中的用户友好文本)。
货件:inpost_list_shipments 和 inpost_get_shipment 使用 ShipX id;inpost_track_shipment 使用 24 位追踪号码。货件的状态为 created、offers_prepared、offer_selected、confirmed;从 confirmed 开始,它有一个追踪号码,inpost_get_shipment_label 返回其标签作为 PDF、ZPL 或 EPL 文件。追踪历史保留 45 天。inpost_calculate_shipment_prices 在不创建货件的情况下计算价格。
创建货件(已关闭):inpost_create_shipment 在同一调用中购买货件,除非 only_choice_of_offer 为 true,inpost_buy_shipment 为未付款的已创建货件付款,inpost_cancel_shipment 仅在付款前有效(状态为 created 或 offers_prepared)。已购买的货件无法通过 API 取消。创建是异步的:在确认之前请再次读取货件。自助寄存柜包裹需要接收者的电话和电子邮件、template 尺寸和 custom_attributes.target_point;快递包裹需要接收者地址及其尺寸(以毫米为单位)和重量(以千克为单位)。
快递取件:inpost_list_dispatch_orders 和 inpost_get_dispatch_order 读取取件订单,inpost_calculate_dispatch_order_price 计算一个订单的价格。inpost_create_dispatch_order 以费用订购快递,inpost_cancel_dispatch_order 取消状态为 new 或 sent 的订单;两者均已关闭。
资金:金额以 PLN 为单位。预付客户从在 Manager Paczek 中充值的余额中支付,当余额过低时,货件确认失败。按账户计费的客户(借记客户)在各处获得 rate 和价格为 null。inpost_get_cod_report 返回快递货件的货到付款报告,格式为 CSV。
格式:邮政编码为 NN-NNN,电话号码为 9 位数字,不带 +48,时间为 ISO 8601 格式,带波兰时区偏移。列表返回 count、page、per_page 和 items;将 page 增加到达到 total_pages 或空的 items。一个过滤器的多个值用逗号分隔。
错误:InPost 的响应包含 status、error(如 validation_failed、invalid_parameter、resource_not_found、access_forbidden、invalid_action、offer_expired)、描述和 details,命名字段及原因,如必需、无效或过长。连接器要求使用英语消息。401 表示令牌错误,access_forbidden 表示令牌不属于此组织 ID。InPost 不发布 ShipX 的速率限制;避免在紧密循环中轮询。
先决条件:INPOST_TOKEN、INPOST_ORGANIZATION_ID
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 InPost 并粘贴在先决条件下列出的环境变量。
可用工具
| 工具 | 功能 |
|---|---|
inpost_get_organization | 读取你的 InPost 组织:id、name、tax_id,你合同允许的 services 列表(例如 inpost_locker_standard… |
inpost_search_points | 查找 InPost Paczkomat 包裹自助寄存柜和 PaczkoPunkt 取件点。返回 count、page、per_page、total_pages 和 items,每个… |
inpost_list_services | 列出 InPost 服务 ShipX 知道的,每个都有 id(例如 inpost_locker_standard、inpost_courier_standard)、name、description 和其… |
inpost_list_sending_methods | 列出包裹交给 InPost 的方式:parcel_locker(在 Paczkomat 投递)、dispatch_order(快递员收集)、pop(包裹点)… |
inpost_list_statuses | 列出 ShipX 使用的每个货件状态及其 name(在货件和追踪中找到的代码,例如 ready_to_pickup)、简短的 title… |
inpost_list_shipments | 列出你组织的货件,最新的在前。返回 count、page、per_page 和 items,每个都有 id、status… |
inpost_get_shipment | 通过其 ShipX id 读取一个货件:status、tracking_number(以及一旦返回给发件人的 return_tracking_number)… |
inpost_track_shipment | 通过追踪号码追踪 InPost 货件。返回 status(当前状态代码)、service、custom_attributes(包裹尺寸… |
inpost_calculate_shipment_prices | 在不创建货件的情况下计算一个或多个货件的价格。返回每个货件的 id、calculated_charge_amount(总计)… |
inpost_get_shipment_label | 下载已购买货件的标签(状态为 confirmed 或更晚)作为文件:默认 PDF,或 ZPL 或 EPL 用于热敏… |
inpost_list_dispatch_orders | 列出你组织的快递取件订单(调度订单)。返回 count、page、per_page 和 items,每个都有 id… |
inpost_get_dispatch_order | 读取一个快递取件订单:id、status、external_id(快递员的订单号,在 InPost 处理订单后填写)… |
inpost_calculate_dispatch_order_price | 为一组已购买货件计算快递取件价格,而不进行订购。返回 total_success_count、total_error_count、total_price… |
inpost_get_cod_report | 下载指定日期范围的货到付款报告,格式为 CSV 文本。列:日期、客户编号、发件人、收件人、收件人邮政编码… |
inpost_create_shipment | 以简化模式创建货件。除非 only_choice_of_offer 为 true,否则 InPost 会立即购买货件:价格来自… |
inpost_buy_shipment | 为未付款的货件付款(报价模式,或 only_choice_of_offer):InPost 收取所选报价的价格,因此… |
inpost_cancel_shipment | 取消尚未购买的货件:它必须处于状态 created 或 offers_prepared,否则 InPost 会返回 invalid_action。… |
inpost_create_dispatch_order | 订购快递在一个地址收集已购买的货件(调度订单)。InPost 根据你的价格表收取取件费用,因此… |
inpost_cancel_dispatch_order | 取消快递取件订单。只有状态为 new 或 sent 的订单可以取消;否则 InPost 会返回 invalid_status。无法… |
示例提示
- “查找邮政编码 00-950 Warszawa 附近的三个 Paczkomat 自助寄存柜。”
- “我的 InPost 货件 520000012345678901234567 在哪里?”
- “列出我上周未送达的货件。”
- “我合同中 B 尺寸自助寄存柜包裹的费用是多少?”
- “显示十月份的货到付款报告。”
下一步
这份指南对你有帮助吗?