BulkUploadUsers (Post)

Overview

This post API can be used to insert/update buyer contacts in Quantum by GEP sent from the ERP/Financial System via CLICK. This API supports synchronization or immediate response for batches of 200 users or more. The batch size has to be reduced in case of a higher volume of CMDS master data to avoid timeout.

URL Format:  https://api-leoaksuat.gep.com/leo-usermanagement-bulkupload-api/api/v1/leoumbulkupload/bulkuploadusersapi
 

Request
[
  {
    "batchId": "string",
    "sfeBatchId": "string",
    "sfeStatusId": "string",
    "buyerPartnerCode": 0,
    "status": "string",
    "markAsProcessed": false,
    "errorDescription": {
      "statusCode": "string",
      "errorModel": [
        {
          "key": "string",
          "errors": [
            {
              "errorCode": "string",
              "errorDescription": "string"
            }
          ],
          "transactionId": "string"
        }
      ],
      "successModel": [
        {
          "key": "string"
        }
      ]
    },
    "receivedFrom": "string",
    "region": "string",
    "retryCount": 0,
    "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",
      "stateId": 0,
      "countryId": 0,
      "poBoxNumber": "string",
      "longitude": "string",
      "latitude": "string",
      "faxnoExtension": "string",
      "mobileNumber": "string",
      "isdCode": "string"
    },
    "firstName": "string",
    "lastName": "string",
    "emailAddress": "string",
    "authorityAmt": 0,
    "isActive": true,
    "isDeleted": true,
    "userActivities": [
      {
        "activityCode": 0,
        "activityName": 0
      }
    ],
    "timeZone": "string",
    "locationCode": "string",
    "currencyCode": "string",
    "userProfileCurrencyCode": "string",
    "designation": "string",
    "commitmentAmount": 0,
    "orgEntities": [
      {
        "entityCode": "string",
        "isDefault": true,
        "entityType": "string",
        "lobEntityCode": "string",
        "isDeleted": true
      }
    ],
    "accountingEntities": [
      {
        "entityCode": "string",
        "isDefault": true,
        "entityType": "string",
        "lobEntityCode": "string",
        "isDeleted": true
      }
    ],
    "contactOrgDetails": [
      {
        "orgEntity": {
          "entityCode": "string",
          "isDefault": true,
          "entityType": "string",
          "lobEntityCode": "string",
          "isDeleted": true
        },
        "personaAndRoles": {
          "personaName": "string",
          "personaCode": "string",
          "activities": [
            {
              "code": "string",
              "name": "string",
              "description": "string",
              "isDeleted": true
            }
          ],
          "personaDescription": "string",
          "isDeleted": true
        },
        "lobType": "string",
        "isDefaultLOB": true
      }
    ],
    "categories": [
      {
        "pasCode": 0,
        "isDefault": true,
        "clientPasCode": "string",
        "isDeleted": true
      }
    ],
    "isUpdateDefaultCategory": true,
    "regions": [
      {
        "regionName": "string",
        "regionCode": "string",
        "isDefault": true,
        "isOverwrite": true,
        "isDeleted": true
      }
    ],
    "isUpdateDefaultRegion": true,
    "lastLoginDate": "2025-01-30T17:19:31.474Z",
    "personaAndRoles": {
      "personaName": "string",
      "personaCode": "string",
      "activities": [
        {
          "code": "string",
          "name": "string",
          "description": "string",
          "isDeleted": true
        }
      ],
      "personaDescription": "string",
      "isDeleted": true
    },
    "customFields": [
      {
        "key": "string",
        "value": [
          "string"
        ],
        "subCustomField": [
          "string"
        ],
        "questionId": "string"
      }
    ],
    "ssoType": 0,
    "cultureCode": "string",
    "authorizeAmountForProject": 0,
    "secondaryAuthorizeAmount": 0,
    "secondaryAuthorizeAmountForContract": 0,
    "amendmentAuthorizeAmountForContract": 0,
    "workgroups": [
      {
        "code": "string",
        "name": "string",
        "isDefault": true,
        "childCount": "string",
        "level": "string",
        "isActive": true,
        "ancestors": [
          "string"
        ],
        "parentCode": "string"
      }
    ],
    "contactManagers": [
      {
        "managerCode": "string",
        "managerType": "string"
      }
    ],
    "authorityAmountDetails": [
      {
        "documentType": "string",
        "lobType": "string",
        "lobEntityCode": "string",
        "entityType": "string",
        "entityCode": "string",
        "isDeleted": true,
        "amountAttributes": [
          {
            "amountCode": "string",
            "amount": 0
          }
        ]
      }
    ],
    "deliverTo": {
      "deliverToLocationNumber": "string",
      "locationCode": "string",
      "isDeleted": true,
      "locationData": [
        {
          "culture": "string",
          "deliverToLocationName": "string",
          "field": [
            {
              "key": "string",
              "fieldValue": "string"
            }
          ]
        }
      ]
    },
    "additionalPersonas": [
      "string"
    ]
  }
]
Response

On Success:

{
    "status": "Success",
    "batchId": "84663425-af3f-4209-b905-10ac77f05780",
    "successDetails": [
        {
            "key": "20756299"
        }
    ],
    "errorDetails": []}

On Failure:

{
    "status": "Failure",
    "batchId": "7060e218-4aa5-4ccb-b04d-aa4bceec0493",
    "successDetails": [],
    "errorDetails": [
        {
            "key": "20756299_test",
            "errorDetails": {
                "errorModel": [
                    {
                        "key": "20756299_test",
                        "errors": [
                            {
                                "errorCode": "MandatoryException",
                                "errorDescription": "Address is Mandatory"
                            }
                        ],
                        "transactionId": "02cf879d-b1eb-4959-b0f1-8b432f35f259"
                    },
                    {
                        "key": "OrgDetails",
                        "errors": [
                            {
                                "errorCode": "MandatoryException",
                                "errorDescription": "MapAllOrgEntities / IsServingAndBelonging / DefaultBUCodes - atleast one setting need to enabled / configured or contactOrgDetails should be provided in payload."
                            },
                            {
                                "errorCode": "MandatoryException",
                                "errorDescription": "Atleast anyone of the DefaultBUCodes or MappAllOrgEntities should be configured in basic settings, when payload doesnt have orgdetails."
                            }
                        ],
                        "transactionId": "02cf879d-b1eb-4959-b0f1-8b432f35f259"
                    }
                ]
            },
            "description": "MandatoryException-Address is Mandatory, MandatoryException-MapAllOrgEntities / IsServingAndBelonging / DefaultBUCodes - atleast one setting need to enabled / configured or contactOrgDetails should be provided in payload., MandatoryException-Atleast anyone of the DefaultBUCodes or MappAllOrgEntities should be configured in basic settings, when payload doesnt have orgdetails.",
            "status": "VALIDATION_ERROR"
        }
    ]
}

Data Elements

Buyer Contact

Property

Required?

Data type

Description

Validations/Exceptions

ContactCode

Yes

String

Contact Code

  • Max length is 50
  • No Contact Code found

UserName

Yes

String

User Name of entity

  • Max length is 200
  • Invalid username
  • Different user with same username already exists

FirstName

Yes

String

First Name of the entity

  • Max length is 50
  • FirstName is mandatory

LastName

Yes

String

Last Name of the entity

  • Max length is 30
  • Last Name is mandatory

EmailAddress

Yes

String

Email Address of the entity

  • Invalid Email Address
  • Email Address is mandatory

Address

Yes

List of Address object

Check data type Address for details

 Atleast payload should have the countryCode.

AuthorityAmt

No

Decimal

Authority Amount of the entity

 

IsActive

No

Boolean

Status of the entity if they are active or not

 

IsDeleted

No

Boolean

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

 

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

TimeZone

No

String

Time Zone of the entity

  • Max length is 100
  • Invalid Timezone

LocationCode

No

String

Location Code of the entity

  • Max length is 50

CurrencyCode

No

String

Currency Code of the entity

 

Designation

No

String

Designation of the entity

  • Max length is 100

CommitmentAmount

No

Decimal

Commitment Amount of the entity

 

OrgEntities

No

List of OrgEntity object

Check data type OrgEntity for details

 

AccountingEntities

No

List of OrgEntity object

Check data type OrgEntity for details

 

ContactOrgDetails

No

List of ContactOrgDetails object

Check data type ContactDetails for details

 

Categories

No

List of PAS object

Check data type PAS for details

 

Regions

No

List of Regions object

Check data type Regions for details

 

LastLoginDate

No

DateTime

 

 

PersonaAndRoles

No

List of PersonaAndRoles object

Check data type PersonaAndDetails for details

 

CustomFields

No

List of CustomFields object

Check data type CustomFields for details

 

SSOType

No

Int

SSO Type

  • Invalid SSO Type

CultureCode

No

String

Culture Code

 

AuthorizeAmountForProject

No

Decimal

Authorize Amount for Project

 

SecondaryAuthorizeAmount

No

Decimal

Secondary Authorize Amount

 

SecondaryAuthorizeAmountForContract

No

Decimal

Secondary Authorize Amount for Contract

 

AmendmentAuthorizeAmountForContract

No

Decimal

Amendment Authorize Amount for Contract

 

WorkGroup

No

String

Work Group of the entity

 

ContactManagers

No

List of ContactManager object

Check data type ContactManager for details

 

GEPContactCode

No

Long

GEP Contact Code of the entity

 

This field is only available on outbound and not on inbound

 

ManagerCode

No

List of String

Manager Code

  • Invalid Manager Code
  • Multiple managers are not allowed

 

 

Address

Property

Required?

Data type

Description

Validations/Exceptions

AddressLine1

No

String (500)

Address line 1 of the entity

  • AddressLine1 is mandatory
  • Max length for AddressLine1 is 500

City

NO

String (50)

City of the entity

  • City is mandatory
  • Max length for City is 50

StateCode

NO

String (10)

State code of the entity

  • StateCode is mandatory
  • Max length for StateCode is 10
  • Invalid State

CountryCode

Yes

String (2)

Country code of the entity

  • CountryCode is mandatory
  • Max length for CountryCode is 2
  • Invalid Country Code

ZipCode

No

String (10)

Zip code of the entity

  • ZipCode is mandatory
  • Max length for ZipCode is 10

AddressLine2

No

String

Address line 2 of the entity

  • Max length for AddressLine2 is 500

AddressLine3

No

String (100)

Address line 3 of the entity

  • Max length for AddressLine3 is 100

StateOther

No

String

State name (in case of others) of the entity

  • Max length for State Other is 50

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 +(-./ )#@&

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 +(-./ )#@&

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 +(-./ )#@&

PhoneExtension

No

String

Phone extension of the entity

  • Max length for Phone Extension is 10

PhoneOtherExtension

No

String

Phone 2’s extension of the entity

  • Max length for Phone other Extension is 10

County

No

String (50)

County of the address

  • Max length for County is 50

PoBoxNumber

No

String

 

 

 

UserActivities

 

Property

Required?

Data type

Description

Validations/Exceptions

ActivityName

No

Activities

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

 

 

 

OrgEntities

Property

Required?

Data type

Description

Validations/Exceptions

EntityCode

No

String

Entity Code of entity

  • Invalid Org Entity Code

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default Org Entities are not allowed

EntityType

No

String

Entity Type of entity

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

LOBEntityCode

No

String

LOB Entity Code of entity

 

 

 

ContactOrgDetails

Property

Required?

Data type

Description

Validations/Exceptions

OrgEntities

No

List of OrgEntity object

Check data type OrgEntity for details

  • Invalid Org Entity Code

 

PersonaAndRoles

No

List of PersonaAndRoles object

Check data type PersonaAndDetails for details

 

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

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

Property

Required?

Data type

Description

Validations/Exceptions

PasCode

No

Long

PAS Code of entity

  • Category is invalid

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default categories not allowed

ClientPasCode

No

String

Client Pas Code of entity

 

IsDeleted

No

Boolean

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

 

 

 

 

 

 

 

 

PersonaandRoles

Property

Required?

Data type

Description

Validations/Exceptions

PersonaName

No

String

Name of the entity

 

PersonaCode

No

String

Persona Code of the entity

  • Invalid Persona Code

Activities

No

List of UserActivity object

Check data type UserActivity for details

 

PersonaDescription

No

String

Persona Description of entity

 

 

Activities

Property

Required?

Data type

Description

Validations/Exceptions

Code

No

String

Code of the entity

  • Invalid Activity Code

Name

No

String

Name of the entity

 

Description

No

String

Description of the entity

 

 

CustomFields

Property

Required?

Data type

Description

Validations/Exceptions

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

Value

No

List of String

Value of the entity

  • Custom Field has invalid values
  • Custom Field cannot have multiple values

CustomFields

No

List of CustomField object

  • Check data type Custom Fields for details

 

 

Regions

Property

Required?

Data type

Description

Validations/Exceptions

RegionName

No

String

Region name of entity

  • Region is invalid

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple default Regions not allowed

 

AccountingEntities

Property

Required?

Data type

Description

Validations/Exceptions

EntityCode

No

String

Entity Code of entity

  • Invalid Accounting Org Entity Code

IsDefault

No

Boolean

Status of the entity if this is default or not

 

EntityType

No

String

Entity Type of entity

 

LOBEntityCode

No

String

LOB Entity Code of entity

 

 

ContactManagers

Property

Required?

Data type

Description

Validations/Exceptions

ManagerCode

No

String

Manager Code

 

ManagerType

No

String

Manager Type

 

 

Quantum Specific Properties

Property

Required?

Data type

Description

Validations/Exceptions

additionalPersonas

No

Array of String

Array of PersonaCode

 

WorkGroup

No

Object

Workgroup details

 

WorkGroup.Code

No

String

Workgroup code

 

WorkGroup.isDefault

No

Boolean

Identifier for default workgroup

 

WorkGroup.isActive

No

Boolean

Identifier for active or inactive item

 

 

 

 

 

 

 

 

 

 

Return Value

Property

Required?

Data type

Description

Validations / Exceptions/Values

status

 

string

Represent the overall status of the batch

Success, Failure, Partial Success

batchId

 

string

Every request will generate a batchId (GUID)

 

successDetails

 

List of Objects

This object holds the list of contactCode which are passed in the payload got successfully processed.

 

errorDetails

 

List of Objects

 

 

 

Succes/Error Details

Property

Required?

Data type

Description

Validations / Exceptions

successDetails.key

 

String

contactCode of the every user in the payload.

 

errorDetails.key

 

String

ContactCode of the user which got failed in the payload during processing.

 

errorDetails,errorDetails

 

Object

Contains overall details of the errors.

 

errorDetails.description

 

String

Concatinated error messages under the errordetails object above.

 

errorDetails.status

 

String

Indicates the type of error during the processing.

VALIDATION_ERROR, PROCESSING_ERROR

errorDetails.errorDetails.errorModel

 

List of Objects

List of all the error specific to the section.

 

errorDetails.errorDetails.errorModel.key

 

String

Identifier for the section of the payload where the error or validation occurs

Contact, OrgMapping, PAS, Region, CustomAttribute, Address, User etc.

errorDetails.errorDetails.errorModel.errors

 

List of Objects

Within the section of the payload there may be more than one errors or validation, this section hold those details.

 

errorDetails.errorDetails.errorModel.errors.key

 

String

Type of error

Mandatory, Argument, InvalidOperation, validation are type of exceptions.

errorDetails.errorDetails.errorModel.errors.description

 

String

Exact error message on that field