PostInvoicePaymentcXml (POST)

Overview

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

 

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

Request
{
   "paymentReferenceNumber": "string",
   "paymentRemittanceId": "string",
   "paymentMethod": "string",
   "clientPartnerCode": "string",
   "paymentDate": "2020-02-14T14:14:40.915Z",
   "remittanceDetails": [
      {
         "invoiceNumber": "string",
         "orderNumber": "string",
         "grossAmount": 0,
         "netAmount": 0,
         "discountAmount": 0,
         "adjustmentAmount": 0,
         "currency": "string"
      }
   ],
   "comments": [
      {
         "commentText": "string",
         "accessType": "string",
         "commentAttachment": [
            {
               "fileName": "string",
               "fileUri": "string"
            }
         ]
      }
   ],
   "precessionValue": 0,
   "sourceSytemName": "string",
   "schedulePayDate": "2020-02-14T14:14:40.915Z",
   "header": {
      "from": {
         "domain": "string",
         "identity": "string"
      },
      "to": {
         "domain": "string",
         "identity": "string"
      },
      "sender": {
         "domain": "string",
         "identity": "string",
         "sharedSecret": "string",
         "userAgent": "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.

{
   "paymentDate": "2020-02-11T14:02:25.511Z",
   "paymentReferenceNumber": "00010113802017001011",
   "paymentRemittanceId": "PRN_11022020",
   "paymentMethod": "EDI",
   "clientPartnerCode": "0000200330",
   "remittanceDetails": [
      {
         "invoiceNumber": "40000910060",
         "orderNumber": "",
         "grossAmount": 100,
         "netAmount": 100,
         "discountAmount": 0,
         "adjustmentAmount": 0,
         "currency": "KRW"
      },
      {
         "invoiceNumber": "2E5695854",
         "orderNumber": "",
         "grossAmount": 100,
         "netAmount": 100,
         "discountAmount": 0,
         "adjustmentAmount": 0,
         "currency": "KRW"
      }
   ],
   "comments": [
      {
         "commentText": ""
      }
   ],
   "precessionValue": 0,
   "sourceSytemName": "Client Supplier code",
   "schedulePayDate": "2020-02-11T14:02:25.511Z",
   "Header": {
      "From": {
         "Domain": "Kellogg",
         "Identity": "Kellogg"
      },
      "To": {
         "Domain": "Gep-Cumulus",
         "Identity": "GEP"
      },
      "Sender": {
         "Domain": "Kellogg",
         "Identity": "Kellogg",
         "SharedSecret": "Kellogg123",
         "UserAgent": "Kellogg-Suite"
      }
   }
}


Success Scenario - Response 

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

Error Scenario - Request 

{
   "paymentDate": "2020-02-11T14:02:25.511Z",
   "paymentReferenceNumber": "00010113802017001011",
   "paymentRemittanceId": "",
   "paymentMethod": "EDI",
   "clientPartnerCode": "0000200330",
   "remittanceDetails": [
      {
         "invoiceNumber": "40000910060",
         "orderNumber": "",
         "grossAmount": 100,
         "netAmount": 100,
         "discountAmount": 0,
         "adjustmentAmount": 0,
         "currency": "KRW"
      }
   ],
   "comments": [
      {
         "commentText": ""
      }
   ],
   "precessionValue": 0,
   "sourceSytemName": "Client Supplier code",
   "schedulePayDate": "2020-02-11T14:02:25.511Z",
   "Header": {
      "From": {
         "Domain": "Kellogg",
         "Identity": "Kellogg"
      },
      "To": {
         "Domain": "Gep-Cumulus",
         "Identity": "GEP"
      },
      "Sender": {
         "Domain": "Kellogg",
         "Identity": "Kellogg",
         "SharedSecret": "Kellogg123",
         "UserAgent": "Kellogg-Suite"
      }
   }
}

 

Error Scenario - Response 

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "",
         "errors": [
            {
               "errorCode": "MandatoryField",
               "errorDescription": "There was an error in processing the Invoice Payment Confirmation as Payment Remittance ID is mandatory."
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

Invoice Payment

Property

Required?

Data type

Description

Validations/Exceptions

SourceSytemName

No

Sting

Name of the source system

  • Invalid Source System

PrecessionValue

No

Int

   

Comments

No

List of InterfaceComment object

   

RemittanceDetails

Yes

List of RemittanceDetails Object

   

ClientPartnerCode

Yes

Sting

 
  • There was an error processing the invoice payment confirmation as the Partner Code is not valid

  • Order Number or Partner Code is mandatory (If isPartnerInvNoForPayment == 1)

PaymentMethod

No

String

   

PaymentRemittanceId

Yes

String

 
  • There was an error in processing the invoice payment confirmation as Payment Remittance Id is mandatory

  • There was an error processing the invoice payment confirmation as the PaymentRemittanceId already exists

PaymentReferenceNumber

No

String

   

PaymentDate

Yes

DateTime

 
  • There was an error in processing the invoice payment confirmation as payment date is not a valid datetime value

  • There was an error in processing the invoice payment confirmation as payment datetime cannot be greater then current date

  • Payment Date is mandatory.

  • There was an error processing the invoice payment confirmation as the Payment date should be greater than or equal to Credit Memo Received date

SchedulePayDate

Yes

DateTime

 
  • There was an error in processing the invoice payment confirmation as schedule pay date is not a valid datetime value

Header

Yes

List of Header object

 
  • Header is mandatory

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

   

PaymentRemittanceDetail

Property

Required?

Data type

Description

Validations/Exceptions

InvoiceNumber

Yes

String

 
  • There was an error in processing the invoice payment confirmation as invoice number is mandatory

  • There was an error processing the invoice payment confirmation as the Invoice Number is not valid

  • There was an error processing the invoice payment confirmation as PaymentReferenceNumber already exists for the same Invoice

OrderNumber

Yes

String

 
  • There was an error processing the invoice payment confirmation as Invoice does not have a valid order reference

  • There was an error processing the invoice payment confirmation as the Order Number is not valid

  • Order Number or Partner Code is mandatory (If isPartnerInvNoForPayment == 1)

GrossAmount

Yes

Decimal

 
  • There was an error in processing the invoice payment confirmation as gross amount is mandatory

NetAmount

Yes

Decimal

 
  • There was an error in processing the invoice payment confirmation as net amount is mandatory

  • Net Amount is Invalid. Net = Gross - (Discount + Adjustment)

DiscountAmount

No

Decimal

   

Currency

Yes

String

 
  • There was an error in processing the invoice payment confirmation as currency is mandatory

AdjustmentAmount

No

Decimal

   

Header

Property

Required?

Data type

Description

Validations/Exceptions

From

Yes

List of From object

 
  • From is mandatory

To

Yes

List of To object

 
  • To is mandatory

Sender

Yes

List of Sender object

 
  • Sender is mandatory

From

Property

Required?

Data type

Description

Validations/Exceptions

Domain

No

String

   

Identity

Yes

String

 
  • Identity is mandatory

To

Property

Required?

Data type

Description

Validations/Exceptions

Domain

No

String

   

Identity

Yes

String

 

 

  • Identity is mandatory

Sender

Property

Required?

Data type

Description

Validations/Exceptions

Domain

No

String

   

Identity

Yes

String

 
  • Identity is mandatory

SharedSecret

Yes

String

 
  • Shared Secret is mandatory

UserAgent

Yes

String

 
  • User Agent is mandatory