API 1.0 – Send Document

This API is used to send a document to an enabled company, user or group. The sent document will be visible in the sender’s outbox and the receiver’s inbox when the API execution is complete. If the receiver is outside the platform alternative delivery channels will be used. The request and response format for the “Send document” API are given below:

API Code

SEND_DOC

Request

Based on the used template different validation rules will be applied on the payload.

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <SendDocument xmlns="http://ws.vg.pw.com/external/1.0">
            <DocumentTemplateId>GLDT9223370666504283001RA000000006DTP2000001</DocumentTemplateId>
            <!---- You can use DocumentID instead of DocumentTemplateID if you are having the document which is already created.
            <DocumentId>RA000000014DMNL000017</DocumentId>---->
            <Subject>Testing API</Subject>
            <Recipient>LEA0000000039223370648094044472EXCP2000004</Recipient>
            <RecipientEmailId></RecipientEmailId>
            <SendViaGroup>LEA0000000179223370666332237809EXCP1000001</SendViaGroup>
            <Payload>                
                    <pwns:document_instance xmlns:pwns="http://schemas.pw.vg.com/pwns">
                    <pwns:FullName dx_etyp="string">Jacobs</pwns:FullName>
                    <pwns:positonAppliedFor dx_etyp="string">Technical Support</pwns:positonAppliedFor>
                    <pwns:Telephone dx_etyp="string">87878778</pwns:Telephone>
                    <pwns:Email dx_etyp="string">jacobs@jjjjjjxj.com</pwns:Email>
                    <pwns:dx_57 dx_etyp="string"><![CDATA[<br>]]></pwns:dx_57>
                    <pwns:Pleaseattachyourresumehere dx_etyp="string"/>
                    <pwns:FullNameemp>Karthik Sudar</pwns:FullNameemp>
                    <pwns:Title/>
                    <pwns:Department/>
                    <pwns:PhoneNumber/>
                    <pwns:Emailemp>karthik@miui.com</pwns:Emailemp>
                    <pwns:attachments1 dx_etyp="string">
                        <attachment0 dx_atmt="true" filename="testfile.txt" isfilecontent="true" xmlns="http://schemas.pw.vg.com/pwns">
                            <!-- Base 64 encoded content of attachment0 goes here -->
                        </attachment0>
                    </pwns:attachments1>
                </pwns:document_instance>
            </Payload>
        </SendDocument>
    </SOAP:Body>
</SOAP:Envelope>

 

Response

<SOAP:Envelope  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header/>
    <SOAP:Body>
        <SendDocumentResponse>
            <ConsignmentId>CUA000000015000001OTCC9223370669869063038UA000000014000001</ConsignmentId>
            <ExternalId>XCNOT10020</ExternalId>
        </SendDocumentResponse>
    </SOAP:Body>
</SOAP:Envelope>

Note :  The usage of the ConsignmentId is no more recommended. Please use ExternalId instead. ConsignmentId is still retained in response for your reference.

 

Request Parameters

The following table describes the request parameter used:

Parameters Description
DocumentId This parameter gives the id of an existing document that should be sent. This parameter should not be entered if the DocumentTemplateId is provided. You can find the DocumentId of a document by selecting the document from the Document List section under Documents & Data, and clicking the Properties button.
Payload This parameter gives the XML representation of the eVerbinding document that you wish to send. Make sure to enter a DocumentTemplateId when using the Payload parameter. This parameter is not necessary if the DocumentId is provided.
DocumentTemplateId This parameter gives the id of the template from which the document should be created.  Make sure to enter a Payload when using the DocumentTemplateId parameter.  This parameter should not be entered if the DocumentId is provided. You can find the DocumentTemplateId of a document by selecting the document from the Document List section under Documents & Data, and clicking the Properties button.
Subject This parameter gives the subject of the consignment.
Recipient This parameter gives the EmailID, CompanyID, KvK-number or peppol-address of the recipient.
RecipientEmailId This parameter gives the email id of the recipient to whom a copy of this document will be sent. This EmailId is required when receivers are not registered in the platform.
SendViaGroup This parameter gives the CompanyID, GroupID or KvK-number of the sender – if you need to send the document in the context of a company or group.

Response Parameters

The following table describes the response parameter used:

Parameters Description
ConsignmentId This parameter gives the id of the consignment that has been sent.
The usage of the ConsignmentId is no more recommended. Please use ExternalId instead. ConsignmentId is still retained in response for your reference.
ExternalId This parameter gives the external id of the consignment that has been sent.