API 参考 · 2. 文档准备 · getDocument

读取文档元数据

GET/open/v1/documents/{doc_id}scope: document.read

请求

鉴权:请求头 X-Aistrong-Key;可选 X-Request-Id 贯穿追踪。

参数

名称位置类型约束说明
doc_id必填路径integer≥1

响应

JSON 响应统一为信封结构:success / data / error / metering / request_id;下表描述 data。

200请求已成功处理application/json
字段类型约束说明
dataobject不接受额外字段
doc_id必填integer≥1
name必填string长度≥1;长度≤255
extension必填string | null长度≤32
size必填integer | null≥0
sha256必填string | null正则 ^[0-9a-f]{64}$
owner_ref必填string | null长度≤128
total_pages必填integer≥0
doc_type必填string | null长度≤32单证形态类型(平台封闭枚举,如 vat_invoice/id_card;null=未判定,按 general 处理)。
created_at必填string(date-time) | null(date-time)
directory_id必填integer | null≥1
busi_idstring | null长度≤128外部渠道业务标识(可选,P0-3 恢复按 busi_id 查询链路)。

错误状态

HTTP含义
400请求参数无效
401API Key 无效
403API Key 无权限
404文档、任务或其他资源不存在
500服务内部异常
502上游服务异常
503能力暂不可用
504上游服务超时

错误体的 error.code 取值见错误码。