InvoicePayment (PUT)

Overview

This Put API can be used to update payment details on the invoice document and some additional action in Quantum by GEP to post payment details received from ERP.

 

URL Format: https://api-leouat.gep.com/leo-invoice-interface/api/v1/RemittanceDetails

Request
https://api-leoqc.gep.com/leo-invoice-interface/api/v1/RemittanceDetails
Payload : [
    {
        "documentNumber": "string",
        "supplierInvoiceNumber":"string",
        "clientSupplierCode":"string",
        "sourceSystemName":"string",
        "batchId":"string",
        "paymentReferenceNumber": "string",
        "paymentRemittanceId": "string",
        "paymentMethod": "string",
        "paymentDate": "datetime",
        "grossAmount": int,
        "netAmount": int,
        "discountAmount": int,
        "adjustmentAmount": int,
        "currency": "string",
        "statusInfo": "string"
    }
]
Response
 {
    "returnValue": {
        "errorDetails": [
            {
                "errors": [
                    {
                        "documentNumber": "string",
                        "documentStatus": "string",
                        "interfaceStatus": "string",
                        "documentURL": "string",
                        "errorCode": "string",
                        "errorDescription": "string"
                    }
                ],
                "success": [],
                "paymentReferenceNumber": "string",
                "paymentRemittanceId": "string",
                "paymentMethod": "string",
                "paymentDate": "datetime",
                "grossAmount": “decimal”,
                "netAmount": “decimal”,
                "discountAmount":”decimal”,
                "adjustmentAmount": “decimal”,
                "currency": "string",
                "statusInfo": "string",
                "comments": ”object”,
                "batchId": "string",
                "documentNumber": "string",
                "clientSupplierCode": "string",
                "sourceSystemName": "string",
                "supplierInvoiceNumber": "string"
            }
        ],
        "successDetails": []
    },
    "isSuccess": “Boolean”,
    "errors": “string”,
    "exception": “object”,
    "errorMessage": “string”,
    "errorCode": “string”,
    "correlationId": "string"
}
Data Elements

Payload/Request

Property

Required?

Data type

Description

Validations / Exceptions

documentNumber

Yes, if supplierInvoiceNumber /clientSupplierCode/ batchId

 was not provided in the payload

String (100)

Document Number against which action to be performed.

1. Document Number or Supplier Document Number is Mandatory

2. Invalid Document Number

supplierInvoiceNumber

Yes, if documentNumber /clientSupplierCode / batchId

 was not provided in the payload

String

Supplier Invoice Number against which action to be performed.

1. Document Number or Supplier Document Number is Mandatory

2. Invalid Supplier Invoice Number

sourceSystemName

Yes, if clientSupplierCode was provided in the payload.

String

It is the source system name from which request came.

 

clientSupplierCode

Yes, if supplierInvoiceNumber /documentNumber / batchId

 was not provided in the payload

String

Client Supplier Code will be used to filter the documents against which action to be performed. Will be sending in payload and same will come in response under erroDetail/successDetail.

 

batchId

No

String

Batch ID used to filter the documents that we want to add/update remittance.

1. Invalid Batch ID

statusInfo

Yes

String

Document Status that we’re trying to update on the document.

1. Incorrect status: does not exist in the system

2. Incorrect status: {{InputStatus}} cannot be updated as the status is {{CurrentStatus}}

comments

No

Object

Check the Comments object data

 

paymentReferenceNumber

Yes

String

Reference Number of payment

Payment reference number is Mandatory

paymentRemittanceId

Yes

String

Remittance Id of payment

Payment remittance id is Mandatory

paymentMethod

No

String

Method of payment

 

paymentDate

Yes

Date Time

Date of Payment (e.g. 2021-11-01T00:00:00Z)

Need to pass correct format

grossAmount

No

Decimal

Payment gross amount

 

netAmount

No

Decimal

Payment Net amount

 

discountAmount

No

Decimal

Discount Amount if any

 

adjustmentAmount

No

Decimal

Adjustment Amount

 

currency

No

String

Currency used for payment

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

Interface Status Response

Property

Required?

Data type

Description

Validations / Exceptions

returnValue

 

Object

Its an object that contains actual response data from API

 

isSuccess

 

boolean

It’s a Boolean flag that defines API is successfully executed or not

 

exception

 

Object

It’s provide stack trace if any exception occurred at API level

 

errorMessage

 

string

It will just show as Exception Occurred if any

 
 
 
 
 
 
 
 
 
 
 

Return Value

Property

Required?

Data type

Description

Validations / Exceptions

errorDetails

 

List of errorDetail object

An array of errorDetail comes in response specific to document given in payload.

 

successDetails

 

List of successDetail object

An array of successDetail comes in response specific to document given in payload.

 
 
 
 
 
 
 
 
 

Success/Error Details

Property

Required?

Data type

Description

Validations / Exceptions

documentNumber

 

String (100)

Document Number against which action to be performed. Will be sending in payload and same will come in response under erroDetail/successDetail

 

supplierInvoiceNumber

 

String

Supplier Invoice Number against which action to be performed. Will be sending in payload and same will come in response under erroDetail/successDetail.

 

sourceSystemName

 

string

It is the source system name from which request came. Will be sending in payload and same will come in response under erroDetail/successDetail

 

clientSupplierCode

 

string

Client Supplier Code will be used to filter the documents against which action to be performed. Will be sending in payload and same will come in response under erroDetail/successDetail.

 

documentStatus

 

string

Current Document Status will get in the response under erroDetail/successDetail

 

InterfaceStatus

 

String

Current Interface status on the document will get in the response under erroDetail/successDetail

 

statusInfo

 

string

Interface Status that we’re trying to update on the document. Will be sending in payload and same will come in response under erroDetail/successDetail.

 

comments

 

Object

Check the Comments object data

 

documentURL

 

String

This will be null in Error object. Actual document url will get in successDetails

 

errors

 

Object

Array of objects will get with document details if any error records

 

success

 

Object

Array of objects will get with document details for success records

 

paymentReferenceNumber

 

String

Reference Number of payment. Input payload value we’ll get in the response

 

paymentRemittanceId

 

String

Any unique id we can pass. Input payload value we’ll get in the response

 

paymentMethod

 

String

Method of payment. Input payload value we’ll get in the response

 

paymentDate

 

String

Date of Payment. Input payload value we’ll get in the response

 

grossAmount

 

Decimal

Payment gross amount. Input payload value we’ll get in the response

 

netAmount

 

Decimal

Payment Net amount. Input payload value we’ll get in the response

 

discountAmount

 

Decimal

Discount Amount if any, Input payload value we’ll get in the response

 

adjustmentAmount

 

Decimal

Adjustment Amount. Input payload value we’ll get in the response

 

currency

 

String

Currency used for payment. Input payload value we’ll get in the response

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Errors/Success Array

 

Property

Required?

Data type

Description

Validations / Exceptions

documentNumber

 

String (100)

Document Number against which action to be performed.

 

documentStatus

 

string

Current Document Status will get in the response under erroDetail/successDetail

 

InterfaceStatus

 

String

Current Interface status on the document will get in the response under erroDetail/successDetail

 

documentURL

 

String

This will be null in Error object. Actual document url will get in successDetails

 

errorCode

 

String

Error Code will get if any errors in the processing

 

errorDescription

 

String

Error Description will get if any errors in the processing

 
 
 
 
 
 
 
 
 
 
 
 
 
 


 

Comments

 

Property

Required?

Data type

Description

Validations / Exceptions

commentText

 

String

Comment can be passed to updated on document if anything required