Transmittals and Register Docs
To upload to the Publication Space you need to create transmittals.
A transmittal contains one or many revisions, which can be for new or existing register docs.
A register doc needs to be placed into a folder.
You need to upload files before creating the transmittal.
Getting folder details
Link: https://au.itwocx.com/api/24.08/api/help/index#!/Folder/Folder_GetByPath
e.g. FullPath = "/PUBDIR/UNFILED/"
Uploading a File Revision
Link: https://au.itwocx.com/api/24.08/api/help/index#!/Revision/Revision_Upload
{ "Name": "Example.Pdf", "ChunkId": 1, "ChunkTotal": 1, "Content": File.ReadAllBytes(@"C:\Temp\Example.Pdf") }
Getting an existing Register Doc
Link: https://au.itwocx.com/api/24.08/api/help/index#!/RegisterDoc/RegisterDoc_GetByName
If you want to add a new revision to an existing document you can get its id with this interface.
Creating a Transmittal
Link: https://au.itwocx.com/api/24.08/api/help/index#!/Transmittal/Transmittal_Create
{ "Title": "Example Transmittal", "UserfieldValues": [ { "UserfieldCode": "CLS", "Value": "Transmittal Clause" } ], "Revisions": [ { "RegisterDoc": { "FolderId": 1416277, "Reference": "NEW-EXAMPLE-AR-DWG-0001", "Title": "New Register Doc", "UserFieldValues": [ { "UserfieldCode": "ALTDOC", "Value": "New Alternate Doc Number" }, { "UserfieldCode": "WP", "Value": "WP01" }, { "UserfieldCode": "SUBDATE", "Value": "31-DEC-2021" }, { "UserfieldCode": "ZONE", "Value": "ABC" } ] }, "FileName": "NewDocument.pdf", "Value": "A", "StatusName": "INFORMATION ONLY", "TypeName": "DWG", "DisciplineName": "AR" }, { "RegisterDocId": 1855979, "FileName": "UpdatedRevision.pdf", "Value": "B", "StatusName": "FOR REVIEW", "TypeName": "DWG", "DisciplineName": "AR" } ] }
Distributing Documents
Link: https://au.itwocx.com/api/24.08/api/help/index#!/Transmittal/Transmittal_Distribute
You can distribute the latest accessible revision by specifying just the Document References:
{ "Title": "Distribution Example 1", "DocCode": "DTX", "ActionCodes": ["MC-MC"], "InfoCodes": ["RIB-AM", "RIB-SS"], "Revisions": [ { "RegisterDoc": { "Reference": "DEMO-AR-ABC-WP01-DWG-0009" } } ] }
Alternatively, you can also specify the revision and optional the revision time:
{ "Title": "Distribution Example 2", "DocCode": "DTX", "ActionCodes": ["MC-MC"], "InfoCodes": ["RIB-AM", "RIB-SS"], "Revisions": [ { "RegisterDoc": { "Reference": "DEMO-AR-ABC-WP01-DWG-0009" }, "Value": "A", "DateTime": "31-MAR-17" } ] }