登录注册

企业 API

用于 ERP 同步的版本化 REST API。使用 Authorization: Bearer gcn_live_… 或 gcn_test_… 认证。在 Business 控制台创建密钥。

初次使用?请从合作伙伴入门清单开始。

基础 URL

/api/v1

机器可读 OpenAPI: /api/v1/openapi

Postman 集合: 下载 / 导入

核心端点

  • GET /meorg + scopes
  • GET|POST /listings, /listings/bulk
  • GET|POST /inventory, /inventory/bulk (syncMode: upsert|replace)
  • /freight, /freight/bulk · /depots, /depots/bulk · /storage, /storage/bulk · /manufacturers, /manufacturers/bulk · /ports, /ports/bulk
  • /inquiries, /inquiries/{id}/reply
  • /organization, /webhooks, /bulk/{jobId}

权限范围

新密钥默认拥有全部 scope。可通过数据模型细粒度限制。

  • listings:read
  • listings:write
  • inventory:read
  • inventory:write
  • freight:read
  • freight:write
  • depots:read
  • depots:write
  • storage:read
  • storage:write
  • manufacturers:read
  • manufacturers:write
  • ports:read
  • ports:write
  • inquiries:read
  • inquiries:write
  • org:read
  • org:write
  • webhooks:manage
  • bulk:write

合作伙伴快速入门

目录同步(全部模块)、询盘与 webhook 的逐步 curl 示例:

docs/api-partner-guide.md

就绪探测: /api/v1/ready

说明

  • 未验证组织:创建内容保持 PENDING,直至管理员批准。
  • 已验证组织:API 创建/更新自动发布为 ACTIVE
  • 使用 externalId + Idempotency-Key 保证 ERP 重试安全。
  • 批量最多 200 条/请求;webhook 最多重试 3 次并退避。
  • Webhook 使用 HMAC 签名(x-gcn-signaturex-gcn-timestamp)。

检查…