PostCreditMemoStatus (POST)

Overview

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

 

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

Request
	{
   "models": [
      {
         "sourceSytemName": "string",
         "documentNumber": "string",
         "documentStatus": "string",
         "comments": {
            "commentText": "string",
            "accessType": "string",
            "commentAttachment": [
               {
                  "fileName": "string",
                  "fileUri": "string"
               }
            ]
         },
         "lob": "string",
         "clientPartnerCode": "string",
         "creditMemoDate": "2020-01-22T12:24:52.146Z",
         "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.
 

{
   "models": [
      {
         "documentStatus": "Cancelled",
         "sourceSytemName": "Client Supplier code",
         "documentNumber": "CM90w",
         "creditMemoDate": "2020-02-07T08:31:54.609Z",
         "comments": {
            "commentText": "The MEMO HAS BEEN CANCELLED"
         },
         "clientPartnerCode": "0080000006",
         "lob": "KNA-SAP",
         "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": "CM90w"
      }
   ]
}

Error Scenario – Request

{
   "models": [
      {
         "documentStatus": "",
         "sourceSytemName": "Client Supplier code",
         "documentNumber": "CM094W",
         "creditMemoDate": "2020-02-07T08:31:54.609Z",
         "comments": {
            "commentText": "The MEMO HAS BEEN CANCELLED"
         },
         "clientPartnerCode": "0080000006",
         "lob": "KNA-SAP",
         "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": "CM094W",
         "errors": [
            {
               "errorCode": "MandatoryField",
               "errorDescription": "There was an error in processing the CreditMemo Status as Type is mandatory"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

Post Invoice Status Model

Property

Required?

Data type

Description

Validations/Exceptions

Models

Yes

 List of InterfaceCreditMemoStatus object

 
  • InterfaceCreditMemoStatus is missing

Models

Property

Required?

Data type

Description

Validations/Exceptions

SourceSytemName

No

String

Name of the Source System

  • Invalid Source System

DocumentNumber

Yes

String

Number for the document

  • Invalid Document Number

  • Document Number is mandatory

DocumentStatus

Yes

String

Status of the document

  • 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)

CreditMemoDate

Yes

Date Time

 
  • Invoice date cannot be greater than current date

  • Invoice date is mandatory

Header

Yes

Header object

 
  • Header 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

   

Header

Property

Required?

Data type

Description

Validations/Exceptions

From

Yes

From object

 
  • From is mandatory

To

Yes

To object

 
  • To is mandatory

Sender

Yes

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