The UploadPaperlessDocumentRequest API facilitates the secure transmission, validation, and persistent storage of PDF documents within the MBE infrastructure, ensuring proper categorization and metadata association for subsequent shipping operations.
In detail:
Only PDF files are accepted, and names must terminate with .pdf extension
The PDF file must be encoded in base64 format for SOAP transmission
The parameters are
DocumentTypeID: must be obtained from GetPaperlessDocumentTypesRequest response
DocumentName: must include filename with .pdf extension
DocumentContent: base64 encoding of the PDF binary data
DocumentNote: optional free-form metadata for document description or context
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.onlinembe.eu/ws/">
<soapenv:Header/>
<soapenv:Body>
<ws:UploadPaperlessDocumentRequest>
<RequestContainer>
<System></System>
<Credentials>
<Username></Username>
<Passphrase></Passphrase>
</Credentials>
<InternalReferenceID>fdgdf</InternalReferenceID>
<DocumentTypeId>18</DocumentTypeId>
<DocumentName>abcdef.pdf</DocumentName>
<DocumentContent>JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGF</DocumentContebnt>
<!--Optional:-->
<DocumentNote>?</DocumentNote>
</RequestContainer>
</ws:UploadPaperlessDocumentRequest>
</soapenv:Body>
</soapenv:Envelope>
In the response, the DocumentReferenceID field returns a unique system-generated identifier for the uploaded document:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:UploadPaperlessDocumentRequestResponse xmlns:ns3="http://www.onlinembe.eu/ws/">
<RequestContainer>
<InternalReferenceID>fdgdf</InternalReferenceID>
<Status>OK</Status>
<DocumentReferenceId>165</DocumentReferenceId>
</RequestContainer>
</ns3:UploadPaperlessDocumentRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Specific error scenarios are managed when:
the DocumentTypeID is not found in system, or is not not authorized for user's store/country configuration
filename is missing .pdf extension, or the stream is missing
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:UploadPaperlessDocumentRequestResponse xmlns:ns3="http://www.onlinembe.eu/ws/">
<RequestContainer>
<InternalReferenceID>fdgdf</InternalReferenceID>
<Status>ERROR</Status>
<Errors>
<Error>
<Id>5</Id>
<ErrorCode>UPD_005</ErrorCode>
<Description>Invalid MBE paperless document type</Description>
</Error>
</Errors>
</RequestContainer>
</ns3:UploadPaperlessDocumentRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:UploadPaperlessDocumentRequestResponse xmlns:ns3="http://www.onlinembe.eu/ws/">
<RequestContainer>
<InternalReferenceID>fdgdf</InternalReferenceID>
<Status>ERROR</Status>
<Errors>
<Error>
<Id>5</Id>
<ErrorCode>UPD_005</ErrorCode>
<Description>DocumentName field must terminate with .pdf</Description>
</Error>
</Errors>
</RequestContainer>
</ns3:UploadPaperlessDocumentRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>