saveDocuments ()

Save documents (images) into a specific reservation.

HTTP Request Method = POST.

https://sandbox.minihotel.cloud/agents/ws/sci/sciMain.asmx/saveDocuments
https://api2.minihotel.cloud/agents/ws/sci/sciMain.asmx/saveDocuments

Request

ParameterDescriptionType
DocumentsDocuments node ListList Of()
#DocumentDocument record container
Rules:
• 4 Documents as maximum
• 3MB as maximum size p/document.
#attr rs_numberReservation NumberString
#attr doc_typeImage Type
Allowed file types:
• JPG
• JPEG
• PNG
• PDF
String
#attr doc_valueBase 64 Encoded Image FileString
#attr descriptionDocument descriptionString

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <SCI name="sci_saveDocuments">
    <Authentication username="Test" password="3657488"/>
    <Hotel id="sandbox" />
<Documents>
	<Document rs_number="007006512" Doc_type="jpg" Doc_value="BASE 64 STRING" Description="Guest passport" />
</Documents>
</SCI>
</Request>

Response

ParameterDescriptionType
DocumentsDocuments node ListList Of()
#attr haserrorsInforms if the file upload has any errorBoolean
#DocumentDocument record container
#attr rs_numberReservation NumberString
#attr statusDocument Upload StatusString

Response Example

<Response>
    <ServerInfo>
        <Name>SANDBOX1</Name>
        <ResponseTime>10317 ms</ResponseTime>
        <DateTime>6/22/2018 5:55:29 PM</DateTime>
    </ServerInfo>
        <Documents haserrors="True">
            <Document rs_number="007006511" status="SUCCESS"></Document>
        </Documents>
</Response>

Error Codes - Prior Document Upload

S000: Invalid XML Request
S001: Number of documents exceeds the maximum allowed number
S002: One of the documents exceeds the maximum size allowed
S003: Internal Error
S004: Invalid Credentials
S005: Invalid Image Value
S006: Document array is empty
S007: Invalid hotel code
S008: Permissions error
S009: Invalid credentials
S010: No permission to work with the selected hotel
S011: Invalid document type

Example

<Response>
    <ServerInfo>
        <Name>SANDBOX1</Name>
        <ResponseTime>1128 ms</ResponseTime>
        <DateTime>22/06/2018 18:14:59</DateTime>
    </ServerInfo>
    <Errors>
        <Error code="S008" description="Permissions error" />
    </Errors>
</Response>

During & After Document Upload

You can see 3 possible results within the status, during and after the document upload:

SUCCESS = File received and uploaded correctly.
ERROR Invalid reservation ID = Bad Reservation ID.
ERROR occurred = Unkown error ocurred during file upload.

Example

<Response>
    <ServerInfo>
        <Name>SANDBOX1</Name>
        <ResponseTime>10317 ms</ResponseTime>
        <DateTime>6/22/2018 5:55:29 PM</DateTime>
    </ServerInfo>
        <Documents haserrors="True">
            <Document rs_number="007006511" status="SUCCESS" />
        </Documents>
</Response>