This API is provided in the platform for special usage scenario. The SendDocumentFor API is used to sending the documents on behalf of a company/account to another company/account. Certain Accounts will be authorized to process documents and send the documents to various other accounts on behalf of another account. An example to quote SendDocumentFor is processing of invoice scans. From scanned PDF’s, we need to create an XML document and send the document to whoever the invoice is targeted. It should be presented as if the supplier company is sending who provided the service for which the invoice is sent. This API can send the document from any account to any account and from any company to any company. So, the scan service provider can use this API to send document after the conversion of PDF to XML to target companies. Scan Service will use this API from a registered account which has permission to use this API. The Platform Super Administrator can grant permission to any account to fire this API.
The SendDocumentFor API is used to send a document to a legal entity (kvk number registered in eVerbinding), by any account on behalf of some other account. This is an API which requires special privilege for the usage. This privilege will be granted to an account by the Platform Administrator on demand. A successful send will book a transaction in the receiving side as a transaction as configured in the platform. For example, a scanned document conversion and receipt of the document will book a transaction for the receiver with certain specified amount as decided for the associated product. This operation is treated as a separate product in the transaction.The request and response format for the “SendDocumentFor” API is given below. This API is applicable only for certain accounts.
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Header> <SenderId>NL:KVK:60738677</SenderId> <!-- original sender of UBL document --> </SOAP:Header> <SOAP:Body> <SendDocumentFor xmlns="http://ws.vg.pw.com/external/2.0"> <!-- New API SendDocumentFor --> <Payload> <!-- The UBL document payload here --> <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">email@example.com</pwns:Email> <pwns:dx_57 dx_etyp="string"><![CDATA[<br>]]></pwns:dx_57> <pwns:Pleaseattachyourresumehere dx_etyp="string"/> <pwns:FullNameemp>John Doe</pwns:FullNameemp> <pwns:Title/> </pwns:document_instance> </Payload> <DocumentTemplateId>GLDT9223370624699327141RA000000176DTC1000081</DocumentTemplateId> <!--Template Id of the document --> <Subject>Credit Factur - Test Send</Subject> <!-- Consignment subject --> <Recipient>NL:KVK:08191179</Recipient> <!--Recipient KVK Number --> </SendDocumentFor> </SOAP:Body> </SOAP:Envelope>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Header/> <SOAP:Body> <SendDocumentForResponse> <ExternalId>XCNOT11526</ExternalId> <ConsignmentId>CUA000000172000001OTCC9223370624173244000LEA0000004769223370624276652856EXCC2000001</ConsignmentId> </SendDocumentForResponse> </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.
The following table describes the request parameter used:
|SenderId||The KvK number of the actual sender of the document. The third-party will send the document on behalf of the SenderId. This should be present in the SOAP:Header.|
|Payload||The UBL version of the document has to be appended inside Payload.|
|DocumentTemplateId||The template id of the document. You can obain this from document / template properties.|
|Subject||The subject or title of the consignment.|
|Recipient||The targeted receiver company where Kvk number has to be provided in this tag.|
The following table detail the response parameter used:
|ConsignmentId||This parameter gives the id of the consignment.
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 document.|