GetAttachmentByInvoiceNumber (GET)

Overview

This GET API allows retrieval of Attachment by Invoice Number details created in GEP SMART to post them into ERP.

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/Invoice/GetAllAttachments
 

Request

https://<Instance>/SmartInterfaceAPI/api/Invoice/GetAllAttachments?InvoiceNumber=SCN-2019.023731&PartnerCode=1PC-2019.20101901

 

Response
{
   "data": [
      {
         "documentNumber": "String",
         "partnerCode": "String",
         "attachmentData": "String",
         "name": "String",
         "contentType": "String",
         "extension": "String",
         "attachmentType": "String"
      }
   ],
   "statusCode": "String",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "String"
      }
   ]
}

 

Examples

Success Scenario - Request 

https:///SmartInterfaceAPI/api/Invoice/GetAllAttachments?InvoiceNumber=SCN-2019.023731&PartnerCode=1PC-2019.20101901

 

Success Scenario - Response 

{
   "data": [
      {
         "documentNumber": "SCN-2019.023731",
         "partnerCode": "1PC-2019.20101901",
         "attachmentData": "<Attachment as Binary Code>",
         "name": "SCN-2019.023731.pdf",
         "contentType": "application/pdf",
         "extension": ".pdf",
         "attachmentType": "PrintPreviewPDF"
      }
   ],
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "SCN-2019.023731"
      }
   ]
}

 

Data Elements
 

Get Attachment by Invoice Number

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

Data

 

Attachments object

   

2

StatusCode

 

String

   

3

ErrorDetails

 

List of ErrorModel object

   

4

SuccessDetails

 

List of SuccessModel object

   
 

Data

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

DocumentNumber

 

String

Document Number

 

2

PartnerCode

 

String

Partner Code

 

3

AttachmentData

 

Byte

Attachment Data

 

4

Name

 

String

Attachment Name

 

5

ContentType

 

String

Attachment Content Type

 

6

Extension

 

String

Attachment Content Type Extension

 

7

AttachmentType

 

String

Attachment Type

 
 

ErrorDetails

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

3.1

Key

 

String

   

3.2

Errors

 

List of Error object

   
 

Errors

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

3.2.1

ErrorCode

 

String

   

3.2.2

ErrorDescription

 

String

   
 

SuccessDetails

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

4.1

Key

 

String