UpdateClientCodesByGepCode (PUT)

Overview

This PUT API can be used to capture updates in client code by GEP code details from ERP into GEP SMART, that can be used as reference in P2P transactions.

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/Partner/ClientCodesByGepCode

Request
{
 "gepPartnerCode": 0,
 "sourceSystemDetails": [
 {
 "name": "string",
 "value": "string"
 }
 ],
 "sourceSystemLocationDetails": [
 {
 "gepLocationCode": 0,
 "sourceSystemDetails": [
 {
 "name": "string",
 "value": "string"
 }
 ]
 }
 ],
 "sourceSystemContactDetails": [
 {
 "gepContactCode": 0,
 "sourceSystemDetails": [
 {
 "name": "string",
 "value": "string"
 }
 ]
 }
 ],
 "sourceSystemLocationCombinationDetails": [
 {
 "linkedGEPLocationID": 0,
 "gepLocationCode": 0,
 "sourceSystemDetails": [
 {
 "name": "string",
 "value": "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:

{
   "gepPartnerCode": 539447,
   "sourceSystemDetails": [
      {
         "name": "015",
         "value": "1234dd"
      }
   ],
   "sourceSystemLocationDetails": [
      {
         "gepLocationCode": 53944713000002,
         "sourceSystemDetails": [
            {
               "name": "",
               "value": "test3"
            }
         ]
      },
      [
         {
            "gepLocationCode": 53944713000003,
            "sourceSystemDetails": [
               {
                  "name": "",
                  "value": "test4"
               }
            ]
         }
      ]
   ]
}

Success Scenario - Response

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

Error Scenario - Request 
Request below contains source system value which already exists:

{
   "gepPartnerCode": 539447,
   "sourceSystemDetails": [
      {
         "name": "015",
         "value": "1234dd"
      }
   ],
   "sourceSystemLocationDetails": [
      {
         "gepLocationCode": 53944713000005,
         "sourceSystemDetails": [
            {
               "name": "",
               "value": "test3"
            }
         ]
      },
      [
         {
            "gepLocationCode": 53944713000001,
            "sourceSystemDetails": [
               {
                  "name": "",
                  "value": "test4"
               }
            ]
         }
      ]
   ]
}


Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "539447",
         "errors": [
            {
               "errorCode": "DataValidation",
               "errorDescription": "Source System Value: test3 Already Exist in the System"
            },
            {
               "errorCode": "DataValidation",
               "errorDescription": "Source System Value: test4 Already Exist in the System"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

 

SourceSystemPartnerDetails

Property

Required?

Data type

Description

Validations / Exceptions

GEPPartnerCode

Yes

Long

Check Data Type Partner Code for details

·       GEPPartnerCode is mandatory

SourceSystemDetails

Yes

List of SourceSystemDetails object

Check Data Type SourceSystemDetails for details

·       SourceSystemDetails is mandatory

SourceSystemLocationDetails

No

List of SourceSystemLocationDetails object

Check Data Type Location Details for details

 

SourceSystemContactDetails

No

List of SourceSystemContactDetails object

Check Data Type ContactDetails for details

 

SourceSystemLocationCombinationDetails

No

List of SourceSystemLocationCombinationDetails object

Check Data Type Location Combination Details for details

 

 

SourceSystemDetails

Property

Required?

Data type

Description

Validations / Exceptions

Name

Yes

String

Source System Name

·       Source System Name is mandatory for all source systems

Value

Yes

String

Source System Value

·       Source System Value is mandatory for all source systems

 

SourceSystemLocationDetails

Property

Required?

Data type

Description

Validations / Exceptions

GEPLocationCode

Yes

Long

 

·       GEP Location Code is mandatory

SourceSystemDetails

 

List of SourceSystemDetails object

Check Data Type SourceSystemDetails for details

 

 

SourceSystemContactDetails

Property

Required?

Data type

Description

Validations / Exceptions

GEPContactCode

 

Long

 

 

SourceSystemDetails

 

List of SourceSystemDetails object

Check Data Type SourceSystemDetails for details

 

 

SourceSystemLocationCombinationDetails

Property

Required?

Data type

Description

Validations / Exceptions

LinkedGEPLocationID

 

Long

Check Data type Location

 

GEPLocationCode

 

Long

Check Data Type Location

 

SourceSystemDetails

 

List of SourceSystemDetails object

Check Data Type SourceSystemDetails for details