AIFENG DCS · 一键数据导入中心

26 个系统模块 · CSV / Excel / JSON 智能导入 · 校验 → 预览 → 入库 → 可回滚

模拟数据 · 本中心任务台账为 sim_v81 演示数据;执行导入/回滚等高风险动作一律 Human-Gate 待批,绝不真实执行。

🔌 API 导入文档

每个模块都提供 REST 导入端点:POST /api/import/{module},支持 CSV / Excel / JSON 正文上传。所有 API 导入同样走 校验 → 预览 → Human-Gate 批准 → 入库 流程,绝不绕过审批直接写库。

⚠️ 注意:API 导入属高风险写操作,端点收到文件后仅创建校验任务,入库必须经 Human-Gate 批准。

👥 客户🖨️ 产品🧾 订单💳 付款📦 库存🏭 供应商🛒 采购🛠️ 售后📚 知识库⚙️ 配件♻️ 回收🎨 POD 设计💬 消息联系人☁️ 云盘文件💰 财务报表🗺️ 地图客户👷 技术员🏪 商户🚚 物流🧮 税务🔍 审计🔐 权限📣 营销📊 报表📈 仪表🌐 生态聊天

🔐 API Key

鉴权:请求头携带 X-API-Key;密钥仅发内网员工,提交人全程留痕并脱敏展示。

🔑 前往开发者中心申请 API 密钥 →

👥 客户 (customers)

目标表: uc_scrm_customers
导入端点:
POST /api/import/customers
字段 schema:
字段类型是否必填
customer_nametext必填
wa_numbertext必填
citytext可选
gradetext可选
source_channeltext可选
follow_statetext可选
consumable_cycle_daysinteger可选
notestext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/customers \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @customers.csv

🖨️ 产品 (products)

目标表: uc_products
导入端点:
POST /api/import/products
字段 schema:
字段类型是否必填
skutext必填
product_nametext必填
categorytext可选
print_methodtext可选
materialtext可选
unittext可选
cost_idrbigint可选
price_idrbigint必填
stock_qtyinteger可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/products \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @products.csv

🧾 订单 (orders)

目标表: uc_sales_orders
导入端点:
POST /api/import/orders
字段 schema:
字段类型是否必填
order_notext必填
customer_idtext必填
skutext必填
qtyinteger必填
amount_idrbigint必填
order_datedate必填
statustext可选
payment_methodtext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/orders \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @orders.csv

💳 付款 (payments)

目标表: uc_payments
导入端点:
POST /api/import/payments
字段 schema:
字段类型是否必填
payment_notext必填
order_notext必填
amount_idrbigint必填
paid_attimestamptz必填
methodtext可选
bank_reftext可选
statustext可选
verified_bytext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/payments \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @payments.csv

📦 库存 (inventory)

目标表: uc_inventory
导入端点:
POST /api/import/inventory
字段 schema:
字段类型是否必填
skutext必填
warehousetext必填
qty_on_handinteger必填
qty_reservedinteger可选
safety_stockinteger可选
unittext可选
last_counted_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/inventory \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @inventory.csv

🏭 供应商 (suppliers)

目标表: uc_suppliers
导入端点:
POST /api/import/suppliers
字段 schema:
字段类型是否必填
supplier_nametext必填
contact_persontext可选
phonetext可选
citytext可选
countrytext可选
materialstext可选
lead_time_daysinteger可选
ratingnumeric可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/suppliers \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @suppliers.csv

🛒 采购 (purchase)

目标表: uc_purchase_orders
导入端点:
POST /api/import/purchase
字段 schema:
字段类型是否必填
po_notext必填
supplier_idtext必填
skutext必填
qtyinteger必填
unit_cost_idrbigint必填
expected_atdate可选
statustext可选
remarktext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/purchase \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @purchase.csv

🛠️ 售后 (aftersales)

目标表: uc_aftersales_tickets
导入端点:
POST /api/import/aftersales
字段 schema:
字段类型是否必填
ticket_notext必填
customer_idtext必填
machine_modeltext可选
issue_typetext必填
severitytext可选
statustext可选
techniciantext可选
created_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/aftersales \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @aftersales.csv

📚 知识库 (knowledge)

目标表: uc_knowledge
导入端点:
POST /api/import/knowledge
字段 schema:
字段类型是否必填
doc_notext必填
titletext必填
categorytext可选
langtext可选
tagstext可选
content_summarytext可选
updated_attimestamptz可选
viewsinteger可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/knowledge \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @knowledge.csv

⚙️ 配件 (parts)

目标表: uc_parts
导入端点:
POST /api/import/parts
字段 schema:
字段类型是否必填
part_notext必填
part_nametext必填
machine_modeltext可选
unittext可选
cost_idrbigint可选
price_idrbigint必填
stock_qtyinteger可选
supplier_idtext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/parts \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @parts.csv

♻️ 回收 (recycle)

目标表: uc_recycle_orders
导入端点:
POST /api/import/recycle
字段 schema:
字段类型是否必填
recycle_notext必填
customer_idtext必填
machine_modeltext可选
condition_gradetext可选
estimated_price_idrbigint可选
statustext可选
received_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/recycle \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @recycle.csv

🎨 POD 设计 (pod_design)

目标表: uc_pod_designs
导入端点:
POST /api/import/pod_design
字段 schema:
字段类型是否必填
design_notext必填
titletext必填
categorytext可选
style_tagstext可选
source_filetext必填
preview_filetext可选
statustext可选
created_bytext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/pod_design \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @pod_design.csv

💬 消息联系人 (msg_contacts)

目标表: uc_msg_contacts
导入端点:
POST /api/import/msg_contacts
字段 schema:
字段类型是否必填
contact_nametext必填
channeltext必填
channel_idtext必填
phonetext可选
citytext可选
tagstext可选
last_msg_attimestamptz可选
opt_inboolean可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/msg_contacts \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @msg_contacts.csv

☁️ 云盘文件 (cloud_files)

目标表: uc_cloud_files
导入端点:
POST /api/import/cloud_files
字段 schema:
字段类型是否必填
file_idtext必填
categorytext必填
file_typetext必填
nametext必填
size_bytesbigint可选
formattext可选
updated_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/cloud_files \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @cloud_files.csv

💰 财务报表 (finance_report)

目标表: uc_finance_reports
导入端点:
POST /api/import/finance_report
字段 schema:
字段类型是否必填
report_notext必填
report_typetext必填
periodtext必填
revenue_idrbigint必填
cost_idrbigint必填
profit_idrbigint可选
generated_attimestamptz可选
statustext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/finance_report \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @finance_report.csv

🗺️ 地图客户 (map_customers)

目标表: uc_gmap_customers
导入端点:
POST /api/import/map_customers
字段 schema:
字段类型是否必填
place_nametext必填
keywordtext可选
citytext可选
phonetext可选
addresstext可选
ratingnumeric可选
batch_idtext必填
imported_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/map_customers \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @map_customers.csv

👷 技术员 (technicians)

目标表: uc_technicians
导入端点:
POST /api/import/technicians
字段 schema:
字段类型是否必填
tech_nametext必填
phonetext必填
citytext可选
skillstext可选
leveltext可选
jobs_doneinteger可选
ratingnumeric可选
activeboolean可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/technicians \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @technicians.csv

🏪 商户 (merchants)

目标表: uc_merchants
导入端点:
POST /api/import/merchants
字段 schema:
字段类型是否必填
merchant_nametext必填
owner_nametext可选
phonetext可选
citytext可选
categorytext可选
gradetext可选
joined_atdate可选
statustext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/merchants \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @merchants.csv

🚚 物流 (logistics)

目标表: uc_logistics_shipments
导入端点:
POST /api/import/logistics
字段 schema:
字段类型是否必填
tracking_notext必填
order_notext必填
couriertext必填
servicetext可选
weight_kgnumeric可选
cost_idrbigint可选
statustext可选
shipped_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/logistics \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @logistics.csv

🧮 税务 (tax)

目标表: uc_tax_documents
导入端点:
POST /api/import/tax
字段 schema:
字段类型是否必填
tax_notext必填
doc_typetext必填
periodtext必填
npwptext可选
amount_idrbigint必填
tax_idrbigint必填
statustext可选
filed_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/tax \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @tax.csv

🔍 审计 (audit)

目标表: uc_audit_logs
导入端点:
POST /api/import/audit
字段 schema:
字段类型是否必填
log_idtext必填
actortext必填
actiontext必填
moduletext必填
target_idtext可选
resulttext可选
ip_maskedtext可选
created_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/audit \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @audit.csv

🔐 权限 (rbac)

目标表: uc_rbac_roles
导入端点:
POST /api/import/rbac
字段 schema:
字段类型是否必填
role_keytext必填
role_nametext必填
scopetext必填
permissionstext必填
membersinteger可选
activeboolean可选
updated_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/rbac \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @rbac.csv

📣 营销 (marketing)

目标表: uc_marketing_campaigns
导入端点:
POST /api/import/marketing
字段 schema:
字段类型是否必填
campaign_notext必填
nametext必填
channeltext必填
audiencetext可选
budget_idrbigint可选
statustext可选
start_atdate可选
end_atdate可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/marketing \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @marketing.csv

📊 报表 (reports)

目标表: uc_biz_reports
导入端点:
POST /api/import/reports
字段 schema:
字段类型是否必填
report_notext必填
nametext必填
moduletext必填
periodtext必填
generated_bytext可选
generated_attimestamptz可选
formattext可选
statustext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/reports \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @reports.csv

📈 仪表 (dashboard)

目标表: uc_dashboard_widgets
导入端点:
POST /api/import/dashboard
字段 schema:
字段类型是否必填
widget_notext必填
nametext必填
moduletext必填
chart_typetext可选
metrictext必填
refresh_secinteger可选
activeboolean可选
updated_attimestamptz可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/dashboard \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @dashboard.csv

🌐 生态聊天 (eco_chat)

目标表: uc_eco_chat_threads
导入端点:
POST /api/import/eco_chat
字段 schema:
字段类型是否必填
thread_notext必填
participant_typetext必填
participant_nametext必填
subjecttext可选
msg_countinteger可选
last_msg_attimestamptz可选
statustext可选
curl 示例:
curl -X POST https://ai.aifengdcs.com/api/import/eco_chat \
  -H "X-API-Key: <your-key>" \
  -H "Content-Type: text/csv" \
  --data-binary @eco_chat.csv