SaveUserGroup (POST)

Overview

This POST API allows pushing Contact User creation and update posted in ERP to GEP SMART for further processing. 

URL Format: https://<Instance>/SmartInterfaceAPI/api/Contact/UserGroup
 

Request
[
  {
    "groupName": "string",
    "isActive": true,
    "description": "string",
    "isOverride": true,
    "contactCodes": [
      {
        "contactCode": "string",
        "isDeleted": true
      }
    ]
  }
]

 

Examples

Success Scenario – Request

The request below describes that this contains only the mandatory attributes:

[
    {
        "groupName": "sacode1",
        "isActive": true,
        "description": "strinaag",
        "isOverride": false,
        "contactCodes": [
            {
                "contactcode": "CC-2019.000064",
                "isDeleted": false
            }
        ]
    }
]

Success Scenario - Response

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

 

Error Scenario – Request

[
    {
        "groupName": "sacode1",
        "isActive": true,
        "description": "strinaag",
        "isOverride": false,
        "contactCodes": [
            {
                "contactcode": "CC-2019.000064",
                "isDeleted": false
            },
             {
                "contactcode": "ankur.katiyar@gep.com",
                "isDeleted": false
            }
        ]
    }
]

 

Error Scenario - Response

{
    "data": null,
    "statusCode": "400",
    "errorDetails": [
        {
            "key": "sacode1",
            "errors": [
                {
                    "errorCode": "DataException",
                    "errorDescription": "Invalid ContactCode Details ankur.katiyar@gep.com"
                }
            ]
        }
    ],
    "successDetails": []
}

 

Data Elements

ClientContactCodes

Property

Required?

Data type

Description

Validations / Exceptions

ContactCode

Yes

String

Contact Code of Users

 

IsDeleted

 

Bool

Set to true if you want to delete this contact from the group

Default value False

 

UserGroup

Property

Required?

Data type

Description

Validations/Exceptions

GroupName

Yes

String

Group name which needs to show

Mandate validation

IsActive

No

Bool

Active flag

Default value False

Description

No

String

Description of the Group

 

IsOverRide

No

Bool

Set to true if you want to override the existing value

Default value false

ContactCodes

Yes

List of ClientContactCodes