Method UpdateDocument
UpdateDocument(String, DocumentContract, String, CheckInParameterContract)
Update a document
Declaration
DocumentContract UpdateDocument(string connectionId, DocumentContract document, string fileId, CheckInParameterContract checkInParameter)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
DocumentContract | document | Document to update |
System.String | fileId | Optional: File to import.See also UploadFileBytes(String, String, Byte[], Int32) |
CheckInParameterContract | checkInParameter | Commit parameters |
Returns
Type | Description |
---|---|
DocumentContract | The updated document |
Examples
POST http://YourServerName/InfoShare/Json/Document/UpdateDocument
Example for update a document.{
"connectionId": "1fbe116a-20a9-4378-b198-6cf3283f0238",
"document": {
"Abonnements": [],
"AccessRightsEnumList": ["CheckOut", "Delete", "EditAnnotation", "EditContent", "EditProperties",
"GrantAccessToOtherUsers", "Move", "SetSecurity", "ViewVersionLog", "ViewChangeLog",
"ViewAccessLog", "EditMultiple", "ChangeRequiredList", "CreateBlog", "DeleteBlog", "EditBlog", "ViewBlog",
"RemoveDocumentContent", "ExecuteApplication", "Export", "SendAsFax", "Print", "Send", "View"],
"AnnotationManager": {
"PostItAnnotations": [],
"RectangleAnnotations": [],
"StampAnnotations": [],
"TextAnnotations": [] },
"Blogs": [],
"CheckOutStateEnum": "NotCheckedOut",
"CheckOutUserId": "00000000-0000-0000-0000-000000000000",
"DocumentData": [{
"Id": "5ae393f3-9ddb-e911-a946-00155d290a08",
"Name": "TestDocu.pdf",
"Renditions": [{
"ContentProtections": [],
"Extension": "pdf",
"Files": [{
"BlobPath": "2019\\09\\20\\000\\000\\008TestDocu.pdf",
"BlobStoreId": "d26cc061-b7cf-e911-a939-00155d290a08" }],
"HashValue": [233, 222, 121, 140, 209, 122, 250, 95, 236, 231, 199, 209, 96, 251,
153, 154, 61, 242, 31, 149, 107, 253, 1, 120, 181, 43, 216, 128, 11, 220, 250, 125,
213, 223, 110, 48, 89, 142, 20, 49, 186, 222, 21, 26, 116, 96, 248, 239, 178, 215, 43,
182, 212, 203, 164, 74, 148, 1, 142, 225, 130, 43, 139, 31],
"Id": "68e393f3-9ddb-e911-a946-00155d290a08",
"PageCount": 1,
"Size": 6758707 }]
}],
"HasOverlay": false,
"Id": "02e293f3-9ddb-e911-a946-00155d290a08",
"ImportTemplateId": "54bdac99-17d0-e911-a93a-00155d290a08",
"InfoStoreId": "e46bc061-b7cf-e911-a939-00155d290a08",
"LifeCycleManager": {
"CheckOutLifeCycleStateId": null,
"LifeCycleEndDate": null,
"LifeCycleId": null,
"LifeCycleProtections": null,
"LifeCycleStartDate": null,
"LifeCycleStateId": null,
"NextAutomaticLifeCycleStateId": null,
"NextLifeCycleStates": [] },
"MainFileLength": 6758707,
"Name": "TestDocu.pdf",
"PageCount": 1,
"Properties": [{
"PropertyTypeId": "01000008-38a7-11d8-a902-0050bf427e8f",
"Values": ["1"] }, {
"PropertyTypeId": "01004019-38a7-11d8-a902-0050bf427e8f",
"Values": [""] }, {
"PropertyTypeId": "01000009-38a7-11d8-a902-0050bf427e8f",
"Values": ["2019-09-20T11:58:00"] }, {
"PropertyTypeId": "01000006-38a7-11d8-a902-0050bf427e8f",
"Values": ["TestDocu.pdf"] }, {
"PropertyTypeId": "0100000d-38a7-11d8-a902-0050bf427e8f",
"Values": ["6d55jNF6+l/s58fRYPuZmj3yH5Vr/QF4tSvYgAvc+n3V324wWY4UMbreFRp0YPjvstcrttTLpEqUAY7hgiuLHw=="] }, {
"PropertyTypeId": "01000001-d596-485b-ace6-d64647a94277",
"Values": ["2019-09-20T11:58:00"] }, {
"PropertyTypeId": "01000002-d596-485b-ace6-d64647a94277",
"Values": ["2cd4ad99-bacf-e911-a939-00155d290a08"] }, {
"PropertyTypeId": "0100101c-38a7-11d8-a902-0050bf427e8f",
"Values": [] }, {
"PropertyTypeId": "01000000-d596-485b-ace6-d64647a94277",
"Values": ["0100a000-38a7-11d8-a902-0050bf427e8f"] }, {
"PropertyTypeId": "b76783b1-c1cf-e911-a939-00155d290a08",
"Values": ["10 MWC"] }, {
"PropertyTypeId": "69a14957-17d0-e911-a93a-00155d290a08",
"Values": [null]
"PropertyTypeId": "2cdacc4e-15d0-e911-a93a-00155d290a08",
"Values": ["TestDocu"] }],
"ProtectionDomainId": "0100a000-38a7-11d8-a902-0050bf427e8f",
"Reminders": [],
"SigningProfileId": null,
"VersionId": "02e293f3-9ddb-e911-a946-00155d290a08" },
"fileId": "",
"checkInParameter": {
"ReleaseReservation": true,
"Version": "1",
"Comment": "",
"MergePropertiesIntoDocument": false }
}
Response:
{
"UpdateDocumentResult": {
"Abonnements": [],
"AccessRightsEnumList": ["CheckOut", "Delete", "DeleteVersion", "EditAnnotation", "EditContent",
"EditProperties", "GrantAccessToOtherUsers", "Move", "SetSecurity",
"ViewVersionLog", "ViewChangeLog", "ViewAccessLog", "EditMultiple", "ChangeRequiredList", "CreateBlog",
"DeleteBlog", "EditBlog", "ViewBlog", "RemoveDocumentContent", "ExecuteApplication", "Export",
"SendAsFax", "Print", "Send", "View"],
"AnnotationManager": {
"PostItAnnotations": [],
"RectangleAnnotations": [],
"StampAnnotations": [],
"TextAnnotations": [] },
"Blogs": [],
"CheckOutStateEnum": "NotCheckedOut",
"CheckOutUserId": "00000000-0000-0000-0000-000000000000",
"DocumentData": [{
"Id": "5ae393f3-9ddb-e911-a946-00155d290a08",
"Name": "TestDocu.pdf",
"Renditions": [{
"ContentProtections": [],
"Extension": "pdf",
"Files": [{
"BlobPath": "2019\\09\\20\\000\\000\\008TestDocu.pdf",
"BlobStoreId": "d26cc061-b7cf-e911-a939-00155d290a08" }],
"HashValue": [233, 222, 121, 140, 209, 122, 250, 95, 236, 231, 199, 209, 96, 251,
153, 154, 61, 242, 31, 149, 107, 253, 1, 120, 181, 43, 216, 128, 11, 220, 250, 125,
213, 223, 110, 48, 89, 142, 20, 49, 186, 222, 21, 26, 116, 96, 248, 239, 178, 215, 43,
182, 212, 203, 164, 74, 148, 1, 142, 225, 130, 43, 139, 31],
"Id": "68e393f3-9ddb-e911-a946-00155d290a08",
"PageCount": 1,
"Size": 6758707 }]
}],
"HasOverlay": false,
"Id": "02e293f3-9ddb-e911-a946-00155d290a08",
"ImportTemplateId": "54bdac99-17d0-e911-a93a-00155d290a08",
"InfoStoreId": "e46bc061-b7cf-e911-a939-00155d290a08",
"LifeCycleManager": {
"CheckOutLifeCycleStateId": null,
"LifeCycleEndDate": null,
"LifeCycleId": null,
"LifeCycleProtections": null,
"LifeCycleStartDate": null,
"LifeCycleStateId": null,
"NextAutomaticLifeCycleStateId": null,
"NextLifeCycleStates": [] },
"MainFileLength": 6758707,
"Name": "TestDocu.pdf",
"PageCount": 1,
"Properties": [{
"PropertyTypeId": "f972ea44-17d0-e911-a93a-00155d290a08",
"Values": ["TestDocu"] }, {
"PropertyTypeId": "b398b135-17d0-e911-a93a-00155d290a08",
"Values": ["878"] }, {
"PropertyTypeId": "50001007-38a7-11d8-a902-0050bf427e8f",
"Values": ["6758707"] }, {
"PropertyTypeId": "0100000a-38a7-11d8-a902-0050bf427e8f",
"Values": ["00000000-0000-0000-0000-000000000000"] }],
"ProtectionDomainId": "0100a000-38a7-11d8-a902-0050bf427e8f",
"Reminders": [],
"SigningProfileId": null,
"VersionId": "02e293f3-9ddb-e911-a946-00155d290a08"
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | No document found for documentId {documentId} (10005) |
ServiceException | Updating with old version not possible (10016) |
ServiceException | Unknown data type for property type (10035) |
ServiceException | String was not recognized as a valid DateTime: {dateTimeValue}. Expected format {expectedFormat} (10059) |
ServiceException | Property type not found {propertyTypeId} (10034) |
ServiceException | Timeout occured in method {methodName} (10116) |
ServiceException | Failure while inserting values into document (10117) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Too much renditions or document datas for a SAP Document (10164) |
ServiceException | BlobStore {blobStoreId} is not available (10171) |
ServiceException | Could not get file stream: {errorMessage} (10172) |
ServiceException | Can not set a lifecycle date lower than currently set (10176) |
ServiceException | Failure while inserting value: '{propertyTypeValue}' into propertyType: {propertyTypeId} (10190) |
ServiceException | Document '{documentId}' already checked out for User '{userId}' (10204) |
ServiceException | Could not parse hexadecimal color code string {hexColorCodeString} to a valid ARGB value (10207) |
ServiceException | File length validation failed (10247) |
ServiceException | HashValue validation failed (10248) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |
ServiceException | Not enough rights for life cycle protected document {ContentModification} (10327) |
ServiceException | PrimaryKey {primaryKeyPropertyId} was not provided (10340) |
ServiceException | Dossier {dosserId} already exists (10341) |
ServiceException | Unsupported FileType used for Dossier {extension} (10342) |
ServiceException | Property {propertyName} not provided for dossier file (10343) |