taskId,通过查询接口轮询任务状态。candidate_item_ids 长度之和,上限 1000。*| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| client_id | string | Y | 租户标识 |
| supplier_id | string | Y | 供应商标识 |
| target_items | array | Y | 发票明细列表 |
| candidate_items | array | Y | 入库单明细列表 |
| match_result | array | Y | 匹配对列表,展开后总匹配对数不超过 1000 |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| item_id | string | Y | 发票明细唯一标识,同一租户内不可重复 |
| doc_id | string | Y | 所属发票单据 ID ,同一租户内不可重复 |
| product_name | string | Y | 商品名称 |
| specification_model | string | N | 规格型号 |
| amount | number | N | 金额 |
| quantity | number | N | 数量 |
| unit | string | N | 单位 |
| unit_price | number | N | 单价 |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| item_id | string | Y | 入库单明细唯一标识,同一请求内不可重复 |
| doc_id | string | Y | 所属入库单单据 ID |
| product_name | string | Y | 商品名称 |
| specification_model | string | N | 规格型号 |
| product_code | string | N | 商品编码 |
| amount | number | N | 金额 |
| quantity | number | N | 数量 |
| unit | string | N | 单位 |
| unit_price | number | N | 单价 |
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| target_item_id | string | Y | 发票明细 ID,必须存在于 target_items 中 |
| candidate_item_ids | array | Y | 匹配的入库单明细 ID 列表,每个 ID 必须存在于 candidate_items 中,支持一对多 |
{
"client_id": "client_001",
"supplier_id": "supplier_001",
"source": 0,
"target_items": [
{
"item_id": "t_001",
"doc_id": "inv_2024_001",
"product_name": "螺栓",
"specification_model": "M8x20",
"amount": 100.00,
"quantity": 10.0,
"unit": "个",
"unit_price": 10.00
},
{
"item_id": "t_002",
"doc_id": "inv_2024_001",
"product_name": "螺母",
"specification_model": "M8",
"amount": 50.00,
"quantity": 10.0,
"unit": "个",
"unit_price": 5.00
}
],
"candidate_items": [
{
"item_id": "c_001",
"doc_id": "wh_2024_001",
"product_name": "六角螺栓",
"specification_model": "M8*20",
"product_code": "P001",
"amount": 60.00,
"quantity": 6.0,
"unit": "个",
"unit_price": 10.00
},
{
"item_id": "c_002",
"doc_id": "wh_2024_002",
"product_name": "六角螺栓",
"specification_model": "M8*20",
"product_code": "P001",
"amount": 40.00,
"quantity": 4.0,
"unit": "个",
"unit_price": 10.00
},
{
"item_id": "c_003",
"doc_id": "wh_2024_001",
"product_name": "六角螺母",
"specification_model": "M8",
"product_code": "P002",
"amount": 50.00,
"quantity": 10.0,
"unit": "个",
"unit_price": 5.00
}
],
"match_result": [
{
"target_item_id": "t_001",
"candidate_item_ids": ["c_001", "c_002"]
},
{
"target_item_id": "t_002",
"candidate_item_ids": ["c_003"]
}
]
}| 参数名 | 类型 | 是否必返 | 说明 |
|---|---|---|---|
| errcode | String | 是 | 返回码("0000" 表示提交成功) |
| description | String | 是 | 操作信息描述 |
| data | Object | 是 | 返回数据 |
| data.taskId | String | 是 | 异步任务唯一标识 |
| traceId | String | 是 | 请求唯一标识(用于链路追踪) |