Upload a Delivery Receipt
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}/deliveryreceipt/upload
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
If the file being uploaded already exists in the Document folder; in such case, the new file will get saved with a suffix of incremented sequence.
Sample response payload:
Uploadfileresponse
{
filename: "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}“