It is possible to send in your own document via the SOAP Webservice or REST API. This can for instance be a PDF delivery note which is generated in your ERP or WMS system. With some additional configuration in the MyTranssmart Admin Panel -either via self service or via our consultancy department- it is possible to print this document at the moment the shipment label is being printed.
Via the SOAP Webservice you are able to send in the base64 document like this:
For more information about the SOAP Webservice fields, please check the wsdl and search for term "customerDocuments".
Via the REST API you are able to send in the base64 document like this:
For more information about the API fields, please check the DevDocs and search for term "customerDocuments"
Note: the document can be sent in on shipment level (more than 1 document allowed) or on package level (max. 1 document per shipment line/package).
Example
Below we explain the flow of sending in one delivery note PDF on shipment level.
1. Make sure in the Admin Panel (if you have self service access to this) there is configuration present in 2 tables.
- Document Generation:
- Document Retrieval:
As mentioned above, if you have no access to the Admin Panel menu, please contact our servicedesk; note that additional consultancy costs may apply for changing your configuration.
2. Book a shipment via SOAP Webservice or REST API with the customerDocuments section filled with format "PDF" and in this example templateName "DELNOTE" as described above.
3. Either do a getDocs call via the SOAP Webservice or do a REST API print call and in addition to the standard package/shipment label(s), the DELNOTE document will also be returned. In MyTranssmart when doing a Print call, it will print the label(s) and document. You can also download a ZIP file and it will contain all labels and documents
Important notes:
It's important that the document's scale is 100%. If for instance a PDF is created with 70% scale, it will not be printed correctly. See below example.
The creator of the PDF used a scale of 70%:
Therefore, the actual part that fits on a page is this:
Which results in our platform pushing the document to you, looking like this: