PostInvoiceStatus (POST)

Overview

This POST API allows pushing Invoice posted in ERP into GEP SMART for further processing.

 

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

Request
{
   "models": [
      {
         "sourceSytemName": "string",
         "documentNumber": "string",
         "documentstatusInfo": "string",
         "comments": {
            "commentText": "string",
            "accessType": "string",
            "commentAttachment": [
               {
                  "fileName": "string",
                  "fileUri": "string"
               }
            ]
         },
         "lob": "string",
         "clientPartnerCode": "string",
         "invoiceDate": "2020-01-22T12:24:52.146Z",
         "exceptionType": "string"
      }
   ]
}

 

Response
{
   "data": {},
   "statusCode": "string",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "string"
      }
   ]
}

 

Examples

Success Scenario - Request 


Request below describes that this contains only the mandatory attributes:

{
   "models": [
      {
         "SourceSytemName": "",
         "DocumentNumber": "DEV_Inv070918A",
         "documentstatusInfo": "SentForPayment",
         "LOB": "",
         "ClientPartnerCode": "PC-1530698055599",
         "InvoiceDate": "2019-12-14T11:47:24.534Z",
         "ExceptionType": ""
      }
   ]
}

Success Scenario - Response 

{
   "data": null,
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "DEV_Inv070918A"
      }
   ]
}

Error Scenario - Request 

{
   "models": [
      {
         "SourceSytemName": "",
         "DocumentNumber": "DEV_Inv070918A",
         "documentstatusInfo": "",
         "LOB": "",
         "ClientPartnerCode": "PC-1530698055599",
         "InvoiceDate": "2019-12-14T11:47:24.534Z",
         "ExceptionType": ""
      }
   ]
}

Error Scenario - Response 

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "DEV_Inv070918A",
         "errors": [
            {
               "errorCode": "MandatoryField",
               "errorDescription": "There was an error in processing the Invoice Status as Type is mandatory"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

Post Invoice Status Model

Property

Required?

Data type

Description

Validations/Exceptions

Models

Yes

 List of UpdateInvoiceStatusModel object

 
  • InvoiceStatusModel is missing

Models

Property

Required?

Data type

Description

Validations/Exceptions

SourceSytemName

No

String

 
  • Invalid source system

DocumentNumber

Yes

String

 
  • Invalid Document number

  • Document Number is mandatory

DocumentStatusInfo

Yes

String

 
  • There was an error in processing the invoice status as string is wrong Enum value

  • There was an error in processing the invoice status as is Invalid Invoice Status

  • Type is mandatory

  • Invoice Status cannot be updated as Invoice is already in paid with Remittance Status

Comments

No

List of InterfaceComment object

   

Lob

No

String

   

ClientPartnerCode

Yes

String

 
  • Client partner code is mandatory (if isPartnerInvNoForPayment=1)

  • Invalid client partner code

  • Invalid SupplierId: (ClientPartnerCode)

InvoiceDate

Yes

Date Time

 
  • Invoice date cannot be greater than current date

  • Invoice Date is mandatory

ExceptionType

No

String

 
  • Exception types cannot exist for Invoice Status: () (If docstatus is not equal to Exception)

  • Exception types cannot be empty for Invoice Status

  • (If docstatus is equal to Exception)

Comments

Property

Required?

Data type

Description

Validations/Exceptions

CommentText

No

String

   

AccessType

No

String

   

CommentAttachment

No

List of InterfaceCommentAttachment object

   

CommentAttachment

Property

Required?

Data type

Description

Validations/Exceptions

FileName

No

String

   

FileUri

No

String