返回顶部
s

squarespaceSquarespace

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
390
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

squarespace

Squarespace

通过托管 OAuth 认证访问 Squarespace Commerce API。管理产品、库存、订单、客户资料和交易。

快速开始

bash

列出所有产品(v2 API)


python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/squarespace/v2/commerce/products)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(User-Agent, MyClaude/1.0)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

基础 URL

https://gateway.maton.ai/squarespace/{native-api-path}

将 {native-api-path} 替换为实际的 Squarespace API 端点路径。网关将请求代理到 api.squarespace.com 并自动注入您的 OAuth 令牌。

认证

所有请求都需要在 Authorization 头中携带 Maton API 密钥:

Authorization: Bearer $MATONAPIKEY

环境变量: 将您的 API 密钥设置为 MATONAPIKEY:

bash
export MATONAPIKEY=YOURAPIKEY

获取您的 API 密钥

  1. 1. 在 maton.ai 登录或创建账户
  2. 前往 maton.ai/settings
  3. 复制您的 API 密钥

连接管理

在 https://ctrl.maton.ai 管理您的 Squarespace OAuth 连接。

列出连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=squarespace&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

创建连接

bash
python < import urllib.request, os, json
data = json.dumps({app: squarespace}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
connection: {
connection_id: 21fd90f9-5935-43cd-b6c8-bde9d915ca80,
status: ACTIVE,
creation_time: 2025-12-08T07:20:53.488460Z,
lastupdatedtime: 2026-01-31T20:03:32.593153Z,
url: https://connect.maton.ai/?session_token=...,
app: squarespace,
metadata: {}
}
}

在浏览器中打开返回的 url 以完成 OAuth 授权。

删除连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

指定连接

如果您有多个 Squarespace 连接,请使用 Maton-Connection 头指定要使用的连接:

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/squarespace/v2/commerce/products)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(User-Agent, MyClaude/1.0)
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

如果省略,网关将使用默认(最早)的活动连接。

API 参考

库存

列出所有库存

bash
GET /squarespace/1.0/commerce/inventory

查询参数:

  • - cursor(可选):来自先前响应的分页游标

响应:
json
{
inventory: [
{
variantId: 5ba1418df4204bb2d21eac3f,
sku: SQ0001,
descriptor: 产品名称 - 尺寸:中号,
isUnlimited: false,
quantity: 25
}
],
pagination: {
hasNextPage: true,
nextPageCursor: abc123,
nextPageUrl: https://api.squarespace.com/1.0/commerce/inventory?cursor=abc123
}
}

获取特定库存

bash
GET /squarespace/1.0/commerce/inventory/{variantIds}

  • - {variantIds}:逗号分隔的变体 ID(最多 50 个)

调整库存数量

bash
POST /squarespace/1.0/commerce/inventory/adjustments
Content-Type: application/json
Idempotency-Key: unique-key-here

{
incrementOperations: [{variantId: variant-id-1, quantity: 5}],
decrementOperations: [{variantId: variant-id-2, quantity: 2}],
setFiniteOperations: [{variantId: variant-id-3, quantity: 100}],
setUnlimitedOperations: [variant-id-4]
}

响应: 成功时返回 204 No Content



订单

列出所有订单

bash
GET /squarespace/1.0/commerce/orders

查询参数:

  • - customerId(可选):按客户 ID 筛选
  • modifiedAfter(条件性):ISO 8601 日期时间(例如 2024-01-01T00:00:00Z)- 与 modifiedBefore 一起使用
  • modifiedBefore(条件性):ISO 8601 日期时间 - 与 modifiedAfter 一起使用
  • cursor(可选):分页游标
  • fulfillmentStatus(可选):PENDING、FULFILLED 或 CANCELED

注意:不能将游标与日期范围参数结合使用。日期筛选器必须同时使用。

响应:
json
{
result: [
{
id: order-id,
orderNumber: 1001,
createdOn: 2024-01-15T10:30:00Z,
modifiedOn: 2024-01-15T12:00:00Z,
channel: web,
testmode: false,
customerEmail: customer@example.com,
fulfillmentStatus: PENDING,
lineItems: [...],
subtotal: {value: 99.99, currency: USD},
shippingTotal: {value: 9.99, currency: USD},
taxTotal: {value: 8.50, currency: USD},
grandTotal: {value: 118.48, currency: USD}
}
],
pagination: {
hasNextPage: true,
nextPageCursor: abc123,
nextPageUrl: ...
}
}

获取特定订单

bash
GET /squarespace/1.0/commerce/orders/{orderId}

创建订单

bash
POST /squarespace/1.0/commerce/orders
Content-Type: application/json
Idempotency-Key: unique-key-here

{
channelName: 外部商店,
externalOrderReference: ORDER-12345,
customerEmail: customer@example.com,
lineItems: [
{
lineItemType: PHYSICAL_PRODUCT,
variantId: variant-id,
quantity: 2,
unitPricePaid: {currency: USD, value: 29.99}
}
],

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 squarespace-1776298484 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 squarespace-1776298484 技能

通过命令行安装

skillhub install squarespace-1776298484

下载

⬇ 下载 squarespace v1.0.0(免费)

文件大小: 6.76 KB | 发布时间: 2026-4-16 16:11

v1.0.0 最新 2026-4-16 16:11
Squarespace commerce management skill initial release.

- Integrates Squarespace Commerce API via Maton with managed OAuth.
- Supports product, inventory, order, customer, and transaction management through a secure gateway.
- Includes code samples for connecting, listing, creating, and managing Squarespace OAuth connections.
- Provides detailed API usage and authentication instructions.
- Allows multiple store connections using the Maton-Connection header.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部