Skip to main content
Skip table of contents

Upload a Delivery Receipt

Prerequisite:

  1. The ‘Document Folder Path’ must be configured in Configuration module.

  2. The ‘Order ID’ must have the ‘Document Folder Path’

  3. The root folder path must be an accessible network path. 

image-20240404-110611.png

POST

End Point: /warehouse/orders/{orderID}/deliveryreceipt/upload

This method allows you send an acknowledged return receipt.

Sample request payload

CODE
{
 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:

CODE
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}“

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.