Prerequisite:
-
The ‘Document Folder Path’ must be configured in Configuration module.
-
The ‘Order ID’ must have the ‘Document Folder Path’.
-
The root folder path must be an accessible network path.
POST
End Point: /warehouse/orders/{orderID}/upload/deliveryreceipt
This method allows you send an acknowledged return receipt.
Sample request payload
{
file: <file_name>.pdf
}
-
Documents Folder Root Directory must be configured for the specified order type in R2's Configuration.
-
It is suggested to ensure that the Documents Folder Root Directory is reachable/accessible through the R2API server; probably as a network paths.
-
Uploaded files are saved under the configured Documents Folder. The folder structure will follow the pattern below.
-
Syntax:
<Documents Folder Root Directory>\Delivery Receipt\{orderID}\filename.pdf
-
Sample response payload:
{
response: "String"
}
Some Examples for the ‘response’:
-
When there is path is not configured from the configuration.
-
Error message: "Document folder is not configured"
-
-
When there is any exception occurred.
-
Error message: "Failed to upload file".
-
-
When the uploaded file is not a pdf file.
-
Error message: "Only PDF files can be uploaded."
-
-
When user enters the wrong order id.
-
Error message: “Invalid order id {$order_id}“
-