SaveContactWithToken (POST)

Overview

This POST API can be used to capture new additions in Contact with Token details from ERP into GEP SMART, that can be used as reference in P2P transactions.

 

URL Format: https://<Instance>/SmartBulkInterfaceAPI/api/Contact/Contactdetails

Request
{
   "gepContactCode": 0,
   "userName": "string",
   "contactCode": "string",
   "managerCode": [
      "string"
   ],
   "address": {
      "addressLine1": "string",
      "addressLine2": "string",
      "addressLine3": "string",
      "city": "string",
      "stateCode": "string",
      "stateOther": "string",
      "countryCode": "string",
      "zipCode": "string",
      "faxNo": "string",
      "phoneNo": "string",
      "phoneOther": "string",
      "phoneExtension": "string",
      "phoneOtherExtension": "string",
      "county": "string",
      "poBoxNumber": "string"
   },
   "firstName": "string",
   "lastName": "string",
   "emailAddress": "string",
   "authorityAmt": 0,
   "isActive": true,
   "isDeleted": true,
   "userActivities": [
      {
         "activityName": "NONE"
      }
   ],
   "timeZone": "string",
   "locationCode": "string",
   "currencyCode": "string",
   "UserProfileCurrencyCode": "string",
   "designation": "string",
   "commitmentAmount": 0,
   "orgEntities": [
      {
         "entityCode": "string",
         "isDefault": true,
         "entityType": "string",
         "lobEntityCode": "string"
      }
   ],
   "accountingEntities": [
      {
         "entityCode": "string",
         "isDefault": true,
         "entityType": "string",
         "lobEntityCode": "string"
      }
   ],
   "contactOrgDetails": [
      {
         "orgEntity": {
            "entityCode": "string",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         },
         "personaAndRoles": {
            "personaName": "string",
            "personaCode": "string",
            "activities": [
               {
                  "code": "string",
                  "name": "string",
                  "description": "string"
               }
            ],
            "personaDescription": "string"
         },
         "lobType": "string",
         "isDefaultLOB": true
      }
   ],
   "categories": [
      {
         "pasCode": 0,
         "isDefault": true,
         "clientPasCode": "string",
         "isDeleted": true
      }
   ],
   "regions": [
      {
         "regionName": "string",
         "isDefault": true
      }
   ],
   "lastLoginDate": "2020-01-21T11:53:45.057Z",
   "personaAndRoles": {
      "personaName": "string",
      "personaCode": "string",
      "activities": [
         {
            "code": "string",
            "name": "string",
            "description": "string"
         }
      ],
      "personaDescription": "string"
   },
   "customFields": [
      {
         "key": "string",
         "value": [
            "string"
         ],
         "subCustomField": [
            null
         ]
      }
   ],
   "ssoType": 0,
   "cultureCode": "string",
   "authorizeAmountForProject": 0,
   "secondaryAuthorizeAmount": 0,
   "secondaryAuthorizeAmountForContract": 0,
   "amendmentAuthorizeAmountForContract": 0,
   "workGroup": "string",
   "contactManagers": [
      {
         "managerCode": "string",
         "managerType": "string"
      }
   ],
   "authorityAmountDetails": [
      {
         "documentType": "string",
         "lobType": "string",
         "lobEntityCode": "string",
         "entityType": "string",
         "entityCode": "string",
         "isDeleted": true,
         "amountAttributes": [
            {
               "amountCode": "string",
               "amount": 0
            }
         ]
      }
   ]
}

 

Response
{
   "statusCode": 202,
   "url": "String",
   "batchID": "Stirng",
   "interval": 0,
   "interval Type": "String",
   "receivedCount": 0
}

 

Additional Information

Few Examples of CurrencyCode are listed below:

USD
EUR
GBP
ADF
ADP
AED
AFA

Note: The Valid source of the CurrencyCode has to be GEP SMART CurrencyMaster only.

Examples

Success Scenario - Request
Request below describes that this contains only the mandatory attributes: (202 – Accepted)

[
   {
      "gepContactCode": 1895730040000001,
      "userName": "samplecontact@gep.com",
      "contactCode": "samplecontact@gep.com",
      "managerCode": [
         " ApproverLevel2 "
      ],
      "address": {
         "addressLine1": "PO Box 8881011",
         "addressLine2": "220 Lyon Street",
         "addressLine3": " CSBrew Market",
         "city": "Grand Rapids",
         "stateCode": "MI",
         "zip": "49588",
         "countryCode": "US",
         "isDeleted": false,
         "isDefault": true,
         "stateOther": " Texas ",
         "lobEntityCode": " KNA-SAP "
      },
      "firstName": "FNameMN-1",
      "lastName": "LNameMN-1",
      "emailAddress": "pg1@gep.com",
      "authorityAmt": 1,
      "isActive": false,
      "isDeleted": false,
      "userActivities": [
         {
            "activityName": "Administration"
         }
      ],
      "timeZone": "Eastern Standard Time",
      "locationCode": "45978",
      "currencyCode": "USD",
      "UserProfileCurrencyCode": "INR",
      "designation": "new",
      "commitmentAmount": 6000,
      "orgEntities": [
         {
            "entityCode": " GUBR ",
            "isDefault": true,
            "entityType": " Company Code ",
            "lobEntityCode": " KNA-SAP "
         }
      ],
      "accountingEntities": [
         {
            "entityCode": " GUBR ",
            "isDefault": true,
            "entityType": " Company Code ",
            "lobEntityCode": " KNA-SAP "
         }
      ],
      "contactOrgDetails": [
         {
            "orgEntity": {
               "entityCode": " GUBR ",
               "isDefault": true,
               "entityType": " Company Code ",
               "lobEntityCode": " KNA-SAP "
            },
            "personaAndRoles": {
               "personaName": "UnAssigned",
               "personaCode": "588",
               "activities": [
                  {
                     "code": "10100001",
                     "name": "Administration",
                     "description": "Administration Work "
                  }
               ],
               "personaDescription": "To be mapped to all the users who are yet to be on boarded."
            },
            "lobType": " KEU-SAP ",
            "isDefaultLOB": true
         }
      ],
      "categories": [
         {
            "pasCode": 476350000425,
            "isDefault": true,
            "clientPasCode": "6350000425",
            "isDeleted": true
         }
      ],
      "regions": [
         {
            "regionName": "Americas",
            "isDefault": true
         }
      ],
      "lastLoginDate": "2019-10-16T02:30:55",
      "personaAndRoles": {
         "personaName": "UnAssigned",
         "personaCode": "588",
         "activities": [
            {
               "code": "10100001",
               "name": "Administration",
               "description": " Administration Work"
            }
         ],
         "personaDescription": " To be mapped to all the users who are yet to be on boarded "
      },
      "customFields": [
         {
            "key": "string",
            "value": [
               "string"
            ],
            "subCustomField": [
               null
            ]
         }
      ],
      "ssoType": 1,
      "cultureCode": "78945",
      "authorizeAmountForProject": 999999999,
      "secondaryAuthorizeAmount": 7894562,
      "secondaryAuthorizeAmountForContract": 99999999999,
      "amendmentAuthorizeAmountForContract": 422221.56,
      "workGroup": "Interface",
      "contactManagers": [
         {
            "managerCode": " ApproverLevel2 ",
            "managerType": "TL"
         }
      ]
   }
]

Success Scenario - Response

{
   "statusCode": 202,
   "url": "https://<instance>/SmartBulkInterfaceAPI/api/BulkResult/GetBulkResult?batchId=110e7c8551f647c39726b8e9e7ec2980",
   "batchID": "110e7c8551f647c39726b8e9e7ec2980",
   "interval": 60,
   "interval Type": "Seconds",
   "receivedCount": 10
}

Error Scenario – Request

Request has a missing value of the Authorization Header which is mandatory: (401 – Unauthorized)

Error Scenario - Response

Access to interface BulkAPI is denied, Authorization Header is missing.

Data Elements
 

Buyer Contact

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.1

ContactCode

Yes

String

Contact Code

  • Max length is 50

  • No Contact Code found

1.2

UserName

Yes

String

User Name of entity

  • Max length is 100

  • Invalid username

  • Different user with same username already exists

1.3

FirstName

Yes

String

First Name of the entity

  • Max length is 50

  • FirstName is mandatory

1.4

LastName

Yes

String

Last Name of the entity

  • Max length is 30

  • Last Name is mandatory

1.5

EmailAddress

Yes

String

Email Address of the entity

  • Invalid Email Address

  • Email Address is mandatory

1.6

Address

No

List of Address object

Check data type Address for details

 

1.7

AuthorityAmt

No

Decimal

Authority Amount of the entity

 

1.8

IsActive

No

Boolean

Status of the entity if they are active or not

 

1.9

IsDeleted

No

Boolean

Status of the entity if they are to be visible or not on the application

 

1.10

UserActivities

No

List of Activity object

Check data type Activity for details

 

  UserProfileCurrencyCode No String Currency Code of the User’s Profile
  • Invalid user profile currency code

  • If this field is not provided or provided as null/empty in request during user creation, then the default domain currency is set against the user profile otherwise if the valid value is provided then that value will be set

  • If this field is not provided or provided as null/empty in request during user updation, then the existing currency for that user is retained otherwise if the valid value is provided then that value will be updated

1.11

TimeZone

No

String

Time Zone of the entity

  • Max length is 100

  • Invalid Timezone

1.12

LocationCode

No

String

Location Code of the entity

  • Max length is 50

1.13

CurrencyCode

No

String

Currency Code of the entity

 

1.14

Designation

No

String

Designation of the entity

  • Max length is 100

1.15

CommitmentAmount

No

Decimal

Commitment Amount of the entity

 

1.16

OrgEntities

No

List of OrgEntity object

Check data type OrgEntity for details

 

1.17

AccountingEntities

No

List of OrgEntity object

Check data type OrgEntity for details

 

1.18

ContactOrgDetails

No

List of ContactOrgDetails object

Check data type ContactDetails for details

 

1.19

Categories

No

List of PAS object

Check data type PAS for details

 

1.20

Regions

No

List of Regions object

Check data type Regions for details

 

1.21

LastLoginDate

No

DateTime

 

 

1.22

PersonaAndRoles

No

List of PersonaAndRoles object

Check data type PersonaAndDetails for details

 

1.23

CustomFields

No

List of CustomFields object

Check data type CustomFields for details

 

1.24

SSOType

No

Int

SSO Type

  • Invalid SSO Type

1.25

CultureCode

No

String

Culture Code

 

1.26

AuthorizeAmountForProject

No

Decimal

Authorize Amount for Project

 

1.27

SecondaryAuthorizeAmount

No

Decimal

Secondary Authorize Amount

 

1.28

SecondaryAuthorizeAmountForContract

No

Decimal

Secondary Authorize Amount for Contract

 

1.29

AmendmentAuthorizeAmountForContract

No

Decimal

Amendment Authorize Amount for Contract

 

1.30

WorkGroup

No

String

Work Group of the entity

 

1.31

ContactManagers

No

List of ContactManager object

Check data type ContactManager for details

 

1.32

GEPContactCode

No

Long

GEP Contact Code of the entity

 

This field is only available on outbound and not on inbound

 

1.33

ManagerCode

No

List of String

Manager Code

  • Invalid Manager Code

  • Multiple managers are not allowed

 

 

Address

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.6.1

AddressLine1

Yes

String (500)

Address line 1 of the entity

  • AddressLine1 is mandatory

  • Max length for AddressLine1 is 500

1.6.2

City

Yes

String (50)

City of the entity

  • City is mandatory

  • Max length for City is 50

1.6.3

StateCode

Yes

String (10)

State code of the entity

  • StateCode is mandatory

  • Max length for StateCode is 10

  • Invalid State

1.6.4

CountryCode

Yes

String (2)

Country code of the entity

  • CountryCode is mandatory

  • Max length for CountryCode is 2

  • Invalid Country Code

1.6.5

ZipCode

Yes

String (10)

Zip code of the entity

  • ZipCode is mandatory

  • Max length for ZipCode is 10

1.6.6

AddressLine2

No

String

Address line 2 of the entity

  • Max length for AddressLine2 is 500

1.6.7

AddressLine3

No

String (100)

Address line 3 of the entity

  • Max length for AddressLine3 is 100

1.6.8

StateOther

No

String

State name (in case of others) of the entity

  • Max length for State Other is 50

1.6.9

FaxNo

No

String (20)

Fax number of the entity

  • Max length for FaxNo is 20

  • Special characters and spaces are not allowed for Fax number except these +(-./ )#@&

1.6.10

PhoneNo

No

String

Phone number of the entity

  • Max length for PhoneNo is 50

  • Special characters and spaces are not allowed for phone except these +(-./ )#@&

1.6.11

PhoneOther

No

String (20)

Phone 2 of the entity

  • Max length for PhoneOther is 20

  • Special characters and spaces are not allowed for PhoneOther except these +(-./ )#@&

1.6.12

PhoneExtension

No

String

Phone extension of the entity

  • Max length for Phone Extension is 10

1.6.13

PhoneOtherExtension

No

String

Phone 2’s extension of the entity

  • Max length for Phone other Extension is 10

1.6.14

County

No

String (50)

County of the address

  • Max length for County is 50

1.6.15

PoBoxNumber

No

String

 

 

 

 

UserActivities

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.10.1

ActivityName

No

Activities

One of the following values will be provided in this field; “NONE”, “ADMINISTRATION”, “HOME”, “VIEW_GEPICENTER etc.

 

 

 

 

OrgEntities

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.16.1

EntityCode

No

String

Entity Code of entity

  • Invalid Org Entity Code

1.16.2

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default Org Entities are not allowed

1.16.3

EntityType

No

String

Entity Type of entity

  • Either Entity Type is missing or invalid Entity Type for entities

1.16.4

LOBEntityCode

No

String

LOB Entity Code of entity

 

 

AccountingEntities

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.17.1

EntityCode

No

String

Entity Code of entity

  • Invalid Accounting Org Entity Code

1.17.2

IsDefault

No

Boolean

Status of the entity if this is default or not

 

1.17.3

EntityType

No

String

Entity Type of entity

 

1.17.4

LOBEntityCode

No

String

LOB Entity Code of entity

 

 

 

ContactOrgDetails

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.18.1

OrgEntities

No

List of OrgEntity object

Check data type OrgEntity for details

  • Invalid Org Entity Code

 

1.18.2

PersonaAndRoles

No

List of PersonaAndRoles object

Check data type PersonaAndDetails for details

 

1.18.3

LobType

No

String

LOB Type of entity

  • LOB Type should be either belonging or serving

  • Multiple blank LOB Type Is not valid for Contact Code

1.18.4

IsDefaultLOB

No

Boolean

Status of the entity if this is default LOB or not

  • If LOB Type is serving: Multiple default Serving LOB are not allowed for Contact Code

  • if LOB Type is belonging: Multiple default Belonging LOB is not allowed for one Contact Code

 

 

 

Categories

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.19.1

PasCode

No

Long

PAS Code of entity

  • Category is invalid

1.19.2

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default categories not allowed

1.19.3

ClientPasCode

No

String

Client Pas Code of entity

 

1.19.4

IsDeleted

No

Boolean

Status of the entity if they are to be visible or not on the application

 

 

Regions

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.20.1

RegionName

No

String

Region name of entity

  • Region is invalid

1.20.2

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default Regions not allowed

 

 

PersonaandRoles

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.22.1

PersonaName

No

String

Name of the entity

 

1.22.2

PersonaCode

No

String

Persona Code of the entity

  • Invalid Persona Code

1.22.3

Activities

No

List of UserActivity object

Check data type UserActivity for details

 

1.22.4

PersonaDescription

No

String

Persona Description of entity

 

 

 

Activities

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.22.3.1

Code

No

String

Code of the entity

  • Invalid Activity Code

1.22.3.2

Name

No

String

Name of the entity

 

1.22.3.3

Description

No

String

Description of the entity

 

 

 

CustomFields

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.23.1

Key

No

String

Key of the entity

  • Custom Field Is Invalid if key is not user Business Unit

  • If key is user Business Unit:

Business Units code is invalid

Custom Fields key text is empty

1.23.2

Value

No

List of String

Value of the entity

  • Custom Field has invalid values

  • Custom Field cannot have multiple values

1.23.3

CustomFields

No

List of CustomField object

  • Check data type Custom Fields for details

 

 

 

ContactManagers

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.31.1

ManagerCode

No

String

Manager Code

 

1.31.2

ManagerType

No

String

Manager Type