银行回单-会计资料创建

  • 接口:magneto/api/v1/documents/receipt
  • Method:POST
  • 接口说明:创建会计资料银行回单
  • 其他补充信息:会计资料管理

参数:

请求头参数

  • Content-Type: application/json
  • token: 用户认证令牌(必填)

请求参数

字段名 类型 必填 长度限制 说明 备注
archive_ext_code String ≤100 档案编码 若传入则表明关联档案,档案已整理的时候不允许被关联
document_type_code String ≤20 会计资料类型编码 决定关联的子表类型
document_ext_num String ≤36 会计资料外部系统编号 确保唯一性,与source_code+archive_type_code组成业务主键
archive_type_code String ≤20 档案类型编码 电子会计档案分类标识
source_code String ≤20 来源代码 标识数据来源系统
document_sub_type String ≤64 会计资料子类型 单据类型、票据类型、附件类型等
document_num String ≤64 会计资料编号 单据号、发票号码、回单号等
document_desc String ≤255 描述 会计资料的详细描述
file_num_list Array - 文件编号列表 关联的文件编号数组
payment_flag String ≤10 收付标记 "收"或"付"
trans_serial_num String ≤255 交易流水号 银行交易的流水号
payment_datetime Long - 交易时间 银行交易的时间(13位时间戳-毫秒)
company_account_bank String ≤255 公司账户银行 公司账户所属银行
company_account_name String ≤255 公司账户名 公司账户名称
company_account_num String ≤255 公司账户号 公司银行账户号
customer_account_bank String ≤255 对方账户银行 对方账户所属银行
customer_account_name String ≤255 对方账户名 对方账户名称
customer_account_num String ≤255 对方账户号 对方银行账户号
payment_amount Decimal (65,2) 收款金额 交易金额,精度65位,小数2位
payment_currency String ≤10 收款币种 交易金额的币种
payment_note String ≤255 备注 交易备注信息
claim_num String ≤64 单据号 关联的单据号

返回参数

字段名 类型 说明
resCode Integer 响应代码,200000表示成功
resMsg String 响应消息
data Object 响应数据对象
document_ext_num String 会计资料外部系统编号

示例:

请求数据


curl --location --request POST 'https://devapi.cloudpense.com/magneto/api/v1/documents/receipt' \
--header 'token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW55X2lkIjozODA5LCJleHAiOjE3NjM4MDY1MTksImNsaWVudF9pZCI6IkFyY2hpdmVFeHRlbnNpb24iLCJzb3VyY2VfbmFtZSI6IlNBUCJ9.8uqVNo9Mi0yc3lPIZMth7r1ERCDmdhOfj0Lek7d1j90' \
--header 'Content-Type: application/json' \
--data-raw '{
  "biz_id": "abe2c497-1d52-426f-98b6-fe205efb692e",
  "timestamp": 1759295384729,
  "data": {
    "document_type_code": "S005",
    "document_ext_num": "BANK_2024_001-xx4",
    "archive_type_code": "F003",
    "source_code": "SAP",
    "document_sub_type": "PAYMENT",
    "document_num": "BANK20241011001",
    "document_desc": "供应商货款支付",
    "payment_flag": "付",
    "trans_serial_num": "2025110311441234567",
    "payment_datetime": "1762141123972",
    "company_account_bank": "中国工商银行北京分行",
    "company_account_name": "北京科技有限公司",
    "company_account_num": "0200001234567890123",
    "customer_account_bank": "中国建设银行上海分行",
    "customer_account_name": "上海供应商有限公司",
    "customer_account_num": "0300001234567890123",
    "payment_amount": 50000,
    "payment_currency": "CNY",
    "payment_note": "货款支付",
    "claim_num": "PAY202511031033"
  }
}'

返回数据

成功示例

{
  "resCode": 200000,
  "resMsg": "会计资料创建成功",
  "data": {
    "id": null,
    "document_ext_num": "BANK_2024_001-xx4"
  }
}

枚举值和字典说明

document_type_code(会计资料类型编码)

编码 说明 对应子表 备注
S001 记账凭证 无(仅主表) 会计凭证类文档
S002 会计资料单据 mag_document_claim 报销单、申请单等
S003 进项发票 mag_document_invoice 增值税进项发票
S004 销项发票 mag_document_invoice 增值税销项发票
S005 银行回单 mag_document_receipt 银行收付款凭证

archive_type_code(档案类型编码)

根据《电子会计档案管理办法》,电子会计档案分为4类:

编码 说明 备注
F003 电子会计凭证类 记账凭证、原始凭证等
KJZB 电子会计账簿 总账、明细账、日记账等
KJBG 电子财务会计报告 财务报表、财务分析等
QTZL 其他电子会计资料 银行对账单、税务文件等

payment_flag(收付标记)

说明 适用范围
收款 银行回单收款业务
付款 银行回单付款业务

常用币种代码(currency/invoice_currency/payment_currency)

代码 说明
CNY 人民币
USD 美元
EUR 欧元
JPY 日元
HKD 港币

results matching ""

    No results matching ""