API 1.0 – Share Document

This API can be used to share documents and Inbox/Outbox items to other users or groups. The API applies normal resource access restrictions to the requesting user.

The DocumentId tag can hold the value of a Document / Consignment Id or External Id of the same. DocumentType must specify the type of document that is getting shared. The remaining request contents specifies the permission and targets for whom the document or consignment is to be shared. The Permission tag can hold the share permission ( this is mandatory in any one level). Any number of  User,Group,Company tuples acan be added to specify the share recipients. The permission can be set globally, if permission is same for all recipients and can be customized for tuples if needed.

Scope: SHARE_DOC

Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <ShareDocument  xmlns="http://ws.vg.com/pw/PWDataDx/1.0">
            <DocumentId>o</DocumentId><!-- DocumentID / ExternalID-->
            <DocumentType>Document</DocumentType> <!-- Document/Inbox/Outbox -->
            <Permission/>
                <ShareToUsers>
                    <User>
                        <Id/>
                        <Permission/>
                    </User>
                </ShareToUsers>
                <ShareToGroups>
                    <Group>
                        <Id/>
                        <Permission/>
                    </Group>
                </ShareToGroups>
                <ShareToCompanies>
                    <Company>
                        <Id/>
                        <Permission/>
                    </Company>
                </ShareToCompanies>
            <Permission/> <!-- Read/Edit/FullAccess -->
        </ShareDocument>
    </SOAP:Body>
</SOAP:Envelope><span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1"></span>

Response

<SOAP:Envelope  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header/>
    <SOAP:Body>
        <ShareDocumentResponse xmlns="http://ws.vg.com/pw/PWDataDx/1.0">
             <DocumentId>{doc-id here}</DocumentId><!--DocumentID / ConsignmentID-->
        </ShareDocumentResponse>
    </SOAP:Body>
</SOAP:Envelope>

 

Request Parameters

The following table detail the request parameter used:

Parameter Description
DocumentId This parameter can be documentID or externalID.
DocumentType This parameter gives the type of the document.
Document/Inbox/Outbox
Permission This parameter specified the share permission.
The possible inputs are Read / Edit / FullAccess
Id This parameter holds the identifier of a User/Group/Company with respect to the tuple container

Response Parameters

The following table detail the response parameter used:

Parameter Description
DocumentId This parameter can be documentID or consignmentID.