Attach document to waybill API is used to attach a document like invoice or any additional information related to shipment after the creation of waybills.
These are form parameters:
Parameter | Data Type | Required/Optional | Description |
---|---|---|---|
SecureKey | int | Required | It is a Unique key for accessing the API. For secure key email to support team. |
File | String | Required | File in which you have enter details of document which you want to add. |
WaybillNumber | String | Required | Waybill Number is against which document is to be attached. |
FileType | String | Required | File can be in jpeg or jpg or pdf format only. |
FileCategory | String | Optional | File Category is same as available in the logixerp. |
ON SUCCESS
{
"message" : "File upload successfully",
"messageType" : "Success"
}
ON ERROR
{
"message" : "Incorrect file type",
"messageType" : "Error"
}
{
"message" : "Missing file",
"messageType" : "Error"
}
Error Messages | Description |
---|---|
Incorrect File Type | When select file format is incorrect. |
Missing File | When file is not selected. |
import java.util.Set;
import javax.imageio.stream.ImageInputStream;
public class AttachDocumentToWaybill {
private static final String ACCESS_URL = API_URL+SECURE_KEY;
DataOutputStream ds;
private String getContentType(File f) throws Exception {
Some content.