摘要
通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。
引导式设置
2 分钟将 SHOPLINE 连接到 ChatGPT
开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 SHOPLINE,再把你的 MCP URL 添加到 ChatGPT。无需代码,也无需自行运行服务器。
无需信用卡 · 7 天试用 · 提供自托管方案
ChatGPT 插件目录中的 AnythingMCP 插件可在 AnythingMCP Cloud 上回答有关企业数据库的问题(PostgreSQL、MySQL、SQL Server、Oracle、SAP HANA、SQLite、MongoDB,只读):打开插件页面 (在新标签页中打开)并点击 Install plugin。其他所有连接器都以自定义 MCP 服务器的方式添加到 ChatGPT,使用你的 AnythingMCP MCP URL。
试试这样问
SHOPLINE 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 没有安装?直接使用 cloud.anythingmcp.com。 登录,点击 Connectors → SHOPLINE,粘贴你的凭据,生成一个 MCP API 密钥,完成。无需 Docker,无需
git clone,无需本地服务器。
SHOPLINE + ChatGPT
通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。
前提条件
请查看连接器中包含的完整设置说明(在选择连接器时可在应用内商店中查看)。此连接器所需的环境变量为:
SHOPLINE_HANDLE, SHOPLINE_ACCESS_TOKEN
第一步 — 获取凭据
设置大约需要 5 分钟。
- 登录到 SHOPLINE 管理后台
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 和更小的限制。
第二步 — 安装适配器
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
第三步 — 在 ChatGPT 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
ChatGPT 在网页版的 Plugins 页面把 MCP 服务器添加为插件,仅付费套餐可用,不再需要开发者模式。在 Business 工作区中只有管理员和所有者可以添加;在 Enterprise 和 Edu 中,管理员可以授予 Create plugins with MCPs 权限。
- 前往 chatgpt.com/plugins,点击 Add,然后选择 Add custom MCP server。
- 填写名称,例如 Name:
SHOPLINE。 - 在 Connection 下的 Server URL 中填入
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,Authentication 保持为 OAuth。 - 选择 I understand and want to continue,然后点击 Create as a plugin。ChatGPT 提示时,登录 AnythingMCP 并允许访问。
- 在个人插件中安装这个新插件,然后在对话中输入 @ 并选择它。
可用工具
| 工具 | 功能 |
|---|---|
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,status,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(销售、退款等),status,amount,currency,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,barcode,price,compare_at_price,option1 到 option5,weight,inventory_quantity,inventory_policy… |
shopline_update_variant | 更改变体:价格和比较价格(商店货币的十进制字符串),sku,barcode,weight 和 weight_unit… |
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,marketing consent 和地址 |
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 的所有订单。"
- "上个月哪些订单被退款,退款金额是多少?"
常见问题
它覆盖哪个 SHOPLINE? myshopline.com 上的商店,通过 SHOPLINE Admin REST API。旧的 SHOPLINE 平台 shoplineapp.com 有不同的 API,不在覆盖范围内。
访问令牌来自哪里? SHOPLINE 管理后台,Apps,Develop Apps:创建一个具有工具所需范围的私有应用,并从其 API 证书中复制访问令牌。也输入商店句柄。
哪些工具安装时关闭? 没有。交易和退款为只读,所有写入(订单备注、履行、跟踪、产品和库存更改)在运行之前都会显示给你。
ChatGPT 免费套餐能用自定义 MCP 服务器吗? OpenAI 只为付费套餐提供自定义 MCP 服务器的说明,Free 套餐不在其列。
下一步
这份指南对你有帮助吗?