Skip to main content
POST
/
v1
/
docs
/
upload
/
form
Upload Doc By Form
curl --request POST \
  --url https://api.reportify.cn/v1/docs/upload/form \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'folder_id=<string>' \
  --form 'name=<string>' \
  --form 'metadatas=<string>' \
  --form published_at=123 \
  --form 'tags=<string>' \
  --form file=@example-file
{
  "id": "<string>",
  "title": "<string>",
  "original_url": "<string>"
}

同步上传文档

URL: /v1/docs/upload/form
方法: POST
Content-Type: multipart/form-data 描述: 同步上传单篇报告文档至指定文件夹。

请求参数

参数名类型描述
filestr(file)文件。
folder_idstr目标文件夹 ID。
namestr文档名称。
tagsstr标签 (JSON 字符串)。
metadatasstr元数据 (JSON 字符串)。
published_atstr发布时间,格式为 millisecond timestamp 1712832000000
tags 和 metadatas 的格式为 JSON 字符串,示例如下:
'{"tags": "{\"industry\": \"科技\", \"company\": \"特斯拉\"}}'
'{"metadatas": "{\"periods\": \"Q4 2023\", \"entities\": [\"Tesla Inc.\", \"TSLA\"]}"}'

响应参数

参数名类型描述
idstr文档唯一 ID
titlestr文档标题
original_urlstr文档URL

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required
folder_id
string

Folder ID, if you do not pass it, use the default folder

name
string

File name, if you do not pass it, use the file name in the URL

metadatas
string

metadatas json string, example: {"period": "2023Q4", "entities": ["companyA", "companyB"]}

published_at
integer

Document release time, millisecond time stamp

tags
string

Document tag list, json string, example: {"key": ["value1", "value2"]}

Response

Successful Response

id
string
required
title
string
required
original_url
string
required
I