摘要
通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。
引导式设置
2 分钟将 SHOPLINE 连接到 Claude、ChatGPT 或 Copilot
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 SHOPLINE,再把你的 MCP URL 添加到你的 AI 助手。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
试试这样问
SHOPLINE 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 不需要安装?直接使用 cloud.anythingmcp.com。 登录,点击 Connectors → SHOPLINE,粘贴你的凭据,生成一个 MCP API 密钥,完成。无需 Docker,无需
git clone,无需本地服务器。
SHOPLINE
通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。
设置
设置大约需要 5 分钟。
- 登录到 SHOPLINE Admin,访问
https://admin.myshopline.com,打开 Apps,然后选择 Develop Apps(右上角),创建一个私有应用。 - 为工具所需的访问范围提供权限:
read_orders、write_orders、read_products、write_products、read_customers、read_inventory、write_inventory、read_location、read_assigned_fulfillment_orders和write_assigned_fulfillment_orders(仅读取权限足以满足读取工具的需求)。 - 打开应用的 API 证书,将 访问令牌 复制到
SHOPLINE_ACCESS_TOKEN。私有应用令牌有效期为 3 年,可以在此处刷新;删除应用将撤销令牌。 - 在
SHOPLINE_HANDLE中输入商店句柄,即<handle>.myshopline.com的第一部分。
从哪里开始:使用 shopline_list_orders 和 status 为任何状态(并在查找已发货订单时使用 fulfillment_status),然后使用 shopline_list_order_fulfillments。对于产品,使用 shopline_list_products、shopline_get_product 和 shopline_list_product_variants。
订单:shopline_list_orders、shopline_count_orders、shopline_update_order(标签、联系人、备注、送货地址)、shopline_list_order_transactions、shopline_list_order_refunds。id 是订单 ID;name 是客户看到的订单号(1001 及以上,可以有可选前缀)。取消和退款不包括在内,因为它们会退还资金。
发货:shopline_create_fulfillment 使用跟踪号码发货,shopline_list_order_fulfillments 列出发货,shopline_update_fulfillment_tracking 替换一个发货的跟踪列表(发送所有条目,其余条目将被清除)。
产品:shopline_list_products、shopline_get_product、shopline_count_products、shopline_update_product(状态为活动时发布,草稿时隐藏)、shopline_list_product_variants、shopline_update_variant(价格、对比价格、SKU、条形码)。标签以列表形式输入,并以逗号分隔的字符串返回。每个变体最多有五个选项。
客户:shopline_list_customers、shopline_get_customer、shopline_search_customers、shopline_list_customer_orders。
库存:每个变体都有一个 inventory_item_id。shopline_list_locations、shopline_get_inventory_items、shopline_get_inventory_levels,然后使用 shopline_set_inventory(绝对值)或 shopline_adjust_inventory(增量)。
分页:列表使用游标。当有下一页时,响应中会包含 _pagination.nextUrl;传递其 page_info 值,保持相同的限制。最后一页没有 _pagination。
ID 和格式:ID 是长数字字符串(26 位数字):始终将其作为文本传递。时间为 ISO 8601 格式;价格为商店货币的十进制字符串。
速率限制:每个应用和商店每秒 4 个请求,突发可达 40 个排队;超过此限制,SHOPLINE 将返回 429 请求过多。响应大小限制为 8 MB,因此对于大型商店,请使用 fields 和较小的限制。
先决条件:SHOPLINE_HANDLE、SHOPLINE_ACCESS_TOKEN
本地安装连接器
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,选择 SHOPLINE 并粘贴在先决条件下列出的环境变量。
可用工具
| 工具 | 功能 |
|---|---|
shopline_list_orders | 列出订单:id、name(订单号,如 1001)、order_at、financial_status、fulfillment_status、status、currency、current_total_price… |
shopline_count_orders | 计算符合过滤条件的订单(状态、支付、发货、日期):返回计数。只读 |
shopline_update_order | 更改订单的标签、买家电子邮件或电话、商家备注(note_attributes)或送货地址。仅发送给定字段;标签… |
shopline_list_order_fulfillments | 列出订单的履行(发货):id、状态、tracking_company、tracking_number、tracking_url、line_items 和 created_at |
shopline_create_fulfillment | 发货订单(全部或给定的行项目),附带跟踪号码和承运人。notify_customer 发送发货电子邮件。响应… |
shopline_update_fulfillment_tracking | 替换履行的跟踪信息。列表替换存储的内容:遗漏的跟踪条目将被删除 |
shopline_list_order_transactions | 列出订单的支付交易:id、kind(销售、退款等)、状态、金额、货币、gateway 和 processed_at。只读 |
shopline_list_order_refunds | 列出订单的退款:id、created_at、note、refund_line_items 和金额的交易。只读 |
shopline_list_products | 列出产品:id、title、handle、status(活动、草稿、归档)、vendor、tags、product_category、created_at、updated_at、options 和… |
shopline_get_product | 读取一个产品:title、body_html、status、vendor、tags、handle、options、images、media 和带有价格、sku、条形码、重量的变体… |
shopline_count_products | 计算符合过滤条件的产品(状态、集合、日期):返回计数。只读 |
shopline_update_product | 更改产品:title、subtitle、description(body_html)、status(活动发布、草稿隐藏、归档归档)、vendor、tags… |
shopline_list_product_variants | 列出产品的变体:id、sku、条形码、价格、对比价格、option1 到 option5、重量、库存数量、库存政策… |
shopline_update_variant | 更改变体:价格和对比价格(商店货币的十进制字符串)、sku、条形码、重量及重量单位… |
shopline_list_customers | 列出客户:id、email、phone、first_name、last_name、state、tags、orders_count、total_spent、accepts_marketing、addresses 和… |
shopline_get_customer | 读取一个客户:email、phone、names、state、tags、note、orders_count、total_spent、营销同意和地址 |
shopline_search_customers | 按名称、电子邮件、电话或地址文本(query_param)搜索客户,或按标签或 orders_count(query)等精确标准搜索。相同… |
shopline_list_customer_orders | 列出一个客户的订单,具有与 shopline_list_orders 相同的订单字段。每页最多 100 个 |
shopline_list_locations | 列出库存位置(仓库和商店):id、name、address、active 及是否为默认位置 |
shopline_get_inventory_items | 读取库存项目(每个变体一个):id、sku、tracked、cost 和原产国。每个变体都有 inventory_item_id |
shopline_get_inventory_levels | 读取每个库存项目和位置的可用库存:inventory_item_id、location_id、available 和 updated_at |
shopline_set_inventory | 将库存项目在某个位置的可用库存设置为绝对数字(替换当前数量) |
shopline_adjust_inventory | 按增量更改库存项目在某个位置的可用库存:正数增加,负数减少 |
示例提示
- "本周有多少个 SHOPLINE 订单,多少个未履行?"
- "将 DHL 跟踪 1234567890 添加到订单 #1052 的履行中。"
- "哪些变体在我们的主要位置少于 5 个单位?"
- "显示客户 Anna Berg 的所有订单。"
- "上个月哪些订单被退款,退款金额是多少?"
下一步
这份指南对你有帮助吗?