{
"data": [
{
"autoCreateFlag": true,
"autoSubmit": true,
"operateMethod": "",
"sourceCode": "DEMO_20250101008",
"sourceSystem": "oms",
"contractName": "采购合同",
"type": "oms",
"categoryUuid": "",
"categoryCode": "0101",
"categoryCodeType": "CODE",
"templateUniqueKey": "",
"templateUniqueKeyType": "",
"propertyCode": "ORDINARY",
"amount": "1000.12",
"validDateStartType": "DATE",
"startDate": "2025-01-01",
"validDateEndType": "DATE",
"endDate": "2050-01-01",
"validFlag": "",
"sourceName": "",
"principalId": "",
"principalCode": "0001",
"principalCodeType": "CODE",
"departmentId": "",
"departmentCode": "1001",
"departmentCodeType": "CODE",
"belongingDepartmentId": "",
"belongingDepartmentCode": "1001",
"belongingDepartmentCodeType": "CODE",
"reCreateNewContract": false,
"userId": "",
"userCode": "zhenling_openapi_admin",
"userCodeType": "LOGIN_NAME",
"childList": [
{
"childType": "partyInformation",
"data": [
{
"roleCode": "J",
"roleOrder": "1",
"partyNumber": "91310115MA1K4PGE3T",
"ourFlag": "true",
"ourParty": "true",
"sourceKey": ""
},
{
"roleCode": "Y",
"roleOrder": "2",
"partyNumber": "91330108MAD23G379L",
"ourFlag": "false",
"ourParty": "false",
"sourceKey": ""
}
]
},
{
"childType": "contractLine",
"data": [
{
"price": 100.123456,
"quantity": 1,
"materialsCode": ""
}
]
},
{
"childType": "custContractLine",
"data": [
{
"customLineCode": "materials",
"item": "物品",
"attributeVarchar1": "物品描述"
}
]
},
{
"childType": "associatedInfo",
"data": [
{
"relContractSerialNumber": "202504080001",
"relContractNumber": "CON_0120250408001",
"typeCode": "SC"
}
]
},
{
"childType": "signInformation",
"data": [
{
"sealOrder": "OSF",
"sealMaterial": "PHYSICALSEAL",
"signCount": 2,
"deadline": ""
}
]
},
{
"childType": "signNode",
"data": [
{
"partyNumber": "91310115MA1K4PGE3T",
"partyNumberType": "CODE",
"signatoryEmpCode": "0001",
"signatoryEmpCodeType": "CODE"
},
{
"partyNumber": "91330108MAD23G379L",
"partyNumberType": "CODE",
"signatoryName": "李四"
}
]
},
{
"childType": "collectionPlanJ",
"data": [
{
"planType": "ACYCLIC",
"totalAmount": 100,
"planStartDate": "2025-01-01",
"planEndDate": "2025-12-31"
}
]
},
{
"childType": "custVariable",
"data": [
{
// 主键不用传sourceKey,而是以下几种:
//1. documentOrigin=LOCAL且本地文件fileKey
//2. documentOrigin=MODEL_UUID且templateUniqueKey传模板uuid
//3. documentOrigin=MODEL_CODE且templateUniqueKey传模板编码
//4.以上都不传documentOrigin/templateUniqueKey/fileKey 代表合同只有一个正文,默认指向此正文
// (背景:来源合同目前仅支持一个模板)
// "documentOrigin": "",
// "templateUniqueKey": "",
// "fileKey": "",
"fieldName": "印花税",
"fieldValue": "loan",
"isEditable": "0"
},
{
// "documentOrigin": "",
// "templateUniqueKey": "",
// "fileKey": "",
"fieldName": "datetime",
"fieldValue": "2025-11-16 09:51:54",
"isEditable": "0"
}
]
}
]
}
]
}curl --location --request POST 'https://oc-test.onecontract-cloud.com/api/hitf/v2/rest/async/invoke/SOURCE_HEADER' \
--header 'Authorization: bearer eb2446a6-93f9-456b-b713-5cb6f6adf765' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": [
{
"autoCreateFlag": true,
"autoSubmit": true,
"operateMethod": "",
"sourceCode": "DEMO_20250101008",
"sourceSystem": "oms",
"contractName": "采购合同",
"type": "oms",
"categoryUuid": "",
"categoryCode": "0101",
"categoryCodeType": "CODE",
"templateUniqueKey": "",
"templateUniqueKeyType": "",
"propertyCode": "ORDINARY",
"amount": "1000.12",
"validDateStartType": "DATE",
"startDate": "2025-01-01",
"validDateEndType": "DATE",
"endDate": "2050-01-01",
"validFlag": "",
"sourceName": "",
"principalId": "",
"principalCode": "0001",
"principalCodeType": "CODE",
"departmentId": "",
"departmentCode": "1001",
"departmentCodeType": "CODE",
"belongingDepartmentId": "",
"belongingDepartmentCode": "1001",
"belongingDepartmentCodeType": "CODE",
"reCreateNewContract": false,
"userId": "",
"userCode": "zhenling_openapi_admin",
"userCodeType": "LOGIN_NAME",
"childList": [
{
"childType": "partyInformation",
"data": [
{
"roleCode": "J",
"roleOrder": "1",
"partyNumber": "91310115MA1K4PGE3T",
"ourFlag": "true",
"ourParty": "true",
"sourceKey": ""
},
{
"roleCode": "Y",
"roleOrder": "2",
"partyNumber": "91330108MAD23G379L",
"ourFlag": "false",
"ourParty": "false",
"sourceKey": ""
}
]
},
{
"childType": "contractLine",
"data": [
{
"price": 100.123456,
"quantity": 1,
"materialsCode": ""
}
]
},
{
"childType": "custContractLine",
"data": [
{
"customLineCode": "materials",
"item": "物品",
"attributeVarchar1": "物品描述"
}
]
},
{
"childType": "associatedInfo",
"data": [
{
"relContractSerialNumber": "202504080001",
"relContractNumber": "CON_0120250408001",
"typeCode": "SC"
}
]
},
{
"childType": "signInformation",
"data": [
{
"sealOrder": "OSF",
"sealMaterial": "PHYSICALSEAL",
"signCount": 2,
"deadline": ""
}
]
},
{
"childType": "signNode",
"data": [
{
"partyNumber": "91310115MA1K4PGE3T",
"partyNumberType": "CODE",
"signatoryEmpCode": "0001",
"signatoryEmpCodeType": "CODE"
},
{
"partyNumber": "91330108MAD23G379L",
"partyNumberType": "CODE",
"signatoryName": "李四"
}
]
},
{
"childType": "collectionPlanJ",
"data": [
{
"planType": "ACYCLIC",
"totalAmount": 100,
"planStartDate": "2025-01-01",
"planEndDate": "2025-12-31"
}
]
},
{
"childType": "custVariable",
"data": [
{
// 主键不用传sourceKey,而是以下几种:
//1. documentOrigin=LOCAL且本地文件fileKey
//2. documentOrigin=MODEL_UUID且templateUniqueKey传模板uuid
//3. documentOrigin=MODEL_CODE且templateUniqueKey传模板编码
//4.以上都不传documentOrigin/templateUniqueKey/fileKey 代表合同只有一个正文,默认指向此正文
// (背景:来源合同目前仅支持一个模板)
// "documentOrigin": "",
// "templateUniqueKey": "",
// "fileKey": "",
"fieldName": "印花税",
"fieldValue": "loan",
"isEditable": "0"
},
{
// "documentOrigin": "",
// "templateUniqueKey": "",
// "fileKey": "",
"fieldName": "datetime",
"fieldValue": "2025-11-16 09:51:54",
"isEditable": "0"
}
]
}
]
}
]
}'{
"code": "100250",
"data": {
"results": [
{
"endDate": "2050-01-01",
"validFlag": "",
"sourceSystem": "oms",
"departmentId": "",
"departmentCode": "1001",
"principalId": "",
"childList": [
{
"childType": "partyInformation",
"data": [
{
"sourceKey": "",
"ourParty": "true",
"roleCode": "J",
"ourFlag": "true",
"roleOrder": "1",
"partyNumber": "91310115MA1K4PGE3T"
},
{
"sourceKey": "",
"ourParty": "false",
"roleCode": "Y",
"ourFlag": "false",
"roleOrder": "2",
"partyNumber": "91330108MAD23G379L"
}
]
},
{
"childType": "contractLine",
"data": [
{
"quantity": "1",
"price": "100.123456",
"materialsCode": ""
}
]
},
{
"childType": "custContractLine",
"data": [
{
"item": "物品",
"customLineCode": "materials",
"attributeVarchar1": "物品描述"
}
]
},
{
"childType": "associatedInfo",
"data": [
{
"relContractSerialNumber": "202504080001",
"relContractNumber": "CON_0120250408001",
"typeCode": "SC"
}
]
},
{
"childType": "signInformation",
"data": [
{
"signCount": "2",
"sealOrder": "OSF",
"sealMaterial": "PHYSICALSEAL",
"deadline": ""
}
]
},
{
"childType": "signNode",
"data": [
{
"signatoryEmpCodeType": "CODE",
"partyNumberType": "CODE",
"signatoryEmpCode": "0001",
"partyNumber": "91310115MA1K4PGE3T"
},
{
"partyNumberType": "CODE",
"signatoryName": "李四",
"partyNumber": "91330108MAD23G379L"
}
]
},
{
"childType": "collectionPlanJ",
"data": [
{
"totalAmount": "100",
"planType": "ACYCLIC",
"planStartDate": "2025-01-01",
"planEndDate": "2025-12-31"
}
]
}
],
"type": "oms",
"userCodeType": "LOGIN_NAME",
"userCode": "zhenling_openapi_admin",
"autoSubmit": true,
"sourceCode": "DEMO_20250101007",
"propertyCode": "ORDINARY",
"validDateStartType": "DATE",
"principalCode": "0001",
"subCode": "500003",
"belongingDepartmentCode": "1001",
"departmentCodeType": "CODE",
"validDateEndType": "DATE",
"belongingDepartmentId": "",
"templateUniqueKeyType": "",
"amount": "1000.12",
"operateMethod": "",
"categoryCode": "0101",
"autoCreateFlag": true,
"principalCodeType": "CODE",
"reCreateNewContract": false,
"userId": "",
"categoryCodeType": "CODE",
"categoryUuid": "",
"templateUniqueKey": "",
"belongingDepartmentCodeType": "CODE",
"sourceName": "",
"subMessage": "[DEMO_20250101007]来源单数据已经创建了非草稿状态的合同, 需要先作废已存在合同再来源创建",
"startDate": "2025-01-01"
}
]
},
"message": "简单校验失败"
}