Digicust API

Digicust API

REST、SFTP、电子邮件、MCP 和 Webhooks。所有 Digicust 集成模式汇聚一处。选择最适合您技术栈的模式并开始交付。

两步快速入门

大多数集成可在一下午内完成。创建范围限定的API密钥,将您的客户端指向欧盟基础URL,即可开始发送案例。

1. 创建 API 密钥

直接在平台内生成可限定范围、可撤销的 API 密钥。用于服务器间集成、ERP 数据馈送或自动化脚本。

打开平台

2. 浏览 OpenAPI 规范

在交互式 Swagger UI 中浏览每个端点,或下载完整的 OpenAPI 3.0 规范(JSON 或 YAML 格式)。

打开Swagger UI
Authentication

机器使用API密钥,人员使用会话

使用API密钥进行服务器间集成,使用会话令牌用于用户端应用。两者均通过相同的端点进行身份验证;选择最适合您工作流的方式即可。

  • API密钥 以 `dgc_` 为前缀,按项目划分范围,并可从平台撤销。
  • 会话令牌 由 Digicust 原生身份验证为 Web 应用、Excel 插件及任何已登录用户签发。
  • 标题 发送 `Authorization: Bearer <key>` 或 `X-API-Key: <key>`。两者均可接受。
已认证请求
curl -X GET "https://api.eu.digicust.com/api/{orgId}/{projectId}/cases" \
  -H "Authorization: Bearer dgc_1234567890abcdef1234567890abcdef"
REST API

Full REST API with OpenAPI 3.0

通过标准 REST 调用所有 Digicust 功能。案例、对话、策略、集成、映射、MCP 服务器、API 密钥、归类和贸易合规检查均可通过相同的身份验证和格式进行访问。

  • Authenticate with `Authorization: Bearer dgc_…` API keys or a session token from the Digicust login.
  • One-step `cases/create-and-process` accepts files plus metadata in a single multipart request.
  • Async `classify-batch` for large catalogues with WebSocket progress events.
  • Polling and webhook patterns documented with copy-paste JS and Python examples.
  • Full OpenAPI spec downloadable as JSON or YAML.
打开Swagger UI
api.eu.digicust.com/docs
Swagger UI

Digicust API

v3.0.0 · OpenAPI 3.0 · api.eu.digicust.com

按标签、路径或操作筛选
cases
  • POST/{orgId}/{projectId}/cases/create-and-process

    请求主体 (multipart)

    • filesFile[]
    • caseDataJSON
    • strategyIdstring
    • messagestring

    响应

    • 200案例已创建并开始处理
    • 401API密钥缺失或无效
    • 429超出速率限制
    cURLmultipart/form-data
    curl -X POST "https://api.eu.digicust.com/api/{orgId}/{projectId}/cases/create-and-process" \
      -H "Authorization: Bearer dgc_your-api-key" \
      -F "files=@invoice.pdf" \
      -F 'caseData={"reference":"CASE-2026-001"}'
  • GET/{orgId}/{projectId}/cases/{caseId}
  • POST/{orgId}/{projectId}/classify-batch
  • POST/{orgId}/{projectId}/trade-compliance/check
  • POST/{orgId}/{projectId}/integrations
  • GET/organizations/{orgId}/projects/{projectId}/api-keys
13个标签 · 82项业务
SFTP

SFTP for legacy file flows

当ERP、报关行或合作伙伴仅支持文件交互时,Digicust会将处理后的案例放入SFTP,并从监控文件夹中获取新案例。相同的流水线,相同的审计追踪,无需学习新模式。

  • Outbound: push processed declarations, structured payloads or PDF outputs to your SFTP server.
  • Pre-built SFTP profiles for Scope, DAKOSY, E2OPEN, MERCURIO and DBH.
  • Inbound: drop documents into a strategy folder; Digicust creates the case automatically.
  • Password and key-based authentication with optional passphrase.
  • Optional FTP fallback for partners that have not migrated to SFTP.
Configure an SFTP integration
{
  "name": "Export to SFTP",
  "type": "SFTP",
  "enabled": true,
  "config": {
    "sftp": {
      "host": "sftp.example.com",
      "port": 22,
      "username": "sftp-user",
      "privateKeyBase64": "LS0tLS1CRUdJTi…",
      "remotePath": "/exports/customs"
    }
  }
}
电子邮件

Email gateway for documents and follow-ups

每个策略都有自己的接收邮箱;每个案例都有自己的跟进地址。发送 PDF、EML、MSG 甚至照片,Digicust 即可开启案例、解析附件、对货物进行归类,并以您团队的口吻回复。

  • Per-strategy ingest address creates new cases automatically.
  • Per-case reply address attaches incoming mail to the open case.
  • Document control agent can chase suppliers, brokers or carriers in their own language.
  • Notifications on processing start, completion and SLA breaches.
  • Custom email gateway endpoint for teams that want to relay through their own MTA.
邮件 · Digicust

Re: Invoice INV-2026-0481 + packing list

ASALPHATEX SRL·To: imports-de@routing.digicust.exampleToday 09:14
自动附加到案例 DE-IMP-2026-0481

您好,

请查收发票 INV-2026-0481 的更正装箱单。第 3 行的尺寸已按您的要求更新。

顺颂商祺,
ALPHATEX SRL · logistics desk

1个附件

PDF

packing-list-INV-2026-0481.pdf

168 KB · 由Digicust代理解析

已摄入 09:14 · 案例更新于 09:14
MCP

Model Context Protocol, first-class

Digicust 支持 MCP,这是一种将人工智能代理连接到外部工具的开放协议。插入您自己的 MCP 服务器以使用自定义工具和数据源扩展 Digicust 代理,或将 Digicust 的海关工具暴露给您自己的大语言模型应用。

  • SSE, HTTP and stdio transports supported.
  • Bring your own auth: bearer token, API key or basic.
  • Per-strategy enabling so the agent only sees the tools it should use.
  • Available tools surface live during case processing, no redeploy required.
  • Use the Digicust MCP server from any LLM app to run customs workflows on demand.
Register an MCP server
{
  "name": "Custom Tools Server",
  "transport": "sse",
  "url": "https://your-mcp-server.com/sse",
  "auth": { "type": "bearer", "token": "your-mcp-token" },
  "enabled": true
}
Webhooks

Webhooks for outbound events

在案件处理、发现问题或触发策略事件时立即获得通知。Webhook 可按策略进行配置,并可与映射配合使用,以交付您的系统所期望的精确负载。

  • POST/PUT/GET/DELETE delivery with custom headers.
  • None, Basic, Bearer or Keycloak OAuth2 authentication.
  • Pair with a mapping to transform the case into your downstream schema.
  • Automatic retries (3 attempts, 60s timeout) with delivery audit log.
  • Receive base64-encoded attachments alongside the structured payload.
Webhook payload (excerpt)
{
  "caseId": "6501234567890abcdef12345",
  "reference": "CASE-2026-001",
  "timestamp": "2026-01-15T10:35:00Z",
  "data": {
    "invoiceNumber": "INV-2026-001",
    "items": [
      { "description": "Widget A", "hsCode": "8473.30.20", "value": 2550.00 }
    ]
  }
}

海关编码归类API

包含依据、备选方案及海关预归类决定(BTI)参考的HS编码

单项或批量(最多 10 项)归类,提供明确的 GR1 至 GR6 依据、置信度分数和替代编码。对于整个目录,请使用带有 WebSocket 进度事件的异步批量端点。

对商品描述进行归类
curl -X POST "https://api.eu.digicust.com/api/{orgId}/{projectId}/tools/tariff-classification" \
  -H "Authorization: Bearer dgc_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{ "goodsDescription": "USB-A to USB-C cable, 2m, copper" }'

贸易合规API

制裁、两用物项、禁运、CBAM、美国再出口

一个端点即可运行货物检查(出口/进口管制、禁运、CBAM、美国再出口)及全球受限方名单筛查,并提供结构化风险评分。

检查商品与当事人
curl -X POST "https://api.eu.digicust.com/api/{orgId}/{projectId}/trade-compliance/check" \
  -H "Authorization: Bearer dgc_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "itemChecks": [{ "customsTariffNumber": "8456301000", "destinationCountry": "CN" }],
    "partyChecks": [{ "name": "Acme Corporation Ltd.", "role": "buyer" }]
  }'

为生产环境打造

全球覆盖

为 ATLAS、AES、NCTS、ASYCUDA、DAKOSY、AEB、Format、Scope、Mercurio 等系统提供覆盖 30 多个国家的申报就绪数据。

异步 + 同步

用于短时调用的同步端点,用于批处理和长时间分类任务的异步流水线,并支持WebSocket进度事件。

企业级安全

API 密钥加基于会话的身份验证、作用域密钥、即时撤销、针对每个操作的审计日志,以及符合 GDPR 的欧盟托管。

安全提示: 请勿将API密钥置于客户端代码中,定期轮换密钥,并撤销任何可能泄露的密钥。若怀疑密钥泄露,请联系支持团队。密钥可即时撤销。

准备好集成了吗?

生成 API 密钥并从沙盒项目开始,或者先与我们沟通最适合您技术栈的集成方案。