This GET API fetches attachment details from GEP SMART for further processing. The attachment is of the following types:
- Comments And Attachment
 - Notes And Attachment
 - Print Preview
 - Warehouse Additional Fields Attachment
 
The details are in the form of the SAAS URL. Using this URL the attachment can be downloaded.
URL Format: https:// <Instance>/SmartInterfaceAPI/api/Receipt/GetAttachmentByReceiptNumber?receiptNumber=<ReceiptNumber> &revisionNumber=<RevisionNumber>
As this is Get Request and parameters are passed through URL, there is no Request body.
{
  "data": {},
  "statusCode": "string",
  "errorDetails": [
    {
      "key": "string",
      "errors": [
        {
          "errorCode": "string",
          "errorDescription": "string"
        }
      ]
    }
  ],
  "successDetails": [
    {
      "key": "string"
    }
  ]
}
Success Scenario - Request
As this is Get Request and parameters are passed through URL, there is no Request body.
 
Success Scenario – Response
{
    "data": [
        {
            "receiptNumber": "RECS0018737",
            "name": "AUS-IN-2017-0008541 (4) (1) (3) (1) (2) (2) (1) (1) (1) (1).pdf",
            "contentType": null,
            "attachmentType": "CommentAttachment",
            "attachmentUrl": "https://gepuatsmartmtstorage.blob.core.windows.net/buyersqlconn/70021829/Attachment/AUS-IN-2017-0008541 (4) (1) (3) (1) (2) (2) (1) (1) (1) (1)_f1ce25d5686f4ad690119484ed167622.pdf?sv=2019-07-07&sr=b&sig=vBer9FjhMtRC1m1byP9oCOypRqw2ARVfDcmDDlvgdw4%3D&st=2021-03-01T10%3A21%3A45Z&se=2021-03-01T11%3A06%3A45Z&sp=r&rscc=no-cache%2C%20no-store%2C%20must-revalidate&rscd=attachment%3B%20filename%3D%22AUS-IN-2017-0008541%20%284%29%20%281%29%20%283%29%20%281%29%20%282%29%20%282%29%20%281%29%20%281%29%20%281%29%20%281%29.pdf%22"
        },
        {
            "receiptNumber": "RECS0018737",
            "name": "RET0000667 (1).pdf",
            "contentType": null,
            "attachmentType": "NotesAttachementPDF",
            "attachmentUrl": "https://gepuatsmartmtstorage.blob.core.windows.net/buyersqlconn/70021829/Attachment/RET0000667 (1)_9c5db182a2314038b80715bb9ac9ac20.pdf?sv=2019-07-07&sr=b&sig=eN7SE4Fqa1KikB1SsPW%2BOr307mGDO0qs3r182y7kdNY%3D&st=2021-03-01T10%3A21%3A45Z&se=2021-03-01T11%3A06%3A45Z&sp=r&rscc=no-cache%2C%20no-store%2C%20must-revalidate&rscd=attachment%3B%20filename%3D%22RET0000667%20%281%29.pdf%22"
        },
        {
            "receiptNumber": "RECS0018737",
            "name": "AUS-IN-2017-0008541 (4) (1) (3) (1) (2) (2) (1) (1) (1) (1).pdf",
            "contentType": null,
            "attachmentType": "NotesAttachementPDF",
            "attachmentUrl": "https://gepuatsmartmtstorage.blob.core.windows.net/buyersqlconn/70021829/Attachment/AUS-IN-2017-0008541 (4) (1) (3) (1) (2) (2) (1) (1) (1) (1)_2284a7c0f51a416f97d05a6e07eae3fd.pdf?sv=2019-07-07&sr=b&sig=qTDgXu3MntHAy05dqHvK6LpM1S8vUxyoqz5JPUos5vI%3D&st=2021-03-01T10%3A21%3A45Z&se=2021-03-01T11%3A06%3A45Z&sp=r&rscc=no-cache%2C%20no-store%2C%20must-revalidate&rscd=attachment%3B%20filename%3D%22AUS-IN-2017-0008541%20%284%29%20%281%29%20%283%29%20%281%29%20%282%29%20%282%29%20%281%29%20%281%29%20%281%29%20%281%29.pdf%22"
        },
        {
            "receiptNumber": "RECS0018737",
            "name": null,
            "contentType": "application/pdf",
            "attachmentType": "PrintPreviewPDF",
            "attachmentUrl": "https://gepuatsmartmtstorage.blob.core.windows.net/buyersqlconn/70021829/Attachment/RECS0018737_6b90a2a1f3184fb6937f2533cd847441.pdf?sv=2019-07-07&sr=b&sig=KY7pDptQJADl2sYLXW8C%2BAwI8%2FNFaz60KBklbqy66A0%3D&st=2021-03-01T10%3A21%3A47Z&se=2021-03-01T11%3A06%3A47Z&sp=r&rscc=no-cache%2C%20no-store%2C%20must-revalidate&rscd=attachment%3B%20filename%3D%22RECS0018737.pdf%22"
        }
    ],
    "statusCode": "200",
    "errorDetails": [],
    "successDetails": []
}
Error Scenario – Request
As this is Get Request and parameters are passed through URL, there is no Request body.
Error Scenario – Response
{
    "data": [],
    "statusCode": "400",
    "errorDetails": [
        {
            "key": "",
            "errors": [
                {
                    "errorCode": "MandatoryException",
                    "errorDescription": "Receipt Number is Mandatory"
                }
            ]
        }
    ],
    "successDetails": []
}
| 
			 GetAttachmentByReceiptNumber  | 
		||||
| 
			 Property  | 
			
			 Required?  | 
			
			 Data type  | 
			
			 Description  | 
			
			 Validations/Exceptions  | 
		
| 
			 ReceiptNumber  | 
			
			 Yes  | 
			
			 String  | 
			
			 The number of the receipt for which attachments are to be fetched.  | 
			
			 Receipt Number is Mandatory  | 
		
| 
			 RevisionNumber  | 
			
			 Yes  | 
			
			 String  | 
			
			 Revision Number  | 
			
			 
  |