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
| Parameter | Description | Type |
|---|---|---|
| Documents | Documents node List | List Of() |
| #Document | Document record container Rules: • 4 Documents as maximum • 3MB as maximum size p/document. | |
| #attr rs_number | Reservation Number | String |
| #attr doc_type | Image Type Allowed file types: • JPG • JPEG • PNG | String |
| #attr doc_value | Base 64 Encoded Image File | String |
| #attr description | Document description | String |
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
| Parameter | Description | Type |
|---|---|---|
| Documents | Documents node List | List Of() |
| #attr haserrors | Informs if the file upload has any error | Boolean |
| #Document | Document record container | |
| #attr rs_number | Reservation Number | String |
| #attr status | Document Upload Status | String |
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>
